fix: add +N pop animations to "Your Tab (Running)" strip#97
Conversation
Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/dbfaddc2-7472-496f-98bd-384cbe7f5bc7 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nitrocode/token-deathclock/sessions/dbfaddc2-7472-496f-98bd-384cbe7f5bc7 Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughYo, I tell ya, fool! These changes be addin' floating "+N" pop animations to the session-tab environmental impact metrics, ya feel me? The code introduces shared conversion constants and throttles the update mechanism at 1-second intervals. Plus, new orange-styled pop tokens get spawned when them per-second deltas pass the threshold, and layout properties get adjusted for absolute positioning, sucka! Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 242 242
Branches 109 109
=========================================
Hits 242 242
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|


The "🍺 Your Tab (Running)" stat items (water, trees, charges, metres) incremented every second but never showed the floating
+Npop animations present on every other counter — becausespawnPop()was never called for them, and.session-tab-itemlacked the CSS prerequisites for absolute positioning.Changes
styles/scary-features.css— Addedposition: relative; overflow: visibleto.session-tab-item, matching the same pattern used by.counter-boxand.impact-stat.styles/counter-milestones.css— Added.token-pop--tabcolour variant (orange, matching.sti-val).src/js/18-scary-features.js:WATER_PER_COFFEE_L,KWH_PER_CHARGE,CO2_PER_METRE_KGconstants to eliminate the duplicated magic numbers between session totals and per-second delta calculations._lastTabPopthrottle variable and once-per-secondspawnPop()calls for each of the 4 stat items, usingcalculateEnvironmentalImpact(rate)for per-second deltas — the same approach as the impact stats section in02-counter.js.Summary by CodeRabbit
New Features
Style