fix(i18n): map expected failure codes instead of raw messages - #4641
Open
orangeCatDeveloper wants to merge 1 commit into
Open
fix(i18n): map expected failure codes instead of raw messages#4641orangeCatDeveloper wants to merge 1 commit into
orangeCatDeveloper wants to merge 1 commit into
Conversation
orangeCatDeveloper
force-pushed
the
fix/locale-sniff-raw-message
branch
2 times, most recently
from
September 3, 2026 09:48
14a80d6 to
95b736e
Compare
Runtime Host management and thread search already carry stable failure codes, so the renderer maps them through locale catalogs with an explicit unknown fallback. The CJK sniffs in the provider and artifact error presenters guarded producers that no longer throw Chinese copy. Generated-by: Claude Code
orangeCatDeveloper
force-pushed
the
fix/locale-sniff-raw-message
branch
from
September 3, 2026 10:15
95b736e to
6efe16e
Compare
orangeCatDeveloper
marked this pull request as ready for review
September 3, 2026 10:16
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 free
to 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
Five renderer sites still rendered a raw
error.messageor decided what to show by sniffing for CJK characters, so English users saw operator/Host prose verbatim (or, where sniffed, lost the information). Each is now code → catalog:error.codeas an openstringon the wire (operator version skew), so the closed union lives at the presenter —RuntimeHostManagementErrorCode(26 codes) mapped per locale insettings-projects-copy.tswith anObject.hasOwnunknown fallback; all fiveresponse.error.messagerenders go through it. A test reads the CLI'sRuntimeHostServiceManagerErrorcode union from source and asserts every code is mapped, so a new CLI code fails the desktop test suite instead of silently falling back.error.reasonwas already a typedSearchErrorReason; the five reasons thread search emits are mapped inshell-controls-copy.ts, the rest fall back, and thethrownErrorMessageseam that renderederror.messageis gone (raw error goes toconsole.error).provider-panel-shared.tsandartifact-pane.tsx: the CJK-passthrough guards were dead — the main handlers they defend against throw English only today — so they are deleted with a guard test.Not changed:
skill-status.tssniffsskill.description, which is third-party SKILL.md data rather than our copy; the right fix is to show data as-is and drop the keyword blurbs, a product decision left for a separate discussion.Refs #2672
Verification
AI use
Select exactly one:
Tool(s) and scope: Claude Code — producer tracing, implementation, tests, and this description, under the contributor's direction; the commit carries a
Generated-by: Claude Codetrailer.Checklist