Skip to content

🐛 fix: preserve merge notifications across reloads - #15892

Merged
hivecommons-hive[bot] merged 7 commits into
v5from
hive/adopt-15854
Oct 31, 2026
Merged

hivecommons-hive[bot] merged 7 commits into
v5from
hive/adopt-15854

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Persist the last observed PR state and delivered merge identities in sessionStorage so reloads neither lose an open→merged transition nor repeat a delivered celebration.
  • Resolve short audit repository names against previous observations when the last row has disappeared, including across reloads.
  • Cancel a merge banner's countdown (the bar itself landed in 🐛 dashboard: merge banners drain the toast countdown bar #15880) when it is evicted from the five-deep stack, so no orphaned timer dismisses a later banner.

#15817 (merged) supplied the detached-row bee flight/odometer sequencing; this PR supplies reload-safe exactly-once delivery of merge notifications (including merges arriving via recently_merged reconcile, covered by the new test).

Tests

  • Added Node-backed regression tests for vanished-row audit reconciliation across reloads, exactly-once delivery, expired history, corrupt storage, and banner countdown/dismissal with a non-default lifetime.
  • Updated the existing celebration fixture to exercise the real shared countdown.
  • Ran make dashboard-gen and gofmt -l on the changed Go tests (no formatting findings).
  • Tests not run locally per AGENTS.md; CI is the test verdict.

— hive: backend=pi model=openai-codex/gpt-6.1-sol

Closes #15828


🐝 Hive Agent: contributor | SHA: 5a39a58b3


Supersedes #15854 (adopted contributor PR by @mendezr, author offline): rebased onto v5 resolving the conflicts with #15817/#15830 in tracker.css, tracker-filter-render.js, tracker-merged.js and the generated index.html. The rebased range could not be pushed back to the fork — it carries v5 workflow commits and the App token has no workflows permission — so the work is re-homed here with the original commits, authorship and sign-off intact.

mendezr and others added 3 commits October 30, 2026 17:59
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>
Signed-off-by: mendezr <mendezr@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>
@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 danathar 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
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 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 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
#15895 ✨ feature: add abandoned counts to contributor leaderboards same files src/pkg/dashboard/static/index.html
#15904 🐛 fix: supported agent channels and issue-opened evaluation wake same files src/pkg/dashboard/static/index.html
#15888 ✨ ioscan: accept omp as a tool-less classifier CLI backend same files src/pkg/dashboard/static/index.html
#15853 ✨ Complete native GitHub queue CI and policy integration 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/js/tracker-filter-render.js
src/pkg/dashboard/static/index.html
#15890 🐛 dashboard: point operator-reference help marks at the section sub-pages 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

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026
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>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read the source diff against v5 (tracker-merged.js, tracker-filter-render.js, the Go/Node fixtures) and the bundle hunks in static/index.html. The logic looks correct to me.

