Skip to content

fix(i18n): title the AI drawer with the top-bar button's name in every locale - #34930

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-34827-ai-drawer-title
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-34827-ai-drawer-title

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa

Fixes #34827

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:AI 助手抽屉的标题(侧边抽屉、铺满后、手机底部面板三处)现在和顶栏按钮同名,zh-Hans/zh-Hant 是「AI 助手」,en 是 "AI Assistant",其余 8 种语言也都用各自顶栏按钮那个词。
  • 为什么改:验收时看到顶栏按钮叫「AI 助手」,点开后抽屉标题只写「助手」,同一个东西两个名字。
  • 风险与回滚:只改了 11 个语言包里 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.title now carries the same value as topbar.aiAssistant (the key the top-bar robot reads for its aria-label and title) in all eleven built-in packs:

    pack before after
    en Assistant AI Assistant
    zh-Hans / zh-Hant 助手 AI 助手
    ja アシスタント AI アシスタント
    ko 어시스턴트 AI 어시스턴트
    de Assistent KI-Assistent
    fr Assistant Assistant IA
    es / pt-BR Asistente / Assistente Asistente de IA / Assistente de IA
    ru Ассистент ИИ-ассистент
    ar المساعد مساعد الذكاء الاصطناعي
  • 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 a title prop to either in the Console (useConsoleChatDock mounts both without one), and the Studio panel no longer mounts ChatDockPanel, so the value change reaches exactly the drawer.

  • ChatDock.tsx: the two inline defaultValues for that key change from 'Assistant' to 'AI Assistant'. This is not optional: check-i18n-call-site-keys requires 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 is console.shortcuts.groups.aiChat, the keyboard-shortcuts dialog's group heading. The robot reads topbar.aiAssistant (AssistantTopBarButton), whose en value is AI Assistant, so that is the value matched.

  • console-namespace-3546.test.tsx carried French dock.title = Assistant as its one permitted en-identical cognate; French now reads Assistant 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 in marketplace-preview-namespace-3546.test.tsx that 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.tsx and what it mounts: ChatPane from AiChatPage.tsx, ConversationsSidebar.tsx):

