Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

fix(open-knowledge): keep PATH toast clear of consent dialog (#2498)

sarahd37bd072119a
diff --git a/.changeset/consent-toast-bottom-left.md b/.changeset/consent-toast-bottom-left.md
new file mode 100644
index 000000000..8ade6c0b0
--- /dev/null
+++ b/.changeset/consent-toast-bottom-left.md
@@ -0,0 +1,5 @@
+---
+"@inkeep/open-knowledge": patch
+---
+
+Keep the first-launch "Added ok to your PATH" notification clear of the MCP consent dialog. It now anchors bottom-left instead of covering the dialog's Add/Skip buttons, and toasts once again render above modal overlays so notifications from in-dialog forms stay visible and dismissible.
diff --git a/packages/app/src/globals.css b/packages/app/src/globals.css
index 8a0a42db8..ca26c2bfa 100644
--- a/packages/app/src/globals.css
+++ b/packages/app/src/globals.css
@@ -5133,21 +5133,6 @@ html.electron-mode [data-slot="sidebar-inner"] {
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;
-}
-
.inline-code {
@apply font-mono bg-muted text-inherit border border-border rounded-md px-1 py-0.5 text-sm;
}
diff --git a/packages/app/src/lib/install-onboarding-toast.ts b/packages/app/src/lib/install-onboarding-toast.ts
index e0497e743..837b21c79 100644
--- a/packages/app/src/lib/install-onboarding-toast.ts
+++ b/packages/app/src/lib/install-onboarding-toast.ts
@@ -61,6 +61,12 @@ export function installOnboardingToastListener(opts: {
const pathTouched = payload.path.status !== 'none';
sonnerToast[hasFailure ? 'error' : 'success'](message, {
duration: hasFailure || pathTouched ? STICKY_TOAST_DURATION_MS : TOAST_DURATION_MS,
+ // Anchor this startup toast bottom-left so it never covers a modal's
+ // primary action. It fires concurrently with the first-launch MCP
+ // consent dialog, whose Add/Skip footer is bottom-right; a default
+ // (bottom-right) toast overlaps and steals those clicks. Scoped to this
+ // toast only — the global toaster position is unchanged.
+ position: 'bottom-left',
});
return;
}
diff --git a/packages/desktop/tests/smoke/mcp-wiring.e2e.ts b/packages/desktop/tests/smoke/mcp-wiring.e2e.ts
index cd744d3e7..48bcbef40 100644
--- a/packages/desktop/tests/smoke/mcp-wiring.e2e.ts
+++ b/packages/desktop/tests/smoke/mcp-wiring.e2e.ts
@@ -239,6 +239,63 @@ test.describe('M6b first-launch MCP-wiring smoke (US-010)', () => {
}
});
+ test('startup PATH toast is anchored bottom-left and never covers consent Add/Skip', async ({
+ captureStderrFor,
+ }) => {
+ const tmpHome = createTmpHome('toast-position');
+ seedEditorDetectionDirs(tmpHome, ['.claude']);
+ try {
+ const app = await launchApp({ tmpHome });
+ captureStderrFor(app);
+ const window = await waitForConsentDialog(app);
+
+ // Deterministically seed the real "Added ok to your PATH" startup toast
+ // through the same `ok:onboarding:toast` IPC the app fires on first
+ // launch (payload mirrors the startup-reclaim path-installed leg). On
+ // developer machines the CLI is already on PATH, so the natural toast
+ // never fires — seeding makes this collision test machine-independent.
+ // The original regression (#2387/#2396) only reproduced on fresh CI
+ // installs, which is exactly how it slipped past review.
+ await app.evaluate(
+ ({ BrowserWindow }, payload) => {
+ for (const w of BrowserWindow.getAllWindows()) {
+ w.webContents.send('ok:onboarding:toast', payload);
+ }
+ },
+ {
+ kind: 'startup-reclaim',
+ mcp: { status: 'none' },
+ path: { status: 'installed', summary: 'Added ok to your PATH' },
+ },
+ );
+
+ // Contract: this toast renders in a bottom-LEFT toaster region. The
+ // consent dialog's Add/Skip footer is bottom-right, so a default
+ // (bottom-right) toast overlaps and steals those clicks. Asserting the
+ // region position pins the fix regardless of window size — if the
+ // `position: 'bottom-left'` in install-onboarding-toast.ts is dropped,
+ // sonner falls back to bottom-right and this fails.
+ await expect(
+ window.locator(
+ '[data-sonner-toaster][data-y-position="bottom"][data-x-position="left"] [data-sonner-toast]',
+ ),
+ ).toBeVisible();
+
+ // Belt-and-suspenders: Add stays clickable with the toast present
+ // (Playwright throws "intercepts pointer events" if a toast covers it)
+ // and consent still completes.
+ await window.getByTestId('mcp-consent-add').click();
+ await expect
+ .poll(() => readMarker(tmpHome), {
+ timeout: 15_000,
+ message: 'marker not written after Add click with startup toast present',
+ })
+ .not.toBeNull();
+ } finally {
+ forceRemove([], tmpHome);
+ }
+ });
+
test('skip — writes configured:false marker and no editor configs', async ({
captureStderrFor,
}) => {