You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(i18n): localize remote server pairing, host sign-in and Bitbucket connect failures - #35843
Localizes Orca-authored failure sentences that main/shared code sent to the renderer as English: Remote Orca Server pairing save refusals, host account sign-in failures reported to another device, Bitbucket credential connect failures, and the Bitbucket / Azure DevOps / Gitea "base branch, head branch, and title are required" Create PR validation.
What Changed
Remote Orca Servers pairing (src/shared/remote-server-pairing-failure-copy.ts): one English table for the store guards (runtime-environment-pairing-replace-guards.ts, runtime-environment-store.ts, runtime-environment-store-file.ts). RuntimeEnvironmentStoreError gains an optional pairingFailure (errorCode + errorParams.name). The verify-and-add / re-pair IPC results (RemotePairingFailure) carry optional errorCode/errorParams. Each "already paired as X" + guard combination has its own whole-sentence template, so nothing is concatenated. The renderer (remote-server-pairing-error-copy.ts) translates known codes in Settings > Remote Orca Servers, the re-pair dialog and the sidebar Add Remote Host dialog.
Host account sign-in (host-account-sign-in-types.ts): HostAccountSignInStatus.errorCode (optional) marks the two failures Orca names itself (ownerSilent, superseded). The login's own error text stays uncoded and verbatim. The renderer client translates them, plus its own "Sign-in failed. Try again." fallback.
Bitbucket connect (bitbucket-credentials.ts): BitbucketConnectResult failures carry optional errorCode. The renderer dialog translates it.
Hosted review create: new CreateHostedReviewFailureReasonbase_head_title_required on the existing reason model, mapped in hosted-review-create-failure-copy.ts. The sign-in hint helpers moved verbatim to hosted-review-sign-in-copy.ts so that file stays under the 300-line lint cap.
en + de, es, fr, ja, ko, pt, ru, tr, zh, zh-Hant catalog entries.
Wire changes are additive and optional. error/message English is byte-identical. Codes are plain strings that the client narrows with Object.hasOwn, and uncoded (older host), unknown (newer host) or param-incomplete results show the English text. Everything touched here is Electron IPC or an RPC result object. None of it goes through a .strict() schema.
Why
These sentences reached the UI in English for non-English users.
Left as-is on purpose:
Errors thrown over runtime RPC stay English, since RPC strips extra error fields: host-account-sign-in-flows.ts start/submitCode/not-active, accounts.ts / antigravity-accounts.ts "cannot add accounts/sign in", and runtime-account-controller.ts services-not-configured.
runtime_error store read/write failures with file paths, which only surface as thrown errors.
git-remote-error.ts and git-clone-failure-message.ts: every caller throws (push/pull/fetch over IPC and runtime RPC, clone over IPC and RPC), so a code cannot reach the client. The display layer is the renderer's source-control-remote-error.ts, which is itself still English and re-classifies the English text. Localizing that belongs in a renderer change.
AI text-generation agent output failures are in a separate PR.
pnpm test on the touched areas (host sign-in flows/client, bitbucket, azure-devops, gitea, github, gitlab, runtime-environment store tests, settings components, runtime-environments IPC, new copy tests) passed
pnpm sync:localization-runtime-catalog plus all five verify:localization-* checks passed
pnpm check:code-quality:changed passed
pnpm check:changed --maxWorkers=2 passed everything except two steps. The changed-code quality step had one switch-exhaustiveness finding, now fixed and re-checked. The full unit-test step did not finish within 25 minutes on the loaded host, so CI is the gate for it.
Codex review of the diff. Its one note was that the new base_head_title_required detail is composed into "Create PR failed: {{detail}}". That is the same structure every existing hosted-review reason uses, so it was left consistent with them.
No actionable comments were generated in the recent review.
Recent 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: ed648026-586f-485c-be61-ca6b20d45c70
Commits
Reviewing files that changed from the base of the PR and between e40e6ab and af62bb6.
Files selected for processing: 2
src/preload/api/bitbucket-bridge.ts
src/preload/api/hosted-review-api.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
Walkthrough
The changes add structured failure codes and localized error copy for hosted review validation, Bitbucket connections, host account sign-in, and remote-server pairing. Pairing failures retain codes and optional parameters across store, IPC, and renderer paths. Tests cover translation and fallback behavior for several failure types.
Priority: Low
Merge Risk: Minimal · up to af62b
The inspected failure paths preserve structured codes and intended English fallbacks, with no merge-blocking risk established.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 41.38% 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 checks: 4 passed
Check name
Status
Explanation
Title check
The title clearly and concisely summarizes the main change: localization for remote server pairing, host sign-in, and Bitbucket connection failures.
Description check
The description is mostly complete. It explains the user impact, implementation, rationale, scope, issue reference, visual proof status, and testing results. Some template sections, including ELI5, Re…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description is mostly complete. It explains the user impact, implementation, rationale, scope, issue reference, visual proof status, and testing results. Some template sections, including ELI5, Review, Notes, and Checklist, are not explicitly completed, but the description remains clear and relevant.
Full details: Docstring Coverage
Explanation
Docstring coverage is 41.38% 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 29 functions across 35 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches: 💡 1
📝 Generate docstrings: 💡
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Localizes Orca-authored failure sentences that main/shared code sent to the renderer as English: Remote Orca Server pairing save refusals, host account sign-in failures reported to another device, Bitbucket credential connect failures, and the Bitbucket / Azure DevOps / Gitea "base branch, head branch, and title are required" Create PR validation.
What Changed
src/shared/remote-server-pairing-failure-copy.ts): one English table for the store guards (runtime-environment-pairing-replace-guards.ts,runtime-environment-store.ts,runtime-environment-store-file.ts).RuntimeEnvironmentStoreErrorgains an optionalpairingFailure(errorCode+errorParams.name). The verify-and-add / re-pair IPC results (RemotePairingFailure) carry optionalerrorCode/errorParams. Each "already paired as X" + guard combination has its own whole-sentence template, so nothing is concatenated. The renderer (remote-server-pairing-error-copy.ts) translates known codes in Settings > Remote Orca Servers, the re-pair dialog and the sidebar Add Remote Host dialog.host-account-sign-in-types.ts):HostAccountSignInStatus.errorCode(optional) marks the two failures Orca names itself (ownerSilent,superseded). The login's own error text stays uncoded and verbatim. The renderer client translates them, plus its own "Sign-in failed. Try again." fallback.bitbucket-credentials.ts):BitbucketConnectResultfailures carry optionalerrorCode. The renderer dialog translates it.CreateHostedReviewFailureReasonbase_head_title_requiredon the existing reason model, mapped inhosted-review-create-failure-copy.ts. The sign-in hint helpers moved verbatim tohosted-review-sign-in-copy.tsso that file stays under the 300-line lint cap.Wire changes are additive and optional.
error/messageEnglish is byte-identical. Codes are plain strings that the client narrows withObject.hasOwn, and uncoded (older host), unknown (newer host) or param-incomplete results show the English text. Everything touched here is Electron IPC or an RPC result object. None of it goes through a.strict()schema.Why
These sentences reached the UI in English for non-English users.
Left as-is on purpose:
host-account-sign-in-flows.tsstart/submitCode/not-active,accounts.ts/antigravity-accounts.ts"cannot add accounts/sign in", andruntime-account-controller.tsservices-not-configured.runtime_errorstore read/write failures with file paths, which only surface as thrown errors.git-remote-error.tsandgit-clone-failure-message.ts: every caller throws (push/pull/fetch over IPC and runtime RPC, clone over IPC and RPC), so a code cannot reach the client. The display layer is the renderer'ssource-control-remote-error.ts, which is itself still English and re-classifies the English text. Localizing that belongs in a renderer change.Linked Issue
Refs #32207
Visual Proof
N/A — copy/i18n only.
Testing
pnpm tcpassedpnpm teston the touched areas (host sign-in flows/client, bitbucket, azure-devops, gitea, github, gitlab, runtime-environment store tests, settings components, runtime-environments IPC, new copy tests) passedpnpm sync:localization-runtime-catalogplus all fiveverify:localization-*checks passedpnpm check:code-quality:changedpassedpnpm check:changed --maxWorkers=2passed everything except two steps. The changed-code quality step had one switch-exhaustiveness finding, now fixed and re-checked. The full unit-test step did not finish within 25 minutes on the loaded host, so CI is the gate for it.base_head_title_requireddetail is composed into "Create PR failed: {{detail}}". That is the same structure every existing hosted-review reason uses, so it was left consistent with them.