Repository navigation
feat(api): the last English reasons on the wire are coded - #178
Merged
Merged
Conversation
- KeySyncFailed.error: the adoption plan/apply error's own coded message
- PricingStatus.error: the refresh error's coded message (the same one the
refresh call returned)
- TurnView.error: read with its code and arguments, like HistoryRow
- the ChatGPT account endpoints' "could not be reached" keeps the data
plane's coded reason and adds the context with Msg::in_context, so
control.chatgpt_backend_unreachable (a {detail} wrapper) is gone;
control.chatgpt_backend_status already carries the backend's body as a
passthrough argument
The rest of the text-like strings in tw-api are user text, upstream text
or rule explanations looked up by rule id.
CONTROL_API_VERSION is 16.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Follow-up to #174/#176: the remaining UI-facing reasons that were plain English strings.
KeySyncFailed.errorMsg— the adoption plan/apply error's own code (adopt.*)PricingStatus.errorMsg— the refresh error's code (control.pricing.*), the same one/pricing/refreshreturnedTurnView.errorMsg— read fromerror_code/error_argslikeHistoryRow.errorcontrol.chatgpt_backend_unreachablegw.upstream.*) plusMsg::in_context(backend = chatgpt)control.chatgpt_backend_statusalready carries the backend's body as a passthrough argument andcontrol.chatgpt_backend_not_jsonhas no English argument, so both stay.Swept every
Stringfield in tw-api whose name suggests text (error/reason/message/detail/why/…). What stays a string is not our sentence:DryRunResult.reason(the deny reason the user wrote), excerpts and samples,ToolCallFlagged.why/SecurityRuleView.why(English rule explanations the UI looks up by rule id),ResetCreditView.title(upstream text).CONTROL_API_VERSION15 → 16.msg-codes.txtupdated.Local: fmt, clippy (
--all-targetsand--lib), workspace tests,tssteps (clippy, tests, export,tsc --strict).🤖 Generated with Claude Code