Repository navigation
fix(emcn): keep ongoing status toasts behind actionable toasts - #8955
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
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
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
statusmessage 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 oldreverse()orderingcheck:unused-exports