Repository navigation
Conversation
The automations fix only routed its own two steps through translate(), so every other tour still rendered raw English titles and bodies next to already-localized Next/Back/Done controls. Give every step a stable id and move the copy lookup into one module keyed by that id, so a new step is localized by construction and a coverage test fails when it is not.
📝 WalkthroughWalkthroughContextual tour steps now have stable identifiers for workspace, agent session, browser, task, floating workspace, and workspace creation tours. Shared localized copy provides English fallback text and localized primary-action labels. The overlay uses this lookup for titles, bodies, and actions. Locale resources include contextual-tour content in English, Korean, Spanish, Japanese, and Chinese. Tests verify Korean translations and English fallback behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/shared/contextual-tours.ts (1)
32-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider making
idrequired now that every step has one.All steps in
CONTEXTUAL_TOURS, including the ones not touched by this PR, now setid. Keepid?: stringoptional, and a future step added without anidwill compile without error. That step then has no stable anchor for localized copy, and it can silently fall back to the wrong copy or to English only.Change the field to
id: string(non-optional) so the type checker catches a missingidon any new step at the source, instead of relying on the copy-lookup layer or tests to catch it downstream.♻️ Proposed change
export type ContextualTourStep = { // Stable anchor for localized copy — position-keyed translations shift onto the wrong step when one is inserted. - id?: string + id: string title: string
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9a408867-6c00-4ebe-b603-4b680b5d7b57
📒 Files selected for processing (7)
config/scripts/locale-ko-key-overrides.jsonsrc/renderer/src/components/contextual-tours/contextual-tour-overlay-measurement.tssrc/renderer/src/components/contextual-tours/contextual-tour-step-copy.test.tssrc/renderer/src/components/contextual-tours/contextual-tour-step-copy.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/shared/contextual-tours.ts
The tour catalog ships five locales; ko alone left Spanish, Japanese, and Chinese users on the English fallback for the same steps.
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 53185d10-ad30-4499-85ee-7b70064aa1a5
📒 Files selected for processing (3)
src/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/zh.json
Addresses CodeRabbit review: a required `id` makes a new step without a stable copy anchor a type error rather than a silent English fallback, the coverage test now fails on a missing action label instead of an undefined one, and the Spanish Next label and name-step title use idiomatic wording.
Native-reader feedback: "이곳의" reads better than "여기의", the title now says what the step actually offers (one agent covering every repo), and the scratchpad step uses a plain Korean word instead of a transliteration.
Summary
Every contextual tour except Automations rendered its title and body in English even when the UI language was Korean, next to already-localized Next / Back / Done controls and progress label.
Root cause: #12270 localized the two Automation steps by whitelisting their step ids in a
LOCALIZED_STEP_COPYmap insidecontextual-tour-overlay-measurement.ts. Every other step insrc/shared/contextual-tours.tshas noid, so the lookup missed and the overlay fell back to the raw Englishstep.title/step.body. Reported on the floating workspace tour, but workspace-board, agent-sessions, browser, tasks and workspace-creation were affected identically — 13 steps in total.This PR:
idand moves the copy lookup intocontextual-tour-step-copy.ts, keyed by that idSplit terminalprimary-action label through the catalog tooenand translates them (plus the 5 keys fix(i18n): localize automation contextual tour #12270 left ko-only) forko,es,ja,zhCONTEXTUAL_TOURSand fails if any step resolves no localized copy, so a newly added step cannot ship untranslatedScreenshots
Floating workspace tour, UI language Korean. Before is the reported bug; after is captured from a real Electron run on this branch.
Testing
pnpm lint— fails only onverify:skill-bundle-manifest(resources/skills/*.jsonreported stale). Reproduced on a cleanorigin/mainworktree, so it is pre-existing and unrelated to this change; every other gate in the chain passes, includingverify:localization-catalog,verify:localization-extraction,verify:localization-coverageandcheck:max-lines-ratchet.pnpm typecheckpnpm test— 154 tests across 59 files fail on this Windows host, all in main-process / SSH / git / packaging suites (path-separator andspawnSync.cmdEINVAL failures). Checked out a cleanorigin/mainin the same working copy and re-ran exactly those 59 files: identical 59 files / 154 tests fail. Pre-existing and unrelated to this change; nothing in the i18n, localization or contextual-tour suites fails.pnpm buildAlso run:
pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/contextual-tours/ src/shared/contextual-tours.test.ts(76 passed) and a real Electron capture of both Korean tour steps (the two "after" screenshots above; the throwaway capture spec is not part of the diff).The new test is a coverage assertion rather than one case per step: it iterates
CONTEXTUAL_TOURS, so the next tour step added without translations fails the suite instead of silently regressing one panel — the exact way this bug reached users.AI Review Report
Reviewed with Claude Code. Risks checked:
id, not the floating workspace tour specifically, and verified all 15 steps across 7 tours now resolve localized copy.verify-localization-catalogandverify-localization-extractionrequire (template-literal keys are silently skipped by the extractor and would have orphaned the catalog entries).{terminal.splitRight}marker in the split-pane step body: every translation keeps it verbatim, soformatContextualTourStepCopystill substitutes the platform-correct shortcut label (⌘ on Mac, Ctrl on Linux/Windows). Verified in the ko/es/ja/zh values. Screenshots were captured on Windows; the shortcut chips renderCtrlas expected.Result: no findings required code changes beyond switching the initially-drafted template-literal keys to string literals.
Security Audit
No input handling, command execution, path handling, auth, secrets, dependency, or IPC surface is touched. The change adds static strings to the renderer localization catalog and a pure lookup function;
translate()is called with constant keys and constant fallbacks, so no user- or agent-controlled data reaches interpolation. No new dependencies. No follow-up needed.Notes
es/ja/zhalso cover the 5 keys fix(i18n): localize automation contextual tour #12270 left English-only (Doneplus the Automation step copy), so all five locales are now at parity for contextual tours.worktreestays English ines,agentandTerminalstay English inja,工作树/智能体inzh).🤖 Generated with Claude Code