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(mobile): recognize update refusals by their code, not their translated text - #52834
When a computer's Orca is too old for something, the phone shows an "Update Orca on " notice. For automations and branch choice it decided that by comparing the error's translated words, so changing the phone's language while the error was showing brought back the old red sentence. Now it decides from the error itself.
Files
Added
Deleted
Net
Test
0
0
0
0
Prod
20
$\color{#1a7f37}{\Huge{\mathbf{+}}}$89
$\color{#cf222e}{\Huge{\mathbf{−}}}$69
$\color{#1a7f37}{\Huge{\mathbf{+}}}$20
What Changed
Before: after an in-place language change, these refusals were compared against a fresh translation. They no longer matched, so the update notice disappeared and the old sentence came back:
the automation catalog's "too old for automations"
the automation editor's "can't check this project's agents"
New workspace's "can't take a branch choice"
Now:
Automations: one classifier, automationUpdateRefusal, reads the raw failure. automationErrorMessage also uses it, so the text and the notice can't disagree.
Automation catalog and editor: they keep the action failure and the agent-check failure untranslated, and translate at render. The line now follows the language too. useAutomationCatalog exposes hostOutdated, which AutomationCatalogNotes and Home > Automations read in place of matching text.
Branch choice: the create retry returns a stable code, BRANCH_CHOICE_NEEDS_NEWER_HOST, and the form matches on that. The workspace.branchChoice.hostUpdateRequired key is removed; it was only used for matching.
Why
Matching translated strings breaks whenever the language changes, and it can collide when two keys translate the same way. Keys and codes don't.
Linked Issue
Follow-up to the update-notice migration (#52368, #52373). No issue.
Visual Proof
N/A: what shows is unchanged; the notice now also stays after a language change.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
How it was checked:
On main, a throwaway test with the real i18n module: refusals translated in English, then the language switched to German. All three matchers returned false.
On this branch, the same check: the classifiers still return agent-verification and host.
pnpm check:changed and mobile tsc pass.
No test is committed: the classifier is a few lines that call no translator.
Performance
None, because classification is at most a few string checks on an error the screen already holds; at most two error translations per render, only while an error shows.
Risk
Level: Low
What could go wrong: an automation failure with an unexpected shape classifies as nothing and shows its text, as before. A plain revert undoes this.
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
No actionable comments were generated in the recent review.
Walkthrough
Automation errors are classified from raw failures, and the catalog and editor use that classification to determine outdated-host and agent-verification notices. Worktree creation now returns a stable error code for unsupported branch intent, and the form checks that code to display the host-update notice. Locale files remove the former branch-choice host-update message.
Merge Risk: Minimal · up to 58c03
This change keeps host-update notices visible after an in-place language change by classifying raw errors instead of translated text. No concrete defect was found, and it is low risk to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: update refusals are now recognized by their stable code instead of their translated text. It matches the description's core fix (classifiers read raw failures, branch …
Description check
The description follows the repository template. It has ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill boundary, Notes, and Checkli…
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: Title check
Explanation
The title names the main change: update refusals are now recognized by their stable code instead of their translated text. It matches the description's core fix (classifiers read raw failures, branch choice matches a constant). The title is specific, single-sentence, and within normal length, though it is slightly long at 79 characters.
Full details: Description check
Explanation
The description follows the repository template. It has ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill boundary, Notes, and Checklist sections. The before/after, mechanism, risk level, and performance reasoning are filled in. The Linked Issue section cites a follow-up to #52368 and #52373 but does not use the required 'Fixes #' issue link, and the author states 'No issue'. The AI Disclosure section is left as the template comment. The Performance line is completed. The Testing section explains a throwaway test rather than committed automated tests, which is acceptable given the stated reasoning. The Linked Issue gap is the main shortfall, so the check is not a full pass but the description is mostly complete.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
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.
ELI5
When a computer's Orca is too old for something, the phone shows an "Update Orca on " notice. For automations and branch choice it decided that by comparing the error's translated words, so changing the phone's language while the error was showing brought back the old red sentence. Now it decides from the error itself.
What Changed
Before: after an in-place language change, these refusals were compared against a fresh translation. They no longer matched, so the update notice disappeared and the old sentence came back:
Now:
automationUpdateRefusal, reads the raw failure.automationErrorMessagealso uses it, so the text and the notice can't disagree.useAutomationCatalogexposeshostOutdated, whichAutomationCatalogNotesand Home > Automations read in place of matching text.BRANCH_CHOICE_NEEDS_NEWER_HOST, and the form matches on that. Theworkspace.branchChoice.hostUpdateRequiredkey is removed; it was only used for matching.Why
Matching translated strings breaks whenever the language changes, and it can collide when two keys translate the same way. Keys and codes don't.
Linked Issue
Follow-up to the update-notice migration (#52368, #52373). No issue.
Visual Proof
N/A: what shows is unchanged; the notice now also stays after a language change.
Testing
How it was checked:
agent-verificationandhost.pnpm check:changedand mobiletscpass.Performance
None, because classification is at most a few string checks on an error the screen already holds; at most two error translations per render, only while an error shows.
Risk
Level: Low
What could go wrong: an automation failure with an unexpected shape classifies as nothing and shows its text, as before. A plain revert undoes this.
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)