Skip to content

fix(i18n): code AI Vault scan issues and chat auto-name failures for the renderer - #35750

Merged
OrcaWin merged 3 commits into
mainfrom
OrcaWin/i18n-main-codes-15
Oct 29, 2026
Merged

OrcaWin merged 3 commits into
mainfrom
OrcaWin/i18n-main-codes-15

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​148 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​145
Prod 48 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​899 $\color{#cf222e}{\Huge{\mathbf{−}}}$​122 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​777

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 English message as before and adds optional messageCode / messageParams / messageDetail (detail is verbatim fs/sqlite text).
  • Producers converted: issue-list overflow notice, unreadable session metadata, OpenCode worker unavailable/incomplete, OpenCode/ZCode SQLite busy/unreadable/WSL/WAL notices, WSL SQLite reader preparing/not prepared, WSL transcript FS refusals (slow, capacity, helper failure, distro stopped/unverifiable: WslTranscriptFsError now 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: classifyAiVaultScanError returns the case code + params for the six supervision faults. describeAiVaultScanError keeps returning the same English.
  • AiVaultScanIssue gets optional fields. The runtime result validator (non-strict zod) now keeps them and drops malformed ones with .catch(undefined).
  • Chat auto-name: src/shared/chat-naming-failure-copy.ts covers "returned no name", "could not run", and "no chat-name agent can run". AgentSessionNamingError gets an optional messageCode, carried through the status summary.
  • Renderer: ai-vault-scan-issue-copy.ts and native-chat-naming-failure-copy.ts narrow with Object.hasOwn and check each code's params. An unknown code or a missing param shows the English message. These back AiVaultScanIssueBanners, the skipped-transcript reasons, the scan-failure banner, and the naming-failure dialog.
  • 30 new keys under aiVault.scanIssues.* and tabHoverCard.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.ts sentences, which are thrown errors over IPC and runtime RPC.
  • Remote (runtime RPC) scan rejections, which are thrown and already humanized to English on the host.
  • "Transcript unavailable" and WSL errors in the native-chat transcript frames: a separate IPC/runtime transport, left for a follow-up.
  • The oversized-record notice, which is built from list fragments.
  • Ad-hoc scanner diagnostics such as "Invalid aiVault.listSessions response: …".

Linked Issue

Refs #32207

Visual Proof

N/A: copy/i18n only.

Testing

  • pnpm tc: passed
  • pnpm test over src/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, and src/shared/ai-vault-scan-error-message.test.ts: 646 files / 6139 tests passed
  • New tests: renderer copy (a known code gives the es text with verbatim params/detail; uncoded, unknown, toString or 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 carrying agentNotRun. 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: passed
  • pnpm 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)
  • Scoped Codex review: it found two WSL-refusal producers (OpenCode sources, Antigravity siblings) that dropped the code; both are fixed. The remote-RPC rejection finding is left by design (see above).

@OrcaWin
OrcaWin requested a review from brennanb2025 as a code owner October 29, 2026 06:30
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest change appears safe to merge; the earlier empty-name translation issue remains non-blocking.

Findings

  1. P2 Empty-name errors stay English ▶

Summary

The PR adds message codes so the renderer can translate scan issues and chat naming failures while keeping English text for older clients.

  • Vault scan messages can appear in the app language.
  • Chat naming failures can appear in the app language.

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')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 54b1c527-ce45-4234-b2cc-13a45675295d
Commits

Reviewing files that changed from the base of the PR and between 4e33e59 and 4961667.

Files selected for processing: 1
  • src/renderer/src/components/right-sidebar/ai-vault-scan-issue-copy.ts
Walkthrough

Scan issues now carry structured message codes, parameters, and diagnostic details through scanner errors, result validation, and renderer display. The renderer translates recognized codes and retains supplied text when codes or required parameters are unavailable. Chat-naming failures also use standardized codes that pass into recorded naming errors. English and localized resources add copy for both error types.

Priority: Normal

Merge Risk: Low · previous review 4e33e

The change adds translated scan-issue and chat-naming failure messages with English fallbacks. The only open problem is two helper functions that fail the repository's static-analysis rules, which will block the changed-code check until fixed. User-facing behavior is not affected, so the risk is limited to a quick lint fix before merge.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the changes, rationale, testing, visual impact, and compatibility behavior. However, the Linked Issue section uses Refs #32207, which does not meet the template requirement … Replace Refs #32207 with the required issue link format, such as Fixes #32207 when appropriate. Add the missing required sections or explicitly complete them, including ELI5, AI Disclosure when applicable, Review, Agent skill upstream b…
Docstring Coverage Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main changes: renderer internationalization for AI Vault scan issues and chat auto-name failures.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the changes, rationale, testing, visual impact, and compatibility behavior. However, the Linked Issue section uses Refs #32207, which does not meet the template requirement for an actual issue link, and several required template sections and checklist items are missing.

Resolution

Replace Refs #32207 with the required issue link format, such as Fixes #32207 when appropriate. Add the missing required sections or explicitly complete them, including ELI5, AI Disclosure when applicable, Review, Agent skill upstream boundary, Notes, and Checklist items.

Full details: Docstring Coverage

Explanation

Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 48 functions across 42 files. (12 skipped: 12 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Commits

Reviewing files that changed from the base of the PR and between 76f5568 and 4e33e59.

Files selected for processing: 54
  • src/main/ai-vault-search/session-search-pass.ts
  • src/main/ai-vault/antigravity-transcript-candidates.ts
  • src/main/ai-vault/opencode-wsl-runtime-preparation.ts
  • src/main/ai-vault/runtime-session-scanner.ts
  • src/main/ai-vault/session-list-result-validation.test.ts
  • src/main/ai-vault/session-list-result-validation.ts
  • src/main/ai-vault/session-list-results.ts
  • src/main/ai-vault/session-scan-issues.ts
  • src/main/ai-vault/session-scanner-candidate-parse.ts
  • src/main/ai-vault/session-scanner-claude-subagents.ts
  • src/main/ai-vault/session-scanner-cursor-chat-meta.ts
  • src/main/ai-vault/session-scanner-discovery-pipeline.test.ts
  • src/main/ai-vault/session-scanner-discovery-wsl-gate.test.ts
  • src/main/ai-vault/session-scanner-discovery.ts
  • src/main/ai-vault/session-scanner-omp-subagent-listing.ts
  • src/main/ai-vault/session-scanner-opencode-sources.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-open.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-worker-client.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-worker-spawn.ts
  • src/main/ai-vault/session-scanner-opencode-wsl-client.ts
  • src/main/ai-vault/session-scanner-scope-discovery.ts
  • src/main/ai-vault/session-scanner-zcode-sources.ts
  • src/main/ai-vault/session-scanner.ts
  • src/main/ipc/ai-vault.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-status-summary.ts
  • src/main/native-chat/structured-chat-naming.test.ts
  • src/main/native-chat/structured-chat-naming.ts
  • src/main/native-chat/wsl-transcript-fs-error.ts
  • src/main/runtime/structured-chat-naming-runtime.ts
  • src/renderer/src/components/right-sidebar/AiVaultScanIssueBanners.tsx
  • src/renderer/src/components/right-sidebar/ai-vault-scan-issue-copy.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-scan-issue-copy.ts
  • src/renderer/src/components/right-sidebar/ai-vault-scan-issue-state.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-refresh.ts
  • src/renderer/src/components/tab-bar/native-chat-naming-failure-copy.test.ts
  • src/renderer/src/components/tab-bar/native-chat-naming-failure-copy.ts
  • src/renderer/src/components/tab-bar/use-native-chat-naming-failure.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/de.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/tr.json
  • src/renderer/src/i18n/locales/zh-Hant.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/agent-session-wire.ts
  • src/shared/ai-vault-scan-error-message.ts
  • src/shared/ai-vault-scan-issue-copy.ts
  • src/shared/ai-vault-types.ts
  • src/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant