feat(web): internationalize the UI (en/zh-Hans/zh-Hant/ja/ko)#91
Conversation
P0 — design tokens: - Add code-block (--code-bg/--code-border) and on-primary/on-destructive foreground tokens, plus a full ANSI terminal palette (--term-bg/fg/cursor/selection + 16 colors) in tokens.css - TerminalInstance.vue resolves terminal colors from tokens at runtime via getComputedStyle (xterm needs color strings, not var()) and guards the ws handlers against a torn-down term - Replace hardcoded colors in style.css (.prose-chat pre, .xterm, .diff-bar-empty) with the new tokens P1 — icon system: - Migrate the entire web/ frontend from lucide-vue-next to @heroicons/vue/24/outline (drop lucide-vue-next, add @heroicons/vue ^2.2.0) - Replace inline <svg> blocks across all components with heroicons; non-1:1 icons use the semantically-closest outline icon - Document the convention (heroicons-only, w-N h-N sizing, color tokens, terminal token resolution) under Frontend in AGENTS.md P1 — UX polish (no layout changes): - Add hover tooltips (with shortcuts where relevant) - Simplify the welcome-screen copy (drop the "Pick a workspace" prompt) - ToolCallCard.truncate() is now code-point aware ([...text]) - ApprovalBanner: two-step confirm on "Allow all", unified icons - SettingsDialog: fix translate-x-4.5/translate-x-0.76 toggle values (-> translate-x-[20px]/translate-x-[2px]); iconFor returns components - App.vue: flex-anchor the scroll-to-bottom button (remove bottom-40) - GoalBanner: Clear button hover; ChatInput: send-btn disabled opacity 0.3 -> 0.45, composer shadow uses --shadow-xl Alongside (pre-existing in-progress work, bundled here): - BLE status channel: GET/POST /api/channel/ble backend (channel.go, server.go) + api.ts client - Persist approval mode as the startup default (server.go) - Stamp turn durationMs on the final assistant message; expose setAutoApprove; drop retryFromMessage (chat.ts, types/api.ts) - Favicon swap icon.svg -> icon.png (index.html, notifications.ts, web/public/) and regenerated desktop Tauri icons Verification: pnpm lint OK, pnpm build OK (vue-tsc + vite), make build OK.
|
Warning Review limit reached
More reviews will be available in 49 minutes and 59 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (52)
📒 Files selected for processing (45)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
handleSetApprovalMode was writing both cfg.DefaultMode (the authoritative unified field) and cfg.AutoApprove (its deprecated fallback). resolveStartupMode only reads AutoApprove when DefaultMode is empty, so the AutoApprove write was dead code — and staticcheck SA1019 flags it. DefaultMode alone covers the persistence; the fallback is read-only for old configs.
Add full vue-i18n (v11, Composition mode) internationalization across the entire web frontend, with five locale catalogs and an endonym-based language picker. i18n infrastructure: - src/i18n/index.ts: createI18n setup with SUPPORTED_LOCALES / LOCALE_LABELS / HTML_LANG maps, browser-language detection (zh-TW -> zh-Hant, etc.), localStorage persistence (jcode_locale), and a lazy setLocale() that pre-loads the initial non-en locale to avoid a flash - Locale catalogs: en (canonical source), zh-Hans, zh-Hant, ja, ko — all mirroring the same key structure; ~50 new keys added for the Settings tabs (appearance/providers/mcp/skills/ssh/channels) - Language picker wired into SettingsDialog (General -> Preferences) - main.ts registers the i18n plugin Component migration (every .vue now reads strings via t()): - App, ChatInput, ChatMessage, ApprovalBanner, GoalBanner, Sidebar, TopBar, RightPanel, ToolCallCard, CommandPalette, AskUserCard, DiffViewer, FileTreePanel, FileViewer, TerminalInstance, TerminalPanel, SetupView, RemoteConnectWizard, ProjectSwitcher, WorkspacePicker, BranchPicker, SettingsDialog (all tabs) - Stores/composables: chat, project, toolInfo, useBranch Type fixes (pre-existing WIP issues that blocked pnpm build): - CommandPalette: rename .map(t =>) callback to avoid shadowing the i18n t - GoalBanner: drop dead 'in_progress'/'completed' switch arms (GoalStatus is 'active'|'complete'|'blocked' per the Go backend) - i18n/index.ts + SettingsDialog: cast locale writes/reads for vue-i18n v11's type narrowing (locale is typed from the initially-bundled 'en') Verification: pnpm lint OK, pnpm build OK (vue-tsc + vite, all 5 locale chunks emitted), new keys + translations confirmed in the built bundles.
Summary
Full vue-i18n (v11, Composition mode) internationalization across the entire web frontend, with five locale catalogs and an endonym-based language picker.
src/i18n/index.ts—createI18nsetup withSUPPORTED_LOCALES/LOCALE_LABELS/HTML_LANG, browser-language detection (zh-TW → zh-Hant, etc.), localStorage persistence (jcode_locale), lazysetLocale()..vuecomponent + stores/composables (chat, project, toolInfo, useBranch) now read strings viat().Type fixes (pre-existing WIP issues that blocked
pnpm build):CommandPalette: rename.map(t =>)callback — shadowed the i18ntGoalBanner: drop dead'in_progress'/'completed'switch arms (GoalStatusisactive|complete|blockedper the Go backend)i18n/index.ts+SettingsDialog: cast locale reads/writes for vue-i18n v11's type narrowingVerification