From 8ea99ef9ad14f78d996b204c26cd9d312a04d8b3 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Sun, 6 Sep 2026 02:42:12 -0400 Subject: [PATCH] fix(tui): dismiss update notification only on skip --- packages/tui/src/component/dialog-update.tsx | 12 +++++++++++- packages/tui/src/context/update-notification.tsx | 4 +--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/tui/src/component/dialog-update.tsx b/packages/tui/src/component/dialog-update.tsx index b529b795450..83f7ccda363 100644 --- a/packages/tui/src/component/dialog-update.tsx +++ b/packages/tui/src/component/dialog-update.tsx @@ -10,6 +10,7 @@ import { Spinner } from "./spinner" export function DialogUpdate(props: { check?: (signal: AbortSignal) => Promise state: () => UpdateState | undefined + skip: () => void install: () => Promise restart: () => void }) { @@ -47,7 +48,16 @@ export function DialogUpdate(props: { : type === "installed" ? { label: "Restart", run: props.restart } : undefined - return [{ label: "Skip", run: () => dialog.clear() }, ...(confirm ? [confirm] : [])] + return [ + { + label: "Skip", + run: () => { + props.skip() + dialog.clear() + }, + }, + ...(confirm ? [confirm] : []), + ] }) createEffect(() => setActive(Math.max(0, buttons().length - 1))) diff --git a/packages/tui/src/context/update-notification.tsx b/packages/tui/src/context/update-notification.tsx index b05ef66cd8a..be2b9155355 100644 --- a/packages/tui/src/context/update-notification.tsx +++ b/packages/tui/src/context/update-notification.tsx @@ -95,14 +95,12 @@ export const { use: useUpdateNotification, provider: UpdateNotificationProvider // The notification can predate an installation through /update. if (known && active?.type !== "installing" && !(active?.type === "installed" && active.version === known.version)) setState({ type: known.type, version: known.version }) - // Manual checks hide the current notice without marking the version as seen. - if (origin === "manual") setNotification(undefined) - if (origin === "notification") dismiss() const status = state()?.type dialog.replace(() => (