Repository navigation
✨ dashboard: action-result toasts auto-dismiss after 15s with countdown - #15572
Conversation
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>
|
[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
|
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
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'sfirechecksel.parentNodebefore callingonExpire, anddismissToastcallstoastCountdownCancelfirst, 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/focusinhandlers 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
_stageTrackerResultToastsonly until the next sync, which drops detached elements (tracker-actions.js:1825) — no leak and no action on a removed node. stageTrackerResultToastTimedkeeps errors and option-carrying prompts sticky, matching the existing error-stays rule indismissToast.
Looks correct to me.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
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 constantSTAGE_TRACKER_RESULT_TOAST_MS = 15000.stageTrackerResultToastarms the sharedtoastCountdownBar(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 viastageTrackerResultToastsSync.stageTrackerResultToastTimed(text):type !== 'error'and no next-actionoptions. Error results and the stuck-decision prompt (option buttons) stay sticky — they need acknowledging / answering.makeToastStickyerror toasts and the terminal login-URL copy surface (agent-cards.js) are intentionally left sticky.stage_tracker_row_actions_test.go(TTL = 15000, expiry dismisses through the sticky guard, error + options toasts not timed); Go wiring intoast_countdown_bar_test.go.dashboard-sections.mdresult toasts), changelog fragment,static/index.htmlregenerated.Verified (Puppeteer against
static/)15000ms,.toast-bar[aria-hidden=true]present on the success result toast, none on the error toast.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.