From 903e8ed93afc5b35d0fa1d33c86da2b3fae9ba9f Mon Sep 17 00:00:00 2001 From: qer Date: Mon, 6 Jul 2026 22:48:01 +0800 Subject: [PATCH] fix(web): clarify archive session confirmation copy (#1428) * fix(web): clarify archive session confirmation copy * fix(web): drop delete mention from archive confirmation copy * feat(web): add archived-sessions restore entry to mobile settings Mobile used a separate settings bottom-sheet with no archived-sessions restore surface, so the archive confirmation pointing users to Settings to restore was untrue on mobile. Add an Archived sessions sub-view to the mobile settings sheet with search, sort and restore, mirroring the desktop Settings tab. * fix(web): refresh mobile archived list and use Input primitive Refresh the archived-sessions list each time the mobile sub-view opens so sessions archived from the mobile switcher show up without remounting the sheet, and replace the hand-rolled search input plus inline svg with the shared Input primitive. * fix(web): use Button primitive for mobile archived restore Render the mobile Archived sessions restore action with the shared Button primitive instead of a hand-rolled button and scoped CSS, matching the desktop archived list and the app's design-system rule. --- .changeset/web-archive-confirm-copy.md | 5 + .../components/mobile/MobileSettingsSheet.vue | 217 +++++++++++++++++- apps/kimi-web/src/i18n/locales/en/mobile.ts | 3 + apps/kimi-web/src/i18n/locales/en/sidebar.ts | 2 +- apps/kimi-web/src/i18n/locales/zh/mobile.ts | 3 + apps/kimi-web/src/i18n/locales/zh/sidebar.ts | 2 +- 6 files changed, 228 insertions(+), 4 deletions(-) create mode 100644 .changeset/web-archive-confirm-copy.md diff --git a/.changeset/web-archive-confirm-copy.md b/.changeset/web-archive-confirm-copy.md new file mode 100644 index 000000000..97ecc63b0 --- /dev/null +++ b/.changeset/web-archive-confirm-copy.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Add an Archived sessions entry to the mobile settings sheet and clarify the archive confirmation to mention restoring from Settings. diff --git a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue index 07697e723..24034c703 100644 --- a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue +++ b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue @@ -6,11 +6,12 @@ @@ -478,4 +626,69 @@ function onLogout(): void { .srow, .srow-sub, .srow-val { font-family: var(--sans); } + +/* Archived sessions sub-view */ +.arch-subhead { + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--space-3); + padding: var(--space-2) var(--space-3) var(--space-1); +} +.arch-back { + display: inline-flex; + align-items: center; + gap: 2px; + border: none; + background: none; + padding: var(--space-1) var(--space-2) var(--space-1) 0; + font-family: var(--font-ui); + font-size: var(--text-base); + color: var(--color-accent-hover); + cursor: pointer; +} +.chev.back { font-size: 20px; } +.arch-count { + font-family: var(--font-ui); + font-size: var(--text-sm); + color: var(--color-text-faint); +} +.arch-tools { + display: flex; + align-items: center; + gap: var(--space-2); + padding: var(--space-2) var(--space-3); + flex-wrap: wrap; +} +.arch-search-input { flex: 1; min-width: 160px; } +.arch-row { + display: flex; + align-items: center; + gap: var(--space-3); + min-height: 56px; + padding: var(--space-2) var(--space-3); + border-top: 1px solid var(--color-line); +} +.arch-row:first-of-type { border-top: none; } +.arch-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } +.arch-name { + font-family: var(--font-ui); + font-size: var(--text-base); + color: var(--color-text); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.arch-time { + font-family: var(--font-mono); + font-size: var(--text-xs); + color: var(--color-text-faint); +} +.arch-empty { + padding: var(--space-6) var(--space-4); + text-align: center; + font-family: var(--font-ui); + font-size: var(--text-sm); + color: var(--color-text-faint); +} diff --git a/apps/kimi-web/src/i18n/locales/en/mobile.ts b/apps/kimi-web/src/i18n/locales/en/mobile.ts index 01dc4ecd4..ae60023dd 100644 --- a/apps/kimi-web/src/i18n/locales/en/mobile.ts +++ b/apps/kimi-web/src/i18n/locales/en/mobile.ts @@ -16,4 +16,7 @@ export default { permYoloSub: 'auto-approve all', planModeSub: 'Plan mode', swarmModeSub: 'Swarm mode', + archivedSessions: 'Archived sessions', + archivedSessionsSub: 'Browse and restore archived sessions', + archivedBack: 'Back', } as const; diff --git a/apps/kimi-web/src/i18n/locales/en/sidebar.ts b/apps/kimi-web/src/i18n/locales/en/sidebar.ts index cda064d44..3bb705ca3 100644 --- a/apps/kimi-web/src/i18n/locales/en/sidebar.ts +++ b/apps/kimi-web/src/i18n/locales/en/sidebar.ts @@ -12,7 +12,7 @@ export default { newChat: 'New Chat', newWorkspace: 'New Workspace', emptyState: 'No sessions yet · click New Session to start', - archiveConfirm: 'Archive session?', + archiveConfirm: 'Archive this session? You can restore it later from Settings.', options: 'Options', rename: 'Rename', copyPath: 'Copy path', diff --git a/apps/kimi-web/src/i18n/locales/zh/mobile.ts b/apps/kimi-web/src/i18n/locales/zh/mobile.ts index f4f8690f7..22799adf2 100644 --- a/apps/kimi-web/src/i18n/locales/zh/mobile.ts +++ b/apps/kimi-web/src/i18n/locales/zh/mobile.ts @@ -16,4 +16,7 @@ export default { permYoloSub: '全部自动批准', planModeSub: '计划模式', swarmModeSub: 'Swarm 模式', + archivedSessions: '已归档会话', + archivedSessionsSub: '查看并恢复已归档会话', + archivedBack: '返回', } as const; diff --git a/apps/kimi-web/src/i18n/locales/zh/sidebar.ts b/apps/kimi-web/src/i18n/locales/zh/sidebar.ts index 473f3eeca..bea56f556 100644 --- a/apps/kimi-web/src/i18n/locales/zh/sidebar.ts +++ b/apps/kimi-web/src/i18n/locales/zh/sidebar.ts @@ -12,7 +12,7 @@ export default { newChat: '新建对话', newWorkspace: '新建工作区', emptyState: '还没有会话 · 点击 新建会话 开始', - archiveConfirm: '归档会话?', + archiveConfirm: '确认归档会话?归档后可以从「设置」中恢复', options: '选项', rename: '重命名', copyPath: '复制路径',