key zh-Hans / en verdict
console.ai.dock.description (phone sheet, screen-reader only) AI 助手对话 / AI assistant chat already uses the full name; unchanged
ConversationsSidebar (history list): chats, noChatsYet, noChatsDescription, searchChats, newChat 对话 / Chats, … no self-name; unchanged
console.ai.empty.build.*, console.ai.empty.ask.* (empty states) 用 AI 搭建 / Build with AI, 向你的数据提问 / Ask your data no self-name; unchanged
console.ai.unavailableTitle / unavailableDescription AI 助手不可用 / AI assistant unavailable already the full name; unchanged
console.ai.switchAssistant, chooseAgent, loadingAgents, offlineDemoMode 切换助手, 选择助手…, … 助手 here means an agent in the picker, not the panel's name; unchanged
console.ai.assistant 助手 / Assistant the agent-label fallback in ChatPane when no agent is found. ChatPane is shared with the Studio panel (StudioAiCopilot), so changing it would rename text there too (#34725's scope); unchanged
console.ai.emptyDescription 可以直接提问,助手会结合… / Ask anything — the assistant has access… generic empty state in the same shared ChatPane; same reason; unchanged
console.ai.dock.open 打开助手 / Open assistant read only by ChatDockLauncher, which no Console path mounts (only its own test renders it); unchanged

Tests

  • New ui/packages/app-shell/src/layout/__tests__/ChatDock.titleMatchesTopBar-34827.test.tsx (its own file because the existing ChatDock harnesses mock useObjectTranslation with the inline defaults and cannot see a pack value). Real AssistantTopBarButton, ChatDockPanel, ChatDockMobileSheet, real I18nProvider and packs:
    • zh and en: the rail and the full window show the button's accessible name; control: the resize handle's name from the same pack (调整对话宽度 / Resize chat), so a pack that never loaded is not read as a pass;
    • zh: the phone sheet heading;
    • every built-in pack: console.ai.dock.title === topbar.aiAssistant.
  • Ablation (one-shot, not kept): scripts/ablation-replace.mjs put zh-Hans dock.title back to '助手' (the mutated blob 77e56f98 equals the zh-Hans blob on origin/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 empty git diff HEAD.

Verification

All readings below are on head b34dabff8 (the branch with origin/main fc5913e1 merged 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 the defaultValue alignment).
  • pnpm --filter @object-ui/i18n run type-check exit 0; pnpm --filter @object-ui/app-shell run type-check exit 0.
  • ESLint on the three changed test files and en.ts, from the ui root and from each package dir: exit 0, no output.
  • The full app-shell suite is left to CI's Test UI: the diff changes one string literal in app-shell, and no app-shell test outside layout/ reads that key.
Eager budget (merged tree)

pnpm --dir ui/apps/console exec vite build, then pnpm --dir ui run check:eager-closure exit 0: i18n-locale-en 60.4 KB / 60.5 KB ceiling (headroom 0.2 KB); the report gives the chunk as gzipBytes: 61818 against the 62_000 ceiling, so 182 bytes are left. The ceiling is not touched.

Derived gate families

node scripts/pm/dispatch-gates.mjs --commands derived 40 commands. 39 were re-run on b34dabff8, each :: exit 0. The 40th, pnpm --dir ui exec vitest run scripts/, was run on 6069d44b (before the defaultValue fix): 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. --ran reconciliation: 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 0 before the first content push and on the merge head b34dabff8 (that run came right after its push, not before).


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa

Red check read (area o3-H) · 2026-11-17T16:53Z

Test UI (11/16) failed on head b34dabff (job 134196611396) before any test ran: ##[error]The action 'Fetch this commit's history and the base branch' has timed out after 14 minutes. It is a checkout timeout on the runner, not this PR's code. The area re-runs the failed job once when run 44127361817 concludes; a second identical failure goes to the seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa

Red check read (area o3-H) · 2026-11-17T17:34Z

Type Check · workspace failed on head a5f8c13b (main merge, K was 18; job 134221147317) before any type check ran: ##[error]The action 'Checkout repository' has timed out after 20 minutes. Runner checkout timeout again (the same infra failure as 6954779489 and #34929's 6955502918), not this PR's code. The area re-runs the failed jobs of run 44134759234 once it concludes.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa

L1 review (L1-d) · 2026-11-17T17:58Z

L1: REWORK
Head-sha: c1d542cf2e5166387538f3b4b4fec840f833b909

Read against claim 6951092301 and report 6954317851 on #34827.

  • Size: merge base b8408d82, 16 files, +160/-36.
  • Not governed: check-governed-merges --branch reports 0 paths and 196 lines.
  • CI at this head: 45 success, 13 skipped, 0 failed.

This is paper only. Once the claim is amended, this head is ACCEPT, with no push needed.

What holds

  • Closing keyword. Fixes #34827 is right. Item 1 is done: console.ai.dock.title now equals topbar.aiAssistant (the key the robot's aria-label / title reads) in all 11 packs. That one key titles the rail, the window-filling form and the phone sheet.
  • Item 2. It is answered with a per-key table. The keys left alone have stated reasons: console.ai.assistant and emptyDescription sit in ChatPane, which is shared with Studio (Studio 里的 AI 面板:与应用里的 AI 助手统一名字、入口、宽度和标题栏,放大改为原地铺满 #34725). The switchAssistant / chooseAgent family uses 助手 to mean an agent. dock.open is unmounted.
  • ChatDock.tsx. Only the two inline defaultValues change, and the body says why: check-i18n-call-site-keys requires a literal default to equal the en value. That meets the claim's "only if … (stated in the PR body)".
  • New pin. ChatDock.titleMatchesTopBar-34827.test.tsx renders the real top-bar button, rail, full window and phone sheet with real packs.
    • It carries a control (the resize handle's name from the same pack).
    • It checks every pack for equality.
    • Its ablation (zh-Hans back to 助手) is red on the 3 zh cases, and the restore was checked by blob.
  • Changeset. It names @object-ui/i18n and @object-ui/app-shell, both patch, and its text matches the diff. Clause-②: no and Metadata-protocol: none match the claim.
  • Eager budget. It was measured on the merged tree: 61,818 / 62,000, with the ceiling untouched.

Must-fix

  • M1 (paper): two existing test files are outside the claim. The claim names locale files, a pin (one new test file), the changeset, and ChatDock*.tsx if needed. The PR also edits two existing shared harness files:
    • ui/packages/i18n/src/__tests__/console-namespace-3546.test.tsx. Its one permitted cognate (French dock.title = Assistant) is gone. The exemption set is now empty, and the pin asserts that the three French values containing the word differ from en. The edit is right and does not weaken the pin.
    • ui/packages/i18n/src/__tests__/marketplace-preview-namespace-3546.test.tsx (one comment).
    • Please add both in a claim amendment, under AGENTS.md's shared-harness rule (ruling record 6583487846).

Should-fix

None.

Notes

  • N1: The dispatch named aiChat: 'AI assistant' as the button's key. The body correctly says the robot reads topbar.aiAssistant (en AI Assistant) and matches that one.

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.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa

L1 review (L1-d) · 2026-11-17T18:00Z

L1: ACCEPT
Head-sha: c1d542cf2e5166387538f3b4b4fec840f833b909

This is a same-head ACCEPT on the paper REWORK in 6956430137. The head is unchanged.

Must-fix

None. M1 is closed: claim amendment 6956443862 on #34827 adds ui/packages/i18n/src/__tests__/console-namespace-3546.test.tsx and ui/packages/i18n/src/__tests__/marketplace-preview-namespace-3546.test.tsx under the shared-harness rule (ruling record 6583487846). Nothing else in the claim changes. All 16 files are now inside the claim surface.

Should-fix

None.

Notes

None 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.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa

Landing (area o3-H) · 2026-11-17T18:01Z

Reading Value
L1 ACCEPT (L1-d same-head 6956483634 after paper REWORK 6956430137; M1 closed by claim amendment 6956443862) on head c1d542cf2e5166387538f3b4b4fec840f833b909, no should-fix
CI on that head 45 success, 13 skipped (path filter), 0 failed or pending; mergeable_state: clean. Earlier heads' reds were runner checkout timeouts (6954779489, 6955873787), not this PR's code
check-governed-merges.mjs --pr 34930 NOT governed, 0 of 16 paths; 196 changed lines ≤ 3000
K (b8408d82..origin/main, first-parent) 4 (< 15)
Eager en budget 61,818 / 62,000 on its merged tree (ceiling untouched); #34929 (+39 B) is ahead in the queue and the queue build re-measures; a red there waits for #34937 (ceiling 80,600), no lazy move

State change: ready + auto-merge enabled. Fixes #34827.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 18:01
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit cb7d514 Nov 17, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34827-ai-drawer-title branch November 17, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI 助手抽屉:标题写「助手」,与顶栏按钮「AI 助手」不一致

2 participants