From fd8871c5b1450bb6f373caa0f47f841c6b293487 Mon Sep 17 00:00:00 2001 From: qer Date: Mon, 6 Jul 2026 20:22:49 +0800 Subject: [PATCH 1/5] fix(web): clarify archive session confirmation copy --- .changeset/web-archive-confirm-copy.md | 5 +++++ apps/kimi-web/src/i18n/locales/en/sidebar.ts | 2 +- apps/kimi-web/src/i18n/locales/zh/sidebar.ts | 2 +- 3 files changed, 7 insertions(+), 2 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 0000000000..82a7cd3f18 --- /dev/null +++ b/.changeset/web-archive-confirm-copy.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +web: Clarify the archive confirmation to mention restoring or deleting from Settings. diff --git a/apps/kimi-web/src/i18n/locales/en/sidebar.ts b/apps/kimi-web/src/i18n/locales/en/sidebar.ts index cda064d444..d9634b40dd 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 or permanently delete it later from Settings.', options: 'Options', rename: 'Rename', copyPath: 'Copy path', diff --git a/apps/kimi-web/src/i18n/locales/zh/sidebar.ts b/apps/kimi-web/src/i18n/locales/zh/sidebar.ts index 473f3eecad..da8b2b43e8 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: '复制路径', From 1d2c6869cc215c14fafb6a0953ecf7b1dc88a619 Mon Sep 17 00:00:00 2001 From: qer Date: Mon, 6 Jul 2026 20:30:59 +0800 Subject: [PATCH 2/5] fix(web): drop delete mention from archive confirmation copy --- .changeset/web-archive-confirm-copy.md | 2 +- apps/kimi-web/src/i18n/locales/en/sidebar.ts | 2 +- apps/kimi-web/src/i18n/locales/zh/sidebar.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/web-archive-confirm-copy.md b/.changeset/web-archive-confirm-copy.md index 82a7cd3f18..79bfe1c95b 100644 --- a/.changeset/web-archive-confirm-copy.md +++ b/.changeset/web-archive-confirm-copy.md @@ -2,4 +2,4 @@ "@moonshot-ai/kimi-code": patch --- -web: Clarify the archive confirmation to mention restoring or deleting from Settings. +web: Clarify the archive confirmation to mention restoring from Settings. diff --git a/apps/kimi-web/src/i18n/locales/en/sidebar.ts b/apps/kimi-web/src/i18n/locales/en/sidebar.ts index d9634b40dd..3bb705ca36 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 this session? You can restore it or permanently delete it later from Settings.', + 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/sidebar.ts b/apps/kimi-web/src/i18n/locales/zh/sidebar.ts index da8b2b43e8..bea56f556a 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: '复制路径', From 0fb2f9684f15b97fd41721bc304be0e914153ed6 Mon Sep 17 00:00:00 2001 From: qer Date: Mon, 6 Jul 2026 20:52:08 +0800 Subject: [PATCH 3/5] 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. --- .changeset/web-archive-confirm-copy.md | 2 +- .../components/mobile/MobileSettingsSheet.vue | 241 +++++++++++++++++- apps/kimi-web/src/i18n/locales/en/mobile.ts | 3 + apps/kimi-web/src/i18n/locales/zh/mobile.ts | 3 + 4 files changed, 246 insertions(+), 3 deletions(-) diff --git a/.changeset/web-archive-confirm-copy.md b/.changeset/web-archive-confirm-copy.md index 79bfe1c95b..97ecc63b08 100644 --- a/.changeset/web-archive-confirm-copy.md +++ b/.changeset/web-archive-confirm-copy.md @@ -2,4 +2,4 @@ "@moonshot-ai/kimi-code": patch --- -web: Clarify the archive confirmation to mention restoring from Settings. +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 07697e7231..d5305da7e8 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 +619,100 @@ 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 { + flex: 1; + min-width: 160px; + height: 34px; + display: flex; + align-items: center; + gap: var(--space-2); + padding: 0 var(--space-3); + border: 1px solid var(--color-line); + border-radius: var(--radius-md); + background: var(--color-bg); + color: var(--color-text-faint); + font-size: var(--text-sm); +} +.arch-search:focus-within { border-color: var(--color-accent); box-shadow: var(--p-focus-ring); color: var(--color-text-muted); } +.arch-search svg { width: 15px; height: 15px; flex: none; } +.arch-search input { width: 100%; border: none; outline: none; background: transparent; font: inherit; color: var(--color-text); } +.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-restore { + flex: none; + border: 1px solid var(--color-line); + border-radius: var(--radius-md); + background: var(--color-surface-sunken); + color: var(--color-text); + font-family: var(--font-ui); + font-size: var(--text-sm); + font-weight: var(--weight-medium); + padding: var(--space-1) var(--space-3); + min-height: 32px; + cursor: pointer; +} +.arch-restore:hover { background: var(--color-line); } +.arch-restore:active { background: var(--color-surface-sunken); } +.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 01dc4ecd4c..ae60023dd6 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/zh/mobile.ts b/apps/kimi-web/src/i18n/locales/zh/mobile.ts index f4f8690f73..22799adf2f 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; From 3d5b7998c67c45281a4e41cb3a5b04938af4cad4 Mon Sep 17 00:00:00 2001 From: qer Date: Mon, 6 Jul 2026 22:17:28 +0800 Subject: [PATCH 4/5] 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. --- .../components/mobile/MobileSettingsSheet.vue | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue index d5305da7e8..401022e722 100644 --- a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue +++ b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue @@ -21,6 +21,7 @@ import { } from '../../lib/modelThinking'; import BottomSheet from '../dialogs/BottomSheet.vue'; import LanguageSwitcher from '../settings/LanguageSwitcher.vue'; +import Input from '../ui/Input.vue'; import SegmentedControl from '../ui/SegmentedControl.vue'; const { t } = useI18n(); @@ -167,8 +168,9 @@ const archiveSort = ref<'archived-desc' | 'created-desc' | 'name-asc'>('archived const ARCHIVED_PAGE_SIZE = 100; async function loadAllArchived(): Promise { - if (archivedLoading.value || archivedLoaded.value) return; + if (archivedLoading.value) return; archivedLoading.value = true; + archivedLoaded.value = false; try { const all: AppSession[] = []; let beforeId: string | undefined; @@ -191,7 +193,8 @@ async function loadAllArchived(): Promise { function openArchived(): void { view.value = 'archived'; - if (!archivedLoaded.value) void loadAllArchived(); + archiveQuery.value = ''; + void loadAllArchived(); } function backToMain(): void { @@ -406,10 +409,13 @@ watch(
- + Date: Mon, 6 Jul 2026 22:41:29 +0800 Subject: [PATCH 5/5] 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. --- .../components/mobile/MobileSettingsSheet.vue | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue index 401022e722..24034c703f 100644 --- a/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue +++ b/apps/kimi-web/src/components/mobile/MobileSettingsSheet.vue @@ -21,6 +21,7 @@ import { } from '../../lib/modelThinking'; import BottomSheet from '../dialogs/BottomSheet.vue'; import LanguageSwitcher from '../settings/LanguageSwitcher.vue'; +import Button from '../ui/Button.vue'; import Input from '../ui/Input.vue'; import SegmentedControl from '../ui/SegmentedControl.vue'; @@ -436,7 +437,7 @@ watch(
{{ s.title }}
{{ t('settings.archivedAt', { time: archiveTime(s.updatedAt) }) }}
- + @@ -683,21 +684,6 @@ watch( font-size: var(--text-xs); color: var(--color-text-faint); } -.arch-restore { - flex: none; - border: 1px solid var(--color-line); - border-radius: var(--radius-md); - background: var(--color-surface-sunken); - color: var(--color-text); - font-family: var(--font-ui); - font-size: var(--text-sm); - font-weight: var(--weight-medium); - padding: var(--space-1) var(--space-3); - min-height: 32px; - cursor: pointer; -} -.arch-restore:hover { background: var(--color-line); } -.arch-restore:active { background: var(--color-surface-sunken); } .arch-empty { padding: var(--space-6) var(--space-4); text-align: center;