Skip to content

✨ dashboard: action-result toasts auto-dismiss after 15s with countdown - #15572

Merged
clubanderson merged 1 commit into
v5from
feat/result-toast-ttl
Oct 29, 2026
Merged

clubanderson merged 1 commit into
v5from
feat/result-toast-ttl

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15571

Follow-up to #15556 (owner: "these can also have a timer that runs down and closes after 15 seconds").

What changes

  • tracker-actions.js: new named constant STAGE_TRACKER_RESULT_TOAST_MS = 15000. stageTrackerResultToast arms the shared toastCountdownBar(el, STAGE_TRACKER_RESULT_TOAST_MS, () => dismissToast(el, null, null, true)) for informational results, so they get the same bar + hover/focus pause as every other timed toast. × still closes at once; a tracker state change still closes earlier via stageTrackerResultToastsSync.
  • New pure predicate stageTrackerResultToastTimed(text): type !== 'error' and no next-action options. Error results and the stuck-decision prompt (option buttons) stay sticky — they need acknowledging / answering.
  • Other sticky toasts audited: makeToastSticky error toasts and the terminal login-URL copy surface (agent-cards.js) are intentionally left sticky.
  • Tests: node fixture in stage_tracker_row_actions_test.go (TTL = 15000, expiry dismisses through the sticky guard, error + options toasts not timed); Go wiring in toast_countdown_bar_test.go.
  • Docs (dashboard-sections.md result toasts), changelog fragment, static/index.html regenerated.

Verified (Puppeteer against static/)

  • TTL 15000ms, .toast-bar[aria-hidden=true] present on the success result toast, none on the error toast.
  • t≈10 s: bar scaleX ≈ 0.33; hover → animation-play-state: paused, JS timer cleared with ~4.8 s remaining; still alive after 6 s hovered; closes after leaving. Error toast remains.
t ≈ 0 t ≈ 10 s
dark result toast dark at t0 result toast dark at 10s
light result toast light at t0 result toast light at 10s

Informational stage-tracker result toasts (adopted, posted, held, no-op)
now close after STAGE_TRACKER_RESULT_TOAST_MS = 15000 on the shared
toastCountdownBar, so they get the countdown bar and hover/focus pause;
× and a tracker state change still close them earlier. Error results and
results offering next-action buttons stay sticky.

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 nicholasjackson 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/M Denotes a PR that changes 30-99 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
#15570 🐛 dashboard: roll the merged odometer after the bee lands 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

@clubanderson
clubanderson merged commit 25f02be into v5 Oct 29, 2026
81 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/result-toast-ttl 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

@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 toastCountdownBar / dismissToast in tooltips-dialogs.js:741-860 and stageTrackerResultToastsSync in tracker-actions.js:1822 at v5 head against this diff; the wiring holds together:

  • toastCountdownBar's fire checks el.parentNode before calling onExpire, and dismissToast calls toastCountdownCancel first, so × / stale-state dismissal and the 15 s timer cannot double-fire or remove a toast twice.
  • Hover and focus pausing come from the shared bar (mouseenter/focusin handlers wired once per element), so the "pause on hover" the comment promises is real, not new code.
  • An entry dismissed by the timer stays in _stageTrackerResultToasts only until the next sync, which drops detached elements (tracker-actions.js:1825) — no leak and no action on a removed node.
  • stageTrackerResultToastTimed keeps errors and option-carrying prompts sticky, matching the existing error-stays rule in dismissToast.

Looks correct to me.

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

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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dashboard: action-result toasts should auto-dismiss after 15s with countdown

1 participant