Uh oh!
There was an error while loading. Please reload this page.
fix(desktop): carry typed OAuth failure reasons from main-process producers - #4887
Draft
orangeCatDeveloper wants to merge 2 commits into
Draft
fix(desktop): carry typed OAuth failure reasons from main-process producers#4887orangeCatDeveloper wants to merge 2 commits into
orangeCatDeveloper wants to merge 2 commits into
Conversation
Settings-area producers (memory, data, permission center, connection test, computer-use health, dev dialogs, Copilot import) emitted zh prose that reached en users verbatim, and presenters sniffed CJK to decide whether to show it. Producers now return stable codes and redact probe detail at the source; each settings catalog maps its codes per locale with complete message templates and an explicit unknown fallback. One capability reason catalog serves the Health center and the Permission Center, bot reasons resolve through the bot catalog, and the memory and Copilot results carry a single code field. Generated-by: Claude Code Generated-by: OpenCode
…ducers get-auth-url maps the Host's operation_conflict to a typed login_in_progress reason and Desktop-owned presentation failures (OAuthPresentationError: presentation_timeout / presentation_absent) to presentation_failed, instead of relying on English prose matching in the renderer. The did-not-present / no-matching-request regex in subscriptionResultMessage goes away; the enrollment-disabled and already-in-progress fallbacks stay as Host version-skew fallbacks for producers that predate the typed codes. Refs apache#2672 Generated-by: Claude Code
orangeCatDeveloperforce-pushed
the
fix/oauth-failure-reasons
branch
from
September 6, 2026 06:58
9393371 to
3c11f78Compare
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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Stacked on #4551; review the last commit only.
subscriptionResultMessagematches two English Host messages with regexes to localize OAuth login failures. One of the three regex families —did not present OAuth|no matching OAuth presentation— describes failures produced by Desktop itself, not the Host: the presentation timeout and the absent-request throw inruntime-host-oauth-presentation.ts. This PR gives those producers a typed error (OAuthPresentationErrorwithpresentation_timeout/presentation_absent) and maps it, along with the Host'soperation_conflict, to typed reasons on theget-auth-urlfailure envelope:operation_conflict→login_in_progressOAuthPresentationError→presentation_failedoperation_unavailable→experimental_disabled(unchanged)The renderer catalog maps the two new reasons per locale and the prose regex is deleted. The
enrollment is disabledandalready in progressfallbacks stay: their producers live in the Runtime Host, which may be remote and older than this client — that is a version-skew fallback, not dead code.loginConflict/browserPresentFailedad-hoc keys are folded intoresultCodes(same wording).Refs #2672
Verification
Not run: Electron e2e with a live Host login flow.
AI use
Tool(s) and scope: Claude Code traced the producer→presenter path, implemented the typed error and reason mapping, removed the regex, added the tests, and wrote this description. Commit carries
Generated-by: Claude Code.Checklist
Does this PR entail a change in behavior?