Skip to content

πŸ› dashboard: merge banners drain the toast countdown bar - #15880

Merged
clubanderson merged 4 commits into
v5from
fix/merge-toast-countdown
Oct 30, 2026
Merged

clubanderson merged 4 commits into
v5from
fix/merge-toast-countdown

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #15878

What

The Activity Monitor "#N merged" banners (stageTrackerMergeBanner, static-src/js/tracker-merged.js) auto-dismissed via a bare setTimeout and never showed the reverse-progress .toast-bar every other timed toast gets via toastCountdownBar.

  • stageTrackerMergeBanner now arms its dismiss through toastCountdownBar(el, stageTrackerMergeBannerMs(), …): the bar drains along the bottom for the banner lifetime and hover/focus pauses timer + bar together (inherited from toastCountdownBar).
  • stageTrackerMergeBannerDismiss calls toastCountdownCancel so the Γ— button clears the pending timer and bar.
  • .merge-banner gets position: relative; overflow: hidden so the absolutely positioned bar clips to it; bar tinted green to match the merge accent.
  • static/index.html regenerated via make dashboard-gen.

tracker-actions.js result toasts already arm the bar for info toasts via stageTrackerResultToastTimed, so no change there.

Tests

src/pkg/dashboard/stage_tracker_merge_banner_countdown.test.js (node:test, picked up by the existing node --test src/pkg/dashboard/*.test.js CI step) lifts the banner builder and toastCountdownBar out of the shipped index.html and proves: the .toast-bar child + --toast-ttl are set with stageTrackerMergeBannerMs(), expiry removes the banner, hover pauses / leave re-arms, and manual Γ— dismiss clears the timer and bar. 3 of 4 cases fail against the previous index.html.

The Activity Monitor "#N merged" banners auto-dismissed through a bare
setTimeout and never showed the .toast-bar that every other timed toast
gets from toastCountdownBar. Route the dismiss through toastCountdownBar
with stageTrackerMergeBannerMs() so the bar drains along the bottom edge
for the banner lifetime, hover/focus holds timer and bar together, and
the manual x dismiss cancels the countdown. .merge-banner becomes
position: relative / overflow: hidden so the bar clips to it, tinted
green to match the merge accent.

Node test lifts the banner builder and toastCountdownBar out of the
shipped index.html and proves the bar element, --toast-ttl, hover hold
and manual-dismiss cancellation.

Closes #15878

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 30, 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 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

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
#15854 πŸ› fix: preserve merge notifications across reloads and show countdown same files src/pkg/dashboard/stage_tracker_cues_test.go
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static-src/js/tracker-merged.js
src/pkg/dashboard/static/index.html
#15859 ✨ feature: add abandoned counts to contributor leaderboards same files src/pkg/dashboard/static/index.html
#15849 ✨ Show online ClankeR IDs on the Contributors count pill same files src/pkg/dashboard/static/index.html
#15887 πŸ› Show current preparation backlog without fabricating a ready train same files src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static-src/js/tracker-merged.js
src/pkg/dashboard/static/index.html
#15853 ✨ Complete native GitHub queue CI and policy integration same files src/pkg/dashboard/static/index.html
#15877 ✨ feature: show abandoned counts on contributor cards and status same files src/pkg/dashboard/static/index.html
#15871 πŸ› fix: stage tracker gives immediate Let-hive-decide feedback and says why a human is wanted same files src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static/index.html
#15885 ✨ Add integration-aware orchestration above preparation and native queues same files src/pkg/dashboard/static/index.html

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 050-review-pending: required-check-pending:Sign-off survives the squash

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • test (dashboard 2/4)
  • test (dashboard 3/4)
  • test (dashboard shuffle 1/3)

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@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.

Reviewed (correctness) β€” one advisory finding, non-blocking.

Auto-dismiss can cut the merge-banner-out fade short. toastCountdownBar's fire nulls el._countdown before calling onExpire (static-src/js/tooltips-dialogs.js:750), so when the banner expires on its own, toastCountdownCancel(el) in stageTrackerMergeBannerDismiss (static-src/js/tracker-merged.js:953) is a no-op and the .toast-bar stays in the banner. The bar's toast-bar-drain CSS animation starts at the first style flush after the JS timer was armed, so it typically finishes a few ms after the timer fires β€” i.e. after merge-banner-out has been added and stageTrackerAfter(el, 'animationend', 180, …) has been attached (tracker-merged.js:955). stageTrackerAfter does not check e.target (index.html:18401-18406), so the bar's bubbled animationend runs el.remove() immediately and skips the 180 ms fade. Before this PR the banner had no animated child, so this is new. The .toast paths are unaffected because dismissToast times its out-animation with setTimeout, not animationend. Cosmetic only; manual Γ— is fine (cancel removes the bar first).

Suggested fix β€” drop the bar before arming the out-animation (the bar is at scaleX(0) by then, so nothing is visibly lost):

      toastCountdownCancel(el);
      const bar = typeof el.querySelector === 'function' ? el.querySelector(':scope > .toast-bar') : null;
      if (bar) bar.remove();

(then make dashboard-gen). Tests otherwise cover the contract in #15878 well.

β€” hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

…op duplicate fragment

The stage_tracker_cues node fixture lifts stageTrackerMergeBanner out of
index.html; now that the banner arms its dismiss through
toastCountdownBar the fixture pulls that function (and
toastCountdownCancel) in too, with matches/contains/activeElement shims
on the fake DOM. Keep the bot's bullet-formatted fixed-15880.md fragment
and remove the malformed slug fragment.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

ci-report @9e47b0e β€” the dashboard shards are red for a PR-local reason, not the baseline (v5 head has no failing check-runs).

Failing: test (dashboard 1/4..4/4), test (dashboard shuffle 1/3..3/3), coverage, test β€” all from the same Node harness error in stage_tracker_cues_test.go (TestStageTrackerCelebrateNode, TestStageTrackerCelebrateNestedPRRow, TestStageTrackerOdometerNode, TestStageTrackerDetachedCelebrationNode):

[stdin]:468
      toastCountdownBar(el, stageTrackerMergeBannerMs(), () => stageTrackerMergeBannerDismiss(el));
ReferenceError: toastCountdownBar is not defined
    at stageTrackerMergeBanner ([stdin]:468:7)
    at stageTrackerCelebrateMerges ([stdin]:332:12)

Why: stageTrackerCelebrateJS() assembles the Node script from individually picked functions (jsFunc(t, html, …)); the new banner path calls toastCountdownBar/toastCountdownCancel, which the celebrate harness never picks. Your new stage_tracker_merge_banner_countdown.test.js does pick them, so only the pre-existing Go-driven harness breaks.

Fix (one of):

  • Add jsFunc(t, html, "toastCountdownBar") and jsFunc(t, html, "toastCountdownCancel") to the list in stageTrackerCelebrateJS() (the harness already fakes setTimeout/clock, so the real functions should drive fine), or
  • Stub them in stageTrackerCelebrateFixture: function toastCountdownBar(el, ms, onExpire) { el._onExpire = onExpire; } function toastCountdownCancel(el) {} and assert the dismiss path explicitly.

The other two reds are infra, not this diff: docker (contributor) fails on npm error 404 … tslib-2.9.1.tgz while installing @earendil-works/pi-coding-agent (same on #15814), and changelog-fragment-guard was still in progress when I looked β€” you now have two fragments (fixed-15880.md and fixed-merge-banner-countdown-bar.md); one is enough.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026
@clubanderson
clubanderson merged commit 761652c into v5 Oct 30, 2026
75 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/merge-toast-countdown branch October 30, 2026 21:24
@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

hivecommons-hive Bot added a commit that referenced this pull request Oct 30, 2026
Address review findings on #15892:
- changelog fragment and activity-monitor doc describe only what this PR
  adds (reload-safe once-only delivery via hive.tracker.merge-session.v1,
  vanished-row short-name resolution, countdown cancel on banner eviction);
  the countdown bar itself landed in #15880
- doc notes the banner lifetime is twice the configured toast_info_s
- drop duplicate jsFunc/matches/contains lines left by the rebase in
  stage_tracker_cues_test.go
- hoist the session PR-key regex into STAGE_TRACKER_MERGE_SESSION_PR_KEY_RE

Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
hivecommons-hive Bot added a commit that referenced this pull request Oct 31, 2026
* πŸ› fix: persist activity merge delivery and show banner countdown

Keep the last observed PR state and delivered identities across reloads, and resolve audit repo aliases after the last row disappears. Use the shared countdown for configured merge-banner lifetimes.

Hive-Run: #15828
Hive-Plan: issue-15828-merge-session-and-countdown
Hive-Spec: issue-15828#merge-delivery-and-countdown
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

* πŸ› fix: align merge feedback fixtures with session reconciliation

Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

* πŸ› fix: wait for detached merge celebration landing in session test

Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

* πŸ› fix: load tracker constants from split row source in nav delta test

nav_count_delta.test.js still read STAGE_TRACKER_ACTED_FILTERS from
tracker-row.js, which #15771 moved to tracker-row-acted.js, and did not
stub stageTrackerReconcileMerges that renderStageTracker now calls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

* fix: trim merge-session changelog/docs and dedupe test fixture lines

Address review findings on #15892:
- changelog fragment and activity-monitor doc describe only what this PR
  adds (reload-safe once-only delivery via hive.tracker.merge-session.v1,
  vanished-row short-name resolution, countdown cancel on banner eviction);
  the countdown bar itself landed in #15880
- doc notes the banner lifetime is twice the configured toast_info_s
- drop duplicate jsFunc/matches/contains lines left by the rebase in
  stage_tracker_cues_test.go
- hoist the session PR-key regex into STAGE_TRACKER_MERGE_SESSION_PR_KEY_RE

Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>

---------

Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: mendezr <mendezr@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Activity Monitor "#N merged" toasts auto-dismiss without the countdown bar other timed toasts show

1 participant