Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix(open-knowledge): keep toaster below open modal overlays (#2396)
mike-inkeep5c9e245b93de
diff --git a/.changeset/toaster-below-modal-overlay.md b/.changeset/toaster-below-modal-overlay.mdnew file mode 100644index 000000000..2d773e269--- /dev/null+++ b/.changeset/toaster-below-modal-overlay.md@@ -0,0 +1,5 @@+---+'@inkeep/open-knowledge': patch+---++Keep the toast stack below an open modal dialog or sheet. The previous toast fix made toasts clickable while a modal Radix layer is open, but sonner's toaster renders above the dialog, so a toast overlapping the modal (like the first-launch "Added ok to your PATH" notice over the MCP consent dialog) intercepted clicks aimed at the modal's own buttons. While a Dialog or Sheet overlay is mounted the toaster now sits under the overlay: the modal stays fully clickable, the toast shows dimmed without pretending to be interactive, and it becomes clickable again as soon as the modal closes.diff --git a/packages/app/src/globals.css b/packages/app/src/globals.cssindex 5bc95765a..a91e88605 100644--- a/packages/app/src/globals.css+++ b/packages/app/src/globals.css@@ -5116,3 +5116,18 @@ html.electron-mode [data-slot="sidebar-inner"] {[data-sonner-toast] {pointer-events: auto;}++/* While a modal Radix layer is open (a Dialog/Sheet overlay is mounted), the+ toaster must sit BELOW the overlay (z-50): sonner's inline z-index+ 999999999 would otherwise paint the toast over the modal, and — with the+ pointer-events restore above — the toast box would also intercept clicks+ aimed at the modal's own controls (e.g. the first-launch "Added ok to your+ PATH" toast covering the MCP consent dialog's Add/Skip buttons). Under the+ overlay the toast renders dimmed — no+ false affordance while the modal owns the screen — and regains+ interactivity the moment the modal closes. `!important` because sonner+ sets the z-index inline on the toaster element. */+body:has([data-slot="dialog-overlay"], [data-slot="sheet-overlay"]) [data-sonner-toaster] {+ /* biome-ignore lint/complexity/noImportantStyles: sonner sets z-index inline on the toaster; only !important can beat an inline style. */+ z-index: 40 !important;+}