Skip to content

fix(emcn): keep ongoing status toasts behind actionable toasts - #8955

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/toast-actionable-priority
Oct 13, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/toast-actionable-priority

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

A persistent status toast such as "Reconnecting..." or "Joining workflow..." that arrives after an actionable toast (for example "This workflow is locked" with its Unlock Workflow button) used to cover that action indefinitely.

The collapsed stack (packages/emcn/src/components/toast/toast.tsx) shows the newest toast in front with [...toasts].reverse(). Back cards peek 13px above the front card and are clipped to its height, so their actions aren't visible. On touch, the first tap only expands the stack.

The fix adds orderToastStack. It keeps newest-first ordering, except that ongoing status toasts (persistent and with no action) sit behind every other toast. Nothing else changes: overflow eviction, timers, dismissal, the screen-reader live region, layout and expansion all behave as before. A short-lived toast like "Saved" still shows in front for its 5 seconds.

Precedent: sonner also puts the newest toast in front and has no priority setting. MDN's guidance is that a status message is advisory and shouldn't take attention from actionable content.

Test plan

  • packages/emcn/src/components/toast/toast.test.ts: 3 ordering cases, each failing on the old reverse() ordering
  • CI type-check, lint, check:unused-exports

The collapsed toast stack paints newest-first and shows only the front
card whole; back cards are clamped to the front card's height and peek
13px above it. A persistent status toast raised after an actionable one
("Reconnecting..." / "Joining workflow..." after "This workflow is
locked") therefore covered the action, and on touch the first tap only
expanded the stack.

Order the stack so persistent toasts without an action sit behind every
other toast; everything else stays newest-first.
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 13, 2026 3:23am UTC

Request Review

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Keeps persistent toasts without actions behind other toasts.

  • Ongoing status toasts stay behind actionable and timed toasts.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/sta..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit f03d06f into staging Oct 13, 2026
53 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/toast-actionable-priority branch October 13, 2026 05:51

This branch was successfully deployed

1 active deployment
Preview — 00aa1a9d Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant