Repository navigation
fix(toast): keep folder errors above standard modal backdrops - #22423
Conversation
Co-authored-by: midego <[email protected]>
|
Warning Review limit reachedNext included review available in 25 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Toast layer lift while a modal is open —
src/renderer/src/assets/main.cssadds abody:has([data-slot='dialog-overlay'], [data-slot='sheet-overlay']) [data-sonner-toaster]rule that raises the toaster fromz-index: 40to60(the existing popover tier) only while a standard dialog/sheet overlay is mounted. The base40rule is untouched, so toasts fall back once the overlay unmounts. The new selector's specificity(0,2,1)and its position after the base rule both make it win, so the lift actually takes effect. - Paired-client regression test —
tests/e2e/add-project-error-toast-stacking.spec.tsdrives an invalid host path through the SSH Add Project flow in dark and light, assertingtoast.zIndex > overlay.zIndex, that pointer/focus stay owned by the modal (pointer-events: none, path field still focused), that the tier returns to40after close and for the scroll-lock-only and non-modal-drawer states, and that the higher credential-dialog tier (140) is untouched.
I traced the layering tiers the change interacts with: base toaster 40, dialog/sheet overlay+content 50, popover 60, select/dropdown/context-menu 70, tooltip 90, onboarding 100–130, credential dialogs 140/150. The toast at 60 lands above dialog/sheet content and overlays and below menus, tooltips, and credential dialogs, which is the intended band. The test is non-theatrical — with the bug present, toast = 40 < overlay = 50 fails the toBeGreaterThan assertion — and it is not racing Sonner's auto-dismiss, since the folder error uses ERROR_TOAST_DURATION = 60_000 and the injected action toast uses duration: Infinity. The existing native-chat-stop-layering.test.ts regex still matches the unchanged base rule.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
@coderabbitai review |
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Explicit background launch for both E2E apps —
tests/e2e/add-project-error-toast-stacking.spec.tsnow setsORCA_BACKGROUND_LAUNCH: '1'on the host fixture (orcaAppExtraEnv) and passes the same tolaunchPairedElectronClientviaextraEnv. The spec'sassertHiddenIsolationreadsprocess.env.ORCA_BACKGROUND_LAUNCHinside each app, so without this it failed whenever the caller did not export the flag — which is what CI hit. Both helpers merge the value (orca-app.tsspreadsorcaAppExtraEnvinto the launch env;paired-electron-client.tsforwardsoptions.extraEnvintocreateElectronHomeIsolation), andORCA_BACKGROUND_LAUNCHis not in the home-boundary restricted key set, so the isolated-HOME assertions are unaffected. Test-infra only; no production code changed.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Why no contribution? #22117 (comment) |

ELI5
An invalid-folder error stays readable while the Add Project dialog is open.
What Changed
Raise the existing toast layer from 40 to the existing popover tier 60 only while a standard dialog or modal sheet overlay is present. Match the modal markers instead of scroll-lock state, which menus and selects also use. Add a paired-client Add Project regression test in both themes.
Why
The modal backdrop currently blurs the error behind it. Reusing the established overlay markers and layer tier avoids a second modal-state tracker and avoids lifting every scroll-locked toast. Adapted from @midego1 #22117 with the trigger narrowed to real modal overlays; contributor credit is preserved.
Linked Issue
Fixes #22107 for the standard Add Project path dialogs. Related to #22117.
Visual Proof
Real hidden macOS paired Electron client/runtime over loopback; an invalid host path is submitted through Add Project. Baseline
ba742a86bb4versus this same CSS rule in the prior validation pass. Temporary fixture paths are explicitly redacted in both images; the dialog and toast rendering is otherwise unchanged.Testing
CI exposed that the E2E spec inherited its required background flag from the caller. The host fixture and paired client now explicitly receive
ORCA_BACKGROUND_LAUNCH=1. After rebuilding this branch, both real hidden dark/light paired-client scenarios pass locally (2 tests); rendered screenshots were inspected, and the hidden/unfocused isolated-HOME assertions pass for both apps before and after each flow. Changed-code quality also passes.Current-base renderer types, changed-code quality and three native-chat layer regression tests pass. Prior hidden paired-client journeys: two baseline failures become two passes (dark/light); pointer/focus containment, higher SSH prompt layering, the nonmodal drawer and scroll-lock-only controls were checked. Thirteen prior focused unit tests passed.
Review
Reviewed the standard dialog/sheet markers, default toast tier, native-chat stacking and higher credential-dialog tiers. Toast actions remain blocked while the modal owns pointer/focus containment; they work after closing it.
Agent skill upstream boundary
Notes
Higher-priority dialogs at tiers 110–150 remain above tier-60 toasts. Modal sheets and live select/menu journeys were source-reviewed rather than separately rendered. The paired fixture is loopback, not real SSH. Native Windows/Linux/WSL, mobile and native focus were not run. The local full E2E typecheck retains existing unrelated failures. Required PR Checks, changed-spec E2E and packaging have passed in CI.
Checklist