From c43ac3fc3c6c652b7490e69a5fbcaf46a07368f0 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Mon, 12 Oct 2026 01:22:21 -0700 Subject: [PATCH] Resume dialog: show a finished resume as a result, not a picker (#27732) * fix(native-chat): show a finished resume as a result, not a picker Once a resume starts and no chat is left to choose, the dialog drops the Select all row and the checkbox column, so each chat's check reads as its status instead of a ticked box. The Don't-ask-again box only shows while choosing; a run started by the launch's auto-resume says so and links to the setting. The finished description is past tense. * fix(i18n): keep Agent untranslated in the ja resume copy * fix(native-chat): keep resume results actionable and keyboard accessible * Fix hidden resume preference replay after run starts * Consume resume picker preference after applying it * fix(native-chat): keep Don't ask again after Resume while auto-resume is off The box now shows on the result view too whenever the setting is off and the user started the resume, and saves only while it is visible, so a hidden tick still never replays. Automatic launches keep their 'Resumed automatically' note instead. --- .../components/NativeChatResumeAutoNote.tsx | 53 ++++ .../NativeChatResumeOnRestartGroups.tsx | 59 +++-- ...tiveChatResumeOnRestartModal.list.test.tsx | 13 +- .../NativeChatResumeOnRestartModal.test.tsx | 10 +- .../NativeChatResumeOnRestartModal.tsx | 193 +++++++-------- .../components/NativeChatResumeRunPanel.tsx | 42 +++- .../components/NativeChatResumeTreeRow.tsx | 61 +++-- .../native-chat-resume-on-restart-store.ts | 13 +- .../native-chat-resume-result-view.test.tsx | 232 ++++++++++++++++++ .../components/native-chat-resume-run.test.ts | 2 +- .../src/components/native-chat-resume-run.ts | 17 +- .../native-chat-resume-tree-keys.ts | 49 ++++ .../native-chat-resume-tree-state.ts | 3 + .../NativeChatExperimentalSetting.tsx | 6 +- .../native-chat-resume-setting-target.ts | 2 + src/renderer/src/i18n/locales/en.json | 14 +- src/renderer/src/i18n/locales/es.json | 14 +- src/renderer/src/i18n/locales/fr.json | 14 +- src/renderer/src/i18n/locales/ja.json | 14 +- src/renderer/src/i18n/locales/ko.json | 14 +- src/renderer/src/i18n/locales/zh.json | 14 +- 21 files changed, 650 insertions(+), 189 deletions(-) create mode 100644 src/renderer/src/components/NativeChatResumeAutoNote.tsx create mode 100644 src/renderer/src/components/native-chat-resume-result-view.test.tsx create mode 100644 src/renderer/src/components/native-chat-resume-tree-keys.ts create mode 100644 src/renderer/src/components/settings/native-chat-resume-setting-target.ts diff --git a/src/renderer/src/components/NativeChatResumeAutoNote.tsx b/src/renderer/src/components/NativeChatResumeAutoNote.tsx new file mode 100644 index 00000000000..d8e325994fc --- /dev/null +++ b/src/renderer/src/components/NativeChatResumeAutoNote.tsx @@ -0,0 +1,53 @@ +import { translate } from '@/i18n/i18n' +import { useAppStore } from '../store' +import { Button } from './ui/button' +import { NATIVE_CHAT_RESUME_SETTING_SECTION_ID } from './settings/native-chat-resume-setting-target' + +/** + * Says a run started on its own, in the place the "Don't ask again" box takes in the picker, and + * where to change that. Only a run this launch's preference started gets it. + */ +export function NativeChatResumeAutoNote({ + inFlight, + onOpenSettings +}: { + inFlight: boolean + /** Closes the dialog so the settings page is not left under it. */ + onOpenSettings: () => void +}): React.JSX.Element { + const openSettingsPage = useAppStore((state) => state.openSettingsPage) + const openSettingsTarget = useAppStore((state) => state.openSettingsTarget) + return ( +