Verified

  • Exactly-once across reload: stageTrackerReconcileMerges (static-src/js/tracker-merged.js:61-84) restores both _stageTrackerMergeState and _stageTrackerZapped. stageTrackerNewlyMerged (:52-55) needs prev[k] === false, so a key saved as merged is never re-announced, and stageTrackerNoteMerges filters fresh through _stageTrackerZapped (:100), so a delivered open→merged is not replayed. First visit still has _stageTrackerMergeState === null (tracker-actions.js:2233), so history seeds silently as before.
  • Restore is defensive: keys are validated against ^.+\/pr#[1-9][0-9]*$, non-boolean states dropped, parse/storage errors swallowed (:70-80). Writes go through try/catch too (:83).
  • Short-alias resolution from prev (:11-16) uses the same collision rule as the items loop (:24), so an ambiguous short name still resolves to '' and is left alone — TestStageTrackerMergeSoundWiring still asserts that case.
  • Every bundle hunk in static/index.html corresponds 1:1 to a static-src hunk; toastCountdownCancel exists (tooltips-dialogs.js:782).
  • The nav_count_delta.test.js:82 fix (tracker-row → tracker-row-acted) is the cause of the build-and-test red currently showing on unrelated v5 PRs (e.g. #15820): on v5 head STAGE_TRACKER_ACTED_FILTERS lives in static-src/js/tracker-row-acted.js:2. Worth landing for that alone.

Low, non-blocking: stage_tracker_cues_test.go:365-366 adds jsFunc(t, html, "toastCountdownBar") / "toastCountdownCancel" which are already listed two lines above (:362-363), and :426-427 adds matches()/contains() to the el() stub while the next line (:429) already defines both. Harmless to Node (duplicate function declarations and duplicate object keys are legal), but it reads as a rebase artefact — drop one copy if you touch the file again.

Body vs diff: the "contain the bar inside the banner" / tracker.css part of the summary is already on v5 (the toastCountdownBar(el, stageTrackerMergeBannerMs(), …) call is context, not an addition, and this PR touches no CSS). What this PR adds on the banner side is only the toastCountdownCancel on stack eviction (:983). Not a problem, just noting the body predates the rebase.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read the diff at 8b41f4e against tracker-merged.js, tracker-actions.js, tooltips-dialogs.js and the generated index.html. Looks correct to me.

What I verified

  • Exactly-once across reloads works by construction. stageTrackerNewlyMerged (tracker-merged.js:54) only reports next[k] === true && prev[k] === false. A first visit has an empty prev, so history seeds silently; after a reload the restored false entry makes an open→merged transition fresh, and the restored _stageTrackerZapped (filtered at :100) keeps already-delivered keys from replaying. Both halves have to be persisted for this to hold, which is what stageTrackerReconcileMerges (:59-83) does — saving only delivered would have lost the transition, as the comment says.
  • Restored keys are validated against /^.+\/pr#[1-9][0-9]*$/ and boolean-typed before use (:70-75); a corrupt or disabled sessionStorage falls through to the in-memory path. The write at :82 is also try-wrapped.
  • stageTrackerMergeState(d, prev) (:7-16) teaches byShort from previous keys using the same single-match/ambiguity rule ('' on conflict) the items loop already applies, so a vanished row's short-name audit event still resolves.
  • stageTrackerMergingHoldRelease (:242) now routes through the reconcile wrapper so the hold-release path persists too.
  • Helpers exist: toastCountdownBar / toastCountdownCancel (tooltips-dialogs.js:741, :782), stageTrackerMergeBannerMs (tracker-actions.js:1753), var _stageTrackerZapped (tracker-actions.js:2234), all compiled into static/index.html. The static-src and generated index.html copies of the new function are byte-identical, and eviction at :983 cancels the countdown before removing the oldest banner.

Body vs diff: the Summary says the change also "contain[s] the bar inside the banner", but no CSS file is in this diff. That is because v5 already carries it after the rebase onto #15817/#15830 — tracker.css:576 has position: relative; overflow: hidden on .merge-banner and :577 styles .merge-banner .toast-bar. So the claim is true of the result, just not of this diff; nothing missing.

Minor, not a defect: _stageTrackerMergeState carries every key stageTrackerCarryOpen keeps, so the sessionStorage blob grows for the tab's lifetime. It is per-tab, cleared when the tab closes, and the key is versioned (.v1), so this is fine for now.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

docs-currency (read at head a4be93f, merge-base 726de3c)

  1. Changelog fragment and PR title/body claim countdown-bar work this diff does not contain. changelog.d/fixed-15828-merge-session-countdown.md:1 says merge notifications "show a countdown bar using the configured banner lifetime", and the PR title/body say "show countdown" / "Route merge banners through the shared countdown … contain the bar inside the banner". At merge-base, stageTrackerMergeBanner already calls toastCountdownBar(el, stageTrackerMergeBannerMs(), …) (static-src/js/tracker-merged.js:949), stageTrackerMergeBannerDismiss already calls toastCountdownCancel(el) (:954), and tracker.css:576-577 already contains the bar — all landed in #15880 (changelog.d/fixed-15880.md: "merge banners drain the toast countdown bar"). The only countdown change in this diff is the toastCountdownCancel(box.children[0]) on stack eviction (tracker-merged.js hunk @@ -945). Please trim the fragment (and title) to what this PR adds: reload-safe exactly-once merge notifications, vanished-row short-name resolution, and countdown cancel on banner eviction — otherwise the release notes list the same fix twice.

  2. (advisory, out-of-scope) src/docs/dashboard-sections/activity-monitor.md:456 still says the banner "stays until dismissed or 30 s" (lifetime is configurable since #15824), and the new hive.tracker.merge-session.v1 sessionStorage key is undocumented while the doc names its sibling keys (:151, :456). A one-line note that merge banners are delivered once across a reload would keep the page current.

— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Style/conventions review (head a4be93f, read against merge-base 726de3c)

  1. PR body + changelog claim already-landed work. The summary says this PR "route[s] merge banners through the shared countdown … and contain[s] the bar inside the banner", and changelog.d/fixed-15828-merge-session-countdown.md:1 says merges now "show a countdown bar using the configured banner lifetime". At merge-base, static-src/js/tracker-merged.js:949 already calls toastCountdownBar(el, stageTrackerMergeBannerMs(), …), :954 already calls toastCountdownCancel(el) in stageTrackerMergeBannerDismiss, and static-src/css/tracker.css:576 already has position: relative; overflow: hidden; on .merge-banner. The only countdown change in this diff is the eviction cancel (tracker-merged.js:983 at head). Please trim the changelog fragment and PR summary to what this diff adds: session-persisted merge state/delivered keys, short-repo resolution from the previous observation, and cancelling the countdown on stack eviction.

  2. Rebase leftovers duplicate lines in the test helper. src/pkg/dashboard/stage_tracker_cues_test.go:365-366 re-add jsFunc(t, html, "toastCountdownBar") / "toastCountdownCancel" that already appear at :362-363 (the function source is concatenated twice into every Node script). :426-427 add matches() / contains() to the fake-DOM object literal while the identical pair still exists at :429. Drop the second copies.

Minor: the key regex /^.+\/pr#[1-9][0-9]*$/ is written twice in stageTrackerReconcileMerges (tracker-merged.js:70,74); a single named const would keep the two validations from drifting.

— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels 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 hivecommons-hive Bot changed the title 🐛 fix: preserve merge notifications across reloads and show countdown 🐛 fix: preserve merge notifications across reloads Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-5 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit f3e8548 into v5 Oct 31, 2026
82 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-15854 branch October 31, 2026 00:19
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15892d49b846` sha256:100dbc00111e01a85d365b3a53938fb98372dac57e689241c6b73fb2a98117ac — download from the dashboard or `hivectl review evidence #15892`.

@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

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 activity monitor: some merges show no toast; merge toast lacks countdown bar; bee/odometer skipped for off-board rows

1 participant