Repository navigation
π dashboard: roll the merged odometer after the bee lands - #15570
Conversation
Owner: "the odometer should roll only after the bee animation finishes so it looks correlated." The drum moved under the flight: the day/week line rolled on the payload that brought the merge, a total the server had already raised rolled at once when the holdback could not see the PR, and merges over the flight cap bumped while other bees flew. A glyph in the air (or pending launch) now holds the whole drum (stageTrackerMergedInFlight); the last landing β the glyph's animationend, or stageTrackerAfter's timer at the flight length β draws once, to the final numbers, then the roll and the zap. Several merges in one flight are one roll. Reduced motion lands instantly; the first render still sets the drum directly. The roll itself (timing, easing, carry) is unchanged. Fixes #15568 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Read tracker-merged.js at v5 head (fdee7eb) alongside the diff; this looks correct to me.
- Every entry added to
_stageTrackerCelebratePending(tracker-merged.js:69) reachesstageTrackerCelebrateTick:stageTrackerCelebrateMerges(:679) either ticks directly when the row is gone or callscelebrateRow, whose only non-ticking early returns (!rowEl.classList,kind !== 'merged') cannot fire on that path. SostageTrackerMergedInFlight()cannot sticktrueand hold the drum forever. - The decrement at
:776runs before the tick, so the last landing sees_stageTrackerFlights === 0and draws; an earlier landing is correctly folded (tick && !hold). - The tooltip/popover still update under the hold, and the first-draw
sessionStorageroll-up (#15398) is untouched becauseholdis gated on!first. - Body matches the diff; the new node test exercises the mid-flight poll, the fold, and the timer fallback.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15568 (follow-up to #15470 / #15545).
Owner: "the odometer should roll only after the bee animation finishes so it looks correlated."
Cause
The all-time total was meant to wait for the bee (
stageTrackerMergedHoldback), but the drum still moved under the flight:stageTrackerMergedSyncrolled it the moment the payload arrived;recentlist carries that PR, so a total the server had already raised rolled at once otherwise;Fix (JS only β the roll itself is untouched)
stageTrackerMergedInFlight(): a glyph is in the air (_stageTrackerFlights > 0) or pending launch (_stageTrackerCelebratePendingnon-empty β launches are staggered, so the merge's own payload already counts).stageTrackerMergedCountDraw: while in flight (and not the first draw) it skips the odometer writes, thesessionStoragesave, the pop and the live announcement; tooltip/popover still update. The last landing β the glyph'sanimationend, orstageTrackerAfter's timer atSTAGE_TRACKER_CELEBRATE_FLY_MSwhen the event never fires β draws once, to the final values: bee lands β drum rolls.stageTrackerCelebrateTick: the zap plays only when no glyph remains, so several merges in one flight are one roll, one zap to the final number, not a queue.animationend/timer and the drum is set instantly. First render: set directly as before (the dashboard: merge bee is too small to recognise and the Merged counter's odometer roll is not visibleΒ #15398 reload roll-up fromsessionStorageis unchanged).STAGE_TRACKER_ODOMETER_MS(900 ms), easing, full-turn/carry behaviour: unchanged.Tests
TestStageTrackerOdometerAfterBeeNode(fake timers + dispatchedanimationend): first render sets directly; total and day/week line hold while the bee flies, also across a mid-flight poll that raised the server's total;animationendβ one roll to the final values + zap + pop,--odo-msstill 900 ms; two merges in one flight β first landing folded into the second, one roll (9 β 0 β 1strip), one zap; noanimationendβ the flight-length fallback timer lands it; reduced motion β set, not rolled.TestStageTrackerCelebrateNodestep 2 updated: the capped merge now waits for the glyphs in the air (was: bumped at once).stageTrackerMergedInFlightadded to the lifted function list;TestStageTrackerCuesWiringpins no new constant (the fallback uses the existingSTAGE_TRACKER_CELEBRATE_FLY_MS).Docs:
dashboard-sections.mdMerged-chip paragraph;changelog.d/fixed-merged-odometer-after-bee.md;static/index.htmlregenerated.