Skip to content

fix(ui): toasts sit above the notification cards; the Codex ~/.codex notice is a card - #36167

Merged
nwparker merged 2 commits into
mainfrom
nwparker/toast-above-notification-cards
Oct 29, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/toast-above-notification-cards

Conversation

@nwparker

@nwparker nwparker commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​84 $\color{#cf222e}{\Huge{\mathbf{−}}}$​20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​64
Prod 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​128 $\color{#cf222e}{\Huge{\mathbf{−}}}$​41 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​87

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 ~/.codex notice 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

  • Before:
    • The toaster (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.
    • So the cards covered the toasts, and a 64 px strip of each toast stuck out over the main column.
    • The Codex shared-settings notice (terminal-pane/codex-shared-settings-notice.ts) was a toast with duration: Infinity.
  • After:
    • Card stack height. NotificationCardStack measures 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.
    • Toaster offset. The toaster's bottom offset adds that variable, so toasts start right above the cards, and its right offset is 1rem to line up with them. With no cards, the offset is exactly the old one.
    • Notice card. The Codex notice is CodexSharedSettingsNoticeCard, in the card stack. It's built from the standard Card parts 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

  • Stack toasts above the cards instead of raising their z-index. Raising the toasts would just hide the cards instead.
  • A measured CSS variable instead of a fixed extra offset. The stack's height changes with its cards, and the offset falls back to the old one when it's empty.
  • A card, not a toast, for the notice. The style guide keeps toasts for transient results. A sticky, read-once notice belongs with the update and star cards.
  • The new card uses 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:

Sidebar open Sidebar closed
1024 (screenshot removed: contained real product data) (screenshot removed: contained real product data)
1440 (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Measured in each layout:

  • The toast's bottom is above the cards' top: 273 < 293 at 1024, and 405 < 425 at 1440.
  • The Codex notice renders as a card.
  • With the right sidebar open, Stop hit-tests to itself, and a real click on it ended the running turn:

(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:

    • it publishes the height plus the gap, and clears it when the stack empties;
    • it clears it on unmount;
    • a mutation that stops publishing fails the test.
  • codex-shared-settings-notice.test.ts was updated for the card. 5 cases:

    • shows once on Windows and marks it seen;
    • hides when dismissed;
    • quiet off Windows;
    • quiet in a paired web window;
    • shows after the persisted flag loads.
  • StarNagCard.test.tsx still passes.

  • The CDP run above used ORCA_BACKGROUND_LAUNCH=1 and a throwaway user-data folder. No window was shown or focused.

  • Also run:

    • pnpm tc and typecheck:ci;
    • check:code-quality:changed, including the design-system gate;
    • the anti-slop lint, oxlint and ast-grep;
    • the localization verifies: catalogs, catalog, extraction and coverage.
  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

  • Renderer only, with no IPC or wire change.
  • The ResizeObserver fires only when the card stack changes size.
  • The sub-600 px toaster breakpoint uses the same offset.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…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.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 49eeacff-f1dc-4c48-a8eb-96f16055e579
Commits

Reviewing files that changed from the base of the PR and between 15a02f7 and 280e167.

Files selected for processing: 20
  • src/renderer/src/app-shell/AppRootSurfaces.tsx
  • src/renderer/src/app-shell/use-app-shell-services.ts
  • src/renderer/src/components/CodexSharedSettingsNoticeCard.tsx
  • src/renderer/src/components/NotificationCardStack.test.tsx
  • src/renderer/src/components/NotificationCardStack.tsx
  • src/renderer/src/components/terminal-pane/codex-shared-settings-notice.test.ts
  • src/renderer/src/components/terminal-pane/codex-shared-settings-notice.ts
  • src/renderer/src/components/ui/sonner.tsx
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/notification-card-stack-height.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 400266a into main Oct 29, 2026
49 checks passed
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