Repository navigation
fix(ui): toasts sit above the notification cards; the Codex ~/.codex notice is a card - #36167
Merged
Merged
Conversation
…notice is a card NotificationCardStack publishes its height so the toaster stacks above it instead of rendering behind it (z-47 under z-50), and lines up with the cards at 1rem. The one-time Codex shared settings notice moves from a sticky toast into the card stack.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flag-off: applies with the flag on or off. It changes where every toast sits while a notification card shows, on every platform. The Codex
~/.codexnotice is Windows desktop only, as before.User-risk: Low. With no notification cards showing, toasts sit exactly where they did before. With cards showing, toasts now appear above the cards instead of hidden behind them. The one-time Codex notice is now a card you close with its X.
ELI5
The bottom-right corner of Orca holds two separate stacks: short pop-up toasts, and longer-lived notification cards (Update Available, the GitHub star prompt). They didn't know about each other. When both showed, the cards were drawn on top of the toasts, so a toast was mostly hidden. Only a narrow strip of it poked out to the left, and in a Codex chat that strip landed on the chat's Stop button and swallowed the click.
Now toasts stack above the cards. The one-time "Codex in Orca now uses ~/.codex" notice, which never closed on its own, becomes a card next to the other cards, which is where long-lived notices belong.
What Changed
components/ui/sonner.tsx) sat 2.5rem up, at the toast library's default 24 px from the right, 416 px wide, at z-index 47.NotificationCardStack(update, sign-out and star cards) sat at the same 2.5rem, 16 px from the right, 360 px wide, at z-index 50.terminal-pane/codex-shared-settings-notice.ts) was a toast withduration: Infinity.NotificationCardStackmeasures itself with a ResizeObserver and publishes--notification-card-stack-height(its height plus the 0.5rem gap) on the document root. It clears the variable when the stack is empty or unmounted.CodexSharedSettingsNoticeCard, in the card stack. It's built from the standardCardparts with a ghost icon close button. It keeps the same seen flag and the same "mark seen before showing" rule, so it still shows once, and it keeps its title and description text. One new label,terminal.codexSharedSettingsNotice.dismiss, is translated in every locale.Why
Card's own spacing, rather than the overrides the star card carries, so it passes the design-system gate.Linked Issue
Internal tracker: a toast covered the Stop button of a Codex chat on a Windows WSL test machine.
Visual Proof
Before, on the Windows WSL test machine: the Codex notice toast is hidden behind the Update and star cards, and its exposed strip covers the chat's Stop button.
(screenshot removed: contained real product data)
After, in a hidden dev window (CDP). The scene has a real toast ("An installed Orca skill is out of date"), the Update Available card, the Codex notice as a card, and a running Codex chat:
Measured in each layout:
(screenshot removed: contained real product data)
Unchanged by this PR: with the right sidebar closed (the two "Sidebar closed" shots), the notification cards themselves cover the chat composer's Stop button. The card stack's position is unchanged, and an Update or star card alone covered it the same way before. It's tracked as follow-up STA-12887 and not attempted here.
Testing
New
NotificationCardStack.test.tsx:codex-shared-settings-notice.test.tswas updated for the card. 5 cases:StarNagCard.test.tsxstill passes.The CDP run above used
ORCA_BACKGROUND_LAUNCH=1and a throwaway user-data folder. No window was shown or focused.Also run:
pnpm tcandtypecheck:ci;check:code-quality:changed, including the design-system gate;I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)