Repository navigation
fix(i18n): code AI Vault scan issues and chat auto-name failures for the renderer - #35750
Conversation
[Medium impact] The latest change appears safe to merge; the earlier empty-name translation issue remains non-blocking. Findings
SummaryThe PR adds message codes so the renderer can translate scan issues and chat naming failures while keeping English text for older clients.
Reviews (2) · Last reviewed commit: "fix(i18n): read scan issue params throug..." · Reviewed by Greptile |
| return result.name | ||
| } | ||
| failure = 'error' in result ? result : { error: 'The chat-name agent returned no name.' } | ||
| failure = 'error' in result ? result : chatNamingFailure('noName') |
There was a problem hiding this comment.
Empty-name errors stay English
The new noName code misses the actual empty-name failure. generateConversationName returns an uncoded error when the generated name becomes empty after sanitization. The runtime forwards that error, so this line keeps it instead of selecting chatNamingFailure('noName'). Users still see English in another UI language.
Carry a code from that failure through the runtime while preserving its captured output.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
67922ba2-2ae0-46ab-9d25-56eca0e97c49
Files selected for processing: 54-
src/main/ai-vault-search/session-search-pass.tssrc/main/ai-vault/antigravity-transcript-candidates.tssrc/main/ai-vault/opencode-wsl-runtime-preparation.tssrc/main/ai-vault/runtime-session-scanner.tssrc/main/ai-vault/session-list-result-validation.test.tssrc/main/ai-vault/session-list-result-validation.tssrc/main/ai-vault/session-list-results.tssrc/main/ai-vault/session-scan-issues.tssrc/main/ai-vault/session-scanner-candidate-parse.tssrc/main/ai-vault/session-scanner-claude-subagents.tssrc/main/ai-vault/session-scanner-cursor-chat-meta.tssrc/main/ai-vault/session-scanner-discovery-pipeline.test.tssrc/main/ai-vault/session-scanner-discovery-wsl-gate.test.tssrc/main/ai-vault/session-scanner-discovery.tssrc/main/ai-vault/session-scanner-omp-subagent-listing.tssrc/main/ai-vault/session-scanner-opencode-sources.tssrc/main/ai-vault/session-scanner-opencode-sqlite-open.tssrc/main/ai-vault/session-scanner-opencode-sqlite-worker-client.tssrc/main/ai-vault/session-scanner-opencode-sqlite-worker-spawn.tssrc/main/ai-vault/session-scanner-opencode-wsl-client.tssrc/main/ai-vault/session-scanner-scope-discovery.tssrc/main/ai-vault/session-scanner-zcode-sources.tssrc/main/ai-vault/session-scanner.tssrc/main/ipc/ai-vault.tssrc/main/native-chat/agent-session-wire/structured-agent-session-status-summary.tssrc/main/native-chat/structured-chat-naming.test.tssrc/main/native-chat/structured-chat-naming.tssrc/main/native-chat/wsl-transcript-fs-error.tssrc/main/runtime/structured-chat-naming-runtime.tssrc/renderer/src/components/right-sidebar/AiVaultScanIssueBanners.tsxsrc/renderer/src/components/right-sidebar/ai-vault-scan-issue-copy.test.tssrc/renderer/src/components/right-sidebar/ai-vault-scan-issue-copy.tssrc/renderer/src/components/right-sidebar/ai-vault-scan-issue-state.tssrc/renderer/src/components/right-sidebar/ai-vault-session-refresh.tssrc/renderer/src/components/tab-bar/native-chat-naming-failure-copy.test.tssrc/renderer/src/components/tab-bar/native-chat-naming-failure-copy.tssrc/renderer/src/components/tab-bar/use-native-chat-naming-failure.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/de.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/tr.jsonsrc/renderer/src/i18n/locales/zh-Hant.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/shared/agent-session-wire.tssrc/shared/ai-vault-scan-error-message.tssrc/shared/ai-vault-scan-issue-copy.tssrc/shared/ai-vault-types.tssrc/shared/chat-naming-failure-copy.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
-
Summary
Agent Session History scan issues, scan-failure banners, and chat auto-name failures now show in the UI language. Main/shared still send the same English text, plus an optional code that the renderer translates.
What Changed
src/shared/ai-vault-scan-issue-copy.ts: one English table for Orca-authored scan copy.aiVaultScanIssueText(code, { params, detail })builds the same Englishmessageas before and adds optionalmessageCode/messageParams/messageDetail(detail is verbatim fs/sqlite text).WslTranscriptFsErrornow carries its coded text), scope-path truncation, invalid remote result entries (plural), and the local scan-failure host issue.src/shared/ai-vault-scan-error-message.ts:classifyAiVaultScanErrorreturns the case code + params for the six supervision faults.describeAiVaultScanErrorkeeps returning the same English.AiVaultScanIssuegets optional fields. The runtime result validator (non-strict zod) now keeps them and drops malformed ones with.catch(undefined).src/shared/chat-naming-failure-copy.tscovers "returned no name", "could not run", and "no chat-name agent can run".AgentSessionNamingErrorgets an optionalmessageCode, carried through the status summary.ai-vault-scan-issue-copy.tsandnative-chat-naming-failure-copy.tsnarrow withObject.hasOwnand check each code's params. An unknown code or a missing param shows the Englishmessage. These backAiVaultScanIssueBanners, the skipped-transcript reasons, the scan-failure banner, and the naming-failure dialog.aiVault.scanIssues.*andtabHoverCard.namingFailure.errors.*, translated in all 11 catalogs.Why
These sentences were built in main/shared and always reached the UI in English. Codes keep mixed versions working: an older client ignores the new fields, and a newer client talking to an older host has no code and shows the English text.
Left as is:
structured-chat-cli-fork.tssentences, which are thrown errors over IPC and runtime RPC.Linked Issue
Refs #32207
Visual Proof
N/A: copy/i18n only.
Testing
pnpm tc: passedpnpm testoversrc/main/ai-vault,src/main/ai-vault-search,src/main/native-chat,src/main/ipc/ai-vault*,src/main/runtime/structured-chat-naming*, the AI Vault right-sidebar files, the naming tab-bar files, andsrc/shared/ai-vault-scan-error-message.test.ts: 646 files / 6139 tests passedtoStringor missing-param input gives English; a classified scan fault gives es), the naming copy, the validator keeping codes and dropping malformed ones, and the naming producer carryingagentNotRun. Existing discovery tests now also assert the code.pnpm verify:localization-catalogs,verify:localization-catalog,verify:localization-extraction,verify:localization-coverage,verify:localization-runtime-catalog: passedpnpm check:changed --maxWorkers=2: all steps passed except unit tests, which were still running when my 10-minute limit hit (the targeted runs above cover them)