Repository navigation
fix(i18n): title the AI drawer with the top-bar button's name in every locale - #34930
Conversation
…y locale Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
|
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa Red check read (area o3-H) · 2026-11-17T16:53Z
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa Red check read (area o3-H) · 2026-11-17T17:34Z
|
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d) · 2026-11-17T17:58ZL1: REWORK Read against claim 6951092301 and report 6954317851 on #34827.
This is paper only. Once the claim is amended, this head is ACCEPT, with no push needed. What holds
Must-fix
Should-fixNone. Notes
Landing: not governed, and all checks are green on this exact head. After the M1 amendment, area o3-H lands it. A later push owes a delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d) · 2026-11-17T18:00ZL1: ACCEPT This is a same-head ACCEPT on the paper REWORK in 6956430137. The head is unchanged. Must-fixNone. M1 is closed: claim amendment 6956443862 on #34827 adds Should-fixNone. NotesNone beyond 6956430137. Landing: not governed, and CI is green on this exact head (45 success, 13 skipped). Area o3-H lands it. A later push owes a delta read. |
|
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa Landing (area o3-H) · 2026-11-17T18:01Z
State change: ready + auto-merge enabled. |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa
Fixes #34827
Clause-②: no
Metadata-protocol: none
维护者速读
console.ai.dock.title的值,外加抽屉组件里同一个键的英文兜底文字;不动布局和行为。回滚即 revert 本 PR。ui/packages/i18n/src/locales/zh-Hans.ts与en.ts的dock.title一行;ui/packages/app-shell/src/layout/ChatDock.tsx两处defaultValue;新测试ChatDock.titleMatchesTopBar-34827.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/layout/__tests__/ChatDock.titleMatchesTopBar-34827.test.tsx,预期 4 个用例全过;或在中文界面点顶栏机器人,抽屉标题与按钮提示同为「AI 助手」。What changes
console.ai.dock.titlenow carries the same value astopbar.aiAssistant(the key the top-bar robot reads for itsaria-labelandtitle) in all eleven built-in packs:That one key is the title of all three drawer forms: the side rail and the window-filling form (
ChatDockPanel, the same header in both) and the phone sheet (ChatDockMobileSheet). Nothing passes atitleprop to either in the Console (useConsoleChatDockmounts both without one), and the Studio panel no longer mountsChatDockPanel, so the value change reaches exactly the drawer.ChatDock.tsx: the two inlinedefaultValues for that key change from'Assistant'to'AI Assistant'. This is not optional:check-i18n-call-site-keysrequires every literal inline default to equal the en value, and its test (scripts/__tests__/check-i18n-call-site-keys.test.ts, "main carries no drift") went red on the value change alone. No layout or behaviour change.The dispatch named the en button as
aiChat: 'AI assistant'. That key isconsole.shortcuts.groups.aiChat, the keyboard-shortcuts dialog's group heading. The robot readstopbar.aiAssistant(AssistantTopBarButton), whose en value isAI Assistant, so that is the value matched.console-namespace-3546.test.tsxcarried Frenchdock.title=Assistantas its one permitted en-identical cognate; French now readsAssistant IA, so the exemption set is empty and the test now pins that the three French values containing the word differ from en. One comment inmarketplace-preview-namespace-3546.test.tsxthat counted that cognate is corrected.Item 2: other self-names in the same panel
Checked against the keys the drawer actually renders (
ChatDock.tsx,ChatDockConversation.tsxand what it mounts:ChatPanefromAiChatPage.tsx,ConversationsSidebar.tsx):console.ai.dock.description(phone sheet, screen-reader only)ConversationsSidebar(history list):chats,noChatsYet,noChatsDescription,searchChats,newChatconsole.ai.empty.build.*,console.ai.empty.ask.*(empty states)console.ai.unavailableTitle/unavailableDescriptionconsole.ai.switchAssistant,chooseAgent,loadingAgents,offlineDemoModeconsole.ai.assistantChatPanewhen no agent is found.ChatPaneis shared with the Studio panel (StudioAiCopilot), so changing it would rename text there too (#34725's scope); unchangedconsole.ai.emptyDescriptionChatPane; same reason; unchangedconsole.ai.dock.openChatDockLauncher, which no Console path mounts (only its own test renders it); unchangedTests
ui/packages/app-shell/src/layout/__tests__/ChatDock.titleMatchesTopBar-34827.test.tsx(its own file because the existing ChatDock harnesses mockuseObjectTranslationwith the inline defaults and cannot see a pack value). RealAssistantTopBarButton,ChatDockPanel,ChatDockMobileSheet, realI18nProviderand packs:调整对话宽度/Resize chat), so a pack that never loaded is not read as a pass;console.ai.dock.title === topbar.aiAssistant.scripts/ablation-replace.mjsput zh-Hansdock.titleback to'助手'(the mutated blob77e56f98equals the zh-Hans blob onorigin/main), and the pin went red on the three zh cases with the en case green (Tests 3 failed | 1 passed (4)); restore verified by blob hash against HEAD and an emptygit diff HEAD.Verification
All readings below are on head
b34dabff8(the branch withorigin/mainfc5913e1merged in), on a shared container.Pin, package tests and type-check (through the shared verification lock)
pnpm --dir ui exec vitest run packages/i18n/ packages/app-shell/src/layout/:Test Files 243 passed (243),Tests 2890 passed | 13 skipped (2903); the new pin is in that set.pnpm --dir ui exec vitest run scripts/__tests__/check-i18n-call-site-keys.test.ts:Tests 152 passed (152)(this file was red, 3 failures, before thedefaultValuealignment).pnpm --filter @object-ui/i18n run type-checkexit 0;pnpm --filter @object-ui/app-shell run type-checkexit 0.en.ts, from the ui root and from each package dir: exit 0, no output.Test UI: the diff changes one string literal in app-shell, and no app-shell test outsidelayout/reads that key.Eager budget (merged tree)
pnpm --dir ui/apps/console exec vite build, thenpnpm --dir ui run check:eager-closureexit 0:i18n-locale-en 60.4 KB / 60.5 KB ceiling (headroom 0.2 KB); the report gives the chunk asgzipBytes: 61818against the62_000ceiling, so 182 bytes are left. The ceiling is not touched.Derived gate families
node scripts/pm/dispatch-gates.mjs --commandsderived 40 commands. 39 were re-run onb34dabff8, each:: exit 0. The 40th,pnpm --dir ui exec vitest run scripts/, was run on6069d44b(before thedefaultValuefix):Test Files 1 failed | 170 passed | 2 skipped (173), and the one failing file is the call-site-keys test, now green as shown above.--ranreconciliation:40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN.Also run:
check-i18n-call-site-keys.mjs,check-i18n-en-drift.mjs(Every changed en value was followed by all 10 translation packs.),check-i18n-dead-keys.mjs,check:new-line-citations(0 new citation(s)), each exit 0.overlap-check:VERDICT clean exit 0before the first content push and on the merge headb34dabff8(that run came right after its push, not before).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa