Skip to content

fix(i18n): code Source Control AI settings and generation plan failures - #35697

Merged
OrcaWin merged 6 commits into
mainfrom
OrcaWin/i18n-main-codes-13
Oct 29, 2026
Merged

OrcaWin merged 6 commits into
mainfrom
OrcaWin/i18n-main-codes-13

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 0
Prod 26 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​531 $\color{#cf222e}{\Huge{\mathbf{−}}}$​91 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​440

Summary

Follow-up to #35669. The Source Control AI settings-resolution and generation-plan failures were authored in English in shared code and shown as-is, both from main results and from the renderer's own resolution. They now use the same coded text-generation failure table and render in the UI language.

What Changed

  • src/shared/text-generation-failure-copy.ts gains 18 codes:
    • empty command template, one whole sentence per operation (replaces the OPERATION_LABEL fragment)
    • unsupported Source Control AI / chat-name agent: the settings path and purpose are now whole sentences, with the list of supported agent brand labels as {{agents}}
    • empty custom command, for Source Control AI and for chat names
    • agent cannot generate X, per operation
    • no model for agent
    • commit-message plan failures: custom command empty, agent unsupported, model unavailable, model without thinking, invalid thinking level
  • resolveSourceControlAiForOperation and planCommitMessageGeneration return { ok: false, error, errorCode, errorParams }. The English is byte-identical to before.
  • Main carries the coded fields into the generation results: the IPC commit/PR handlers, the runtime git generation commands, the Jira summary request, and plan failures in runGenerationRequest. The renderer client localizer from fix(i18n): code AI text-generation failures for commit, PR, and Jira title generation #35669 then renders them.
  • Renderer call sites that show these errors directly now localize them: the text-generation dialog banner, the planner preview, and the Create PR "Generate" disabled reason. The two renderer-authored disabled reasons get plain translate keys. The renderer-detected "Custom command is empty…" reuses the shared code through textGenerationCopyText.
  • Added 20 keys in all 11 locales.

Why

Part of the main → renderer coded-copy work for #32207.

Linked Issue

Refs #32207

Visual Proof

N/A — copy/i18n only.

Testing

  • pnpm tc — pass
  • pnpm test src/shared/source-control-ai src/shared/commit-message-plan src/main/text-generation src/main/ipc/filesystem src/main/ipc/jira src/renderer/src/lib src/renderer/src/components/right-sidebar src/renderer/src/runtime: 1423 files and 12706 tests pass. Three existing toEqual({ ok/success: false, error }) assertions moved to toMatchObject; their English is unchanged.
  • verify:localization-catalogs / -extraction / -coverage / -runtime-catalog — pass
  • A Codex review of the diff found no concrete issues. It also ran an ad-hoc check of every code in every locale: the English matched and the fallbacks held.
  • pnpm check:changed did not run to completion on the loaded host; CI is the gate.

@OrcaWin
OrcaWin requested a review from brennanb2025 as a code owner October 29, 2026 05:06
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

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 13 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: 9a4e4135-accc-408a-970b-f8dd380ad464
Commits

Reviewing files that changed from the base of the PR and between b4fc981 and da2d294.

Files selected for processing: 28
  • src/main/ipc/filesystem/filesystem-git-commit-generation-handlers.ts
  • src/main/ipc/filesystem/filesystem-git-pull-request-generation-handlers.ts
  • src/main/runtime/runtime-git-generation-commands.ts
  • src/main/text-generation/agent-generation-request.ts
  • src/main/text-generation/commit-message-text-generation-settings.test.ts
  • src/main/text-generation/commit-message-text-generation.ts
  • src/main/text-generation/jira-issue-summary-requests.ts
  • src/renderer/src/components/right-sidebar/source-control/ai/text-generation-dialog.tsx
  • src/renderer/src/components/right-sidebar/source-control/commit/use-commit-message-generation.ts
  • src/renderer/src/components/right-sidebar/use-create-pull-request-field-generation.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/renderer/src/lib/source-control-generation-plan.ts
  • src/renderer/src/lib/text-generation-error-copy.ts
  • src/shared/commit-message-plan.ts
  • src/shared/source-control-ai-action-recipes.test.ts
  • src/shared/source-control-ai.ts
  • src/shared/text-generation-failure-copy.ts
  • 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.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect failure messages across bounded text-generation workflows.

The PR appears safe to merge, with a non-blocking gap in tests for the new coded failures.

Findings

  1. P2 Tests miss the new fields ▶

Summary

Adds translated settings and planner errors for Source Control AI.

  • Generation failures carry codes alongside their English messages.
  • Generation settings and planning messages use the selected UI language.

Reviews (1) · Last reviewed commit: "Merge origin/main into OrcaWin/i18n-main..." · Reviewed by Greptile

Comment on lines +344 to 346
).toMatchObject({
ok: false,
error: 'Command template is empty for commit messages.'

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 Tests miss the new fields

The updated assertions check only English text, so they pass even if errorCode or errorParams is missing or wrong. Those fields are what lets the renderer translate these failures. Assert the expected code and values here and in the other changed failure tests. Also add a non-English case with values to substitute in text-generation-error-copy.test.ts. This would catch a return to English-only errors.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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