Toasts go only to a bar you can see: the Undo toast survives leaving a note on a phone (#324) #341

Closed
kayg wants to merge 1 commit from issue/324-toast-active-bar into dev
Owner

Fixes #324.

Cause. BottomBar attached itself to the toast system for as long as it was mounted. Notes and Settings both stay mounted under each other (#173), the one underneath being inert and hidden. So on a phone, Settings' bar counted as "a bar on screen". Deleting a note goes back to the list, which has no bar of its own; the Undo toast was handed to Settings' hidden bar instead of falling back to Sonner's stack, and never showed. I found it by dumping the Undo button's ancestors in the failing run: DIV.tab-layer off INERT > .settings > .bar-wrap > .row.bar-toast, all visibility: hidden.

Fix. BottomBar has an active prop (Shell, PhoneStack and Settings pass theirs, the same one that already marks them inert) and attaches only while it is true.

Evidence. toast-bar.spec.ts "a toast that leaves its screen carries on: in the next bar, or on its own where there is none" is the test for this; it was red on dev in chromium-390 and webkit-390, and now passes in chromium-1440, chromium-390, webkit-1440 and webkit-390 (one worker, through the slot lock). bun run check: 0 errors. The other toast-bar test ("a toast is the bar, then the bar comes back") still fails in WebKit, a separate cause, handled in the next PR.

🤖 Generated with Claude Code

Fixes #324. **Cause.** `BottomBar` attached itself to the toast system for as long as it was mounted. Notes and Settings both stay mounted under each other (#173), the one underneath being `inert` and hidden. So on a phone, Settings' bar counted as "a bar on screen". Deleting a note goes back to the list, which has no bar of its own; the Undo toast was handed to Settings' hidden bar instead of falling back to Sonner's stack, and never showed. I found it by dumping the Undo button's ancestors in the failing run: `DIV.tab-layer off INERT` > `.settings` > `.bar-wrap` > `.row.bar-toast`, all `visibility: hidden`. **Fix.** `BottomBar` has an `active` prop (Shell, PhoneStack and Settings pass theirs, the same one that already marks them inert) and attaches only while it is true. **Evidence.** `toast-bar.spec.ts` "a toast that leaves its screen carries on: in the next bar, or on its own where there is none" is the test for this; it was red on dev in chromium-390 and webkit-390, and now passes in chromium-1440, chromium-390, webkit-1440 and webkit-390 (one worker, through the slot lock). `bun run check`: 0 errors. The other toast-bar test ("a toast is the bar, then the bar comes back") still fails in WebKit, a separate cause, handled in the next PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Toasts go only to a bar you can see (#324)
Some checks failed
CI / web (pull_request) Failing after 21s
CI / server (pull_request) Successful in 22s
CI / rust (pull_request) Successful in 1m34s
ba3dadf4dd
Notes and Settings stay mounted under each other, so Settings' bar counted as a bar on screen
while it was hidden and inert. On a phone, deleting a note went back to the list (which has no
bar of its own) and the Undo toast was handed to Settings' hidden bar, never showing. A bar now
attaches only while its screen is active.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
kayg closed this pull request 2026-10-14 20:54:16 +00:00
Some checks failed
CI / web (pull_request) Failing after 21s
CI / server (pull_request) Successful in 22s
CI / rust (pull_request) Successful in 1m34s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!341
No description provided.