Skip to content

fix: remove mobile peek offset that clips grim reaper on small screens#75

Merged
nitrocode merged 1 commit into
mainfrom
copilot/fix-floating-grim-reaper-cutoff
Apr 26, 2026
Merged

fix: remove mobile peek offset that clips grim reaper on small screens#75
nitrocode merged 1 commit into
mainfrom
copilot/fix-floating-grim-reaper-cutoff

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

On mobile viewports, transform: translateX(-8px) combined with overflow-x: hidden on <html> caused the left edge of the grim reaper to be clipped. The right side could also be affected depending on browser clipping behaviour.

Change

Removed the negative translate offset in the max-width: 480px media query so the reaper sits flush at left: 0 with no cutoff on either side. The hover override (translateX(0)) is also removed as it's now redundant.

/* Before */
@media (max-width: 480px) {
  .grim-reaper svg { width: 55px; }
  .grim-reaper { transform: translateX(-8px); }
  .grim-reaper:hover { transform: translateX(0); }
}

/* After */
@media (max-width: 480px) {
  .grim-reaper svg { width: 55px; }
  .grim-reaper { transform: translateX(0); }
}

The desktop peek effect (translateX(-22px)translateX(0) on hover) is unchanged.

Summary by CodeRabbit

Style

  • Adjusted mobile display positioning to center visual elements instead of using a side-peek offset
  • Maintained consistent accessibility support for reduced-motion preferences

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d035e535-e9f7-42de-b7e8-144e50a47ec9

📥 Commits

Reviewing files that changed from the base of the PR and between 23ab8fb and 7b0458b.

📒 Files selected for processing (2)
  • styles.css
  • styles/scary-features.css

📝 Walkthrough

Walkthrough

Fool, check it! This here pull request be modifyin' the .grim-reaper CSS styles for small screens, I pity the fool who don't understand! We removin' the translateX(-8px) offset and its hover behavior, replacin' it with a steady translateX(0) at max-width: 480px. The reduced-motion query comment got shortened up too, sucka!

Changes

Cohort / File(s) Summary
Grim Reaper Styling
styles/scary-features.css
Removed left peek offset on mobile and updated reduced-motion comments; replaced hover-based transform reset with constant translateX(0) positioning for small screens, I pity the fool!

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/fix-floating-grim-reaper-cutoff

Comment @coderabbitai help to get the list of available commands and usage tips.

@nitrocode nitrocode merged commit a0b3ce4 into main Apr 26, 2026
3 of 4 checks passed
@nitrocode nitrocode deleted the copilot/fix-floating-grim-reaper-cutoff branch April 26, 2026 12:30
@github-actions
Copy link
Copy Markdown
Contributor

👁️ PR Preview

🚀 Open Preview

Deployed from commit 7b0458b · Updates on every push to this PR
(Preview is removed automatically when the PR is closed.)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f44cf18) to head (7b0458b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #75   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          233       233           
  Branches       107       107           
=========================================
  Hits           233       233           
Flag Coverage Δ
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f44cf18...7b0458b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI added a commit that referenced this pull request Apr 26, 2026
Merge origin/main (mobile fixes from #74, #75) into branch, then
rebuild styles.css from source so it contains both the mobile layout
fixes and the token-pop animation styles.

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/aedeb8a9-2599-40ef-a1a4-aa6d47261123

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
nitrocode added a commit that referenced this pull request Apr 26, 2026
…#76)

* feat: add growing rate + floating token pop animation

- Add getDynamicRate() to death-clock-core.js with 30% annual growth after BASE_DATE
- Add RATE_GROWTH_PER_YEAR constant (0.30)
- Update getCurrentTokens() to integrate the exponential rate for accuracy
- Use getDynamicRate() in 02-counter.js for rate display and session tokens
- Update rate subtitle to show "and growing" beyond BASE_DATE
- Add spawnTokenPop(): spawns a "+N" floating element on the total counter every second
- Add .token-pop CSS with @Keyframes tokenPopFloat (float up 56px, fade out over 1.5s)
- Change .counter-box overflow to visible so pops can float above the box
- Add 9 unit tests for getDynamicRate and RATE_GROWTH_PER_YEAR
- All 262 unit tests pass at 100% coverage; all 68 E2E tests pass

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/1579b618-82e8-4125-b282-8ddddafa27eb

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

* refactor: address code review feedback

- Extract POP_LEFT_BASE/POP_LEFT_SPREAD named constants
- Rename k → continuousGrowthRate for clarity
- Add source citation comment for RATE_GROWTH_PER_YEAR
- Add explanatory comment on counter-box overflow: visible change

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/1579b618-82e8-4125-b282-8ddddafa27eb

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

* chore: merge main and regenerate styles.css

Merge origin/main (mobile fixes from #74, #75) into branch, then
rebuild styles.css from source so it contains both the mobile layout
fixes and the token-pop animation styles.

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/aedeb8a9-2599-40ef-a1a4-aa6d47261123

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

* fix: address code review findings in counter.js, CSS, and changelog-data.js

- changelog-data.js: reset to base and regenerate via npm run build:changelog
  so the file is properly derived from CHANGELOG.md, not edited directly
- spawnTokenPop: add animationcancel listener + fallback timeout (1500+200ms)
  with a shared 'removed' flag so cleanup never double-fires
- styles/counter-milestones.css: use double-quotes for "Orbitron" font-family
  and rename @Keyframes tokenPopFloat → token-pop-float (kebab-case)
- updateCounters: hoist [...RATE_SCHEDULE].reverse() to module-level
  REVERSED_RATE_SCHEDULE constant, out of the per-frame hot path

Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/fedaea6d-9cc7-4df9-a304-fbde3025a7ec

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants