Skip to content

πŸ› dashboard: roll the merged odometer after the bee lands - #15570

Merged
clubanderson merged 1 commit into
v5from
fix/odometer-after-bee
Oct 29, 2026
Merged

clubanderson merged 1 commit into
v5from
fix/odometer-after-bee

Conversation

@clubanderson

Copy link
Copy Markdown
Member

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:

  • the day/week line was never held back β€” stageTrackerMergedSync rolled it the moment the payload arrived;
  • the holdback only subtracts a pending flight when the server's recent list carries that PR, so a total the server had already raised rolled at once otherwise;
  • merges over the flight cap (and with no row) bumped immediately while other bees were still flying β€” rolls queued under one flight.

Fix (JS only β€” the roll itself is untouched)

  • stageTrackerMergedInFlight(): a glyph is in the air (_stageTrackerFlights > 0) or pending launch (_stageTrackerCelebratePending non-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, the sessionStorage save, the pop and the live announcement; tooltip/popover still update. The last landing β€” the glyph's animationend, or stageTrackerAfter's timer at STAGE_TRACKER_CELEBRATE_FLY_MS when 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.
  • Reduced motion: the fade still ends via 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 from sessionStorage is unchanged).
  • STAGE_TRACKER_ODOMETER_MS (900 ms), easing, full-turn/carry behaviour: unchanged.

Tests

  • New TestStageTrackerOdometerAfterBeeNode (fake timers + dispatched animationend): 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-ms still 900 ms; two merges in one flight β†’ first landing folded into the second, one roll (9 β†’ 0 β†’ 1 strip), one zap; no animationend β†’ the flight-length fallback timer lands it; reduced motion β†’ set, not rolled.
  • TestStageTrackerCelebrateNode step 2 updated: the capped merge now waits for the glyphs in the air (was: bumped at once).
  • stageTrackerMergedInFlight added to the lifted function list; TestStageTrackerCuesWiring pins no new constant (the fallback uses the existing STAGE_TRACKER_CELEBRATE_FLY_MS).

Docs: dashboard-sections.md Merged-chip paragraph; changelog.d/fixed-merged-odometer-after-bee.md; static/index.html regenerated.

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15572 ✨ dashboard: action-result toasts auto-dismiss after 15s with countdown same files src/docs/dashboard-sections.md
src/pkg/dashboard/static/index.html
#15526 🌱 dashboard: split stage_tracker.go into 4 files same files src/docs/dashboard-sections.md
#15530 πŸ› fix(dashboard): issue-row linked PR passes null when the lineage chip is empty same files src/pkg/dashboard/static/index.html

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) reaches stageTrackerCelebrateTick: stageTrackerCelebrateMerges (:679) either ticks directly when the row is gone or calls celebrateRow, whose only non-ticking early returns (!rowEl.classList, kind !== 'merged') cannot fire on that path. So stageTrackerMergedInFlight() cannot stick true and hold the drum forever.
  • The decrement at :776 runs before the tick, so the last landing sees _stageTrackerFlights === 0 and draws; an earlier landing is correctly folded (tick && !hold).
  • The tooltip/popover still update under the hold, and the first-draw sessionStorage roll-up (#15398) is untouched because hold is 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

@clubanderson
clubanderson merged commit 30cfb74 into v5 Oct 29, 2026
81 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/odometer-after-bee branch October 29, 2026 23:54
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dashboard: merged odometer rolls while the bee is still flying β€” sequence the roll after the landing

1 participant