Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012dn2Aekn4SUoBmQ72vTiZL
…P 403 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012dn2Aekn4SUoBmQ72vTiZL
Contributor
Contributor
Author
|
Reply to the progress knock 7348024557: continue. The maintainer's answer (os-bob, 2026-12-02T14:52Z, on this project's decision card): 「继续推进,请审后合并」. State on head This PR covers only the framework-side items of #39049 and does not close it; the gate fix (option A) is routed to the cloud seat on that card. Generated by Claude Code |
This branch has not been deployed
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.
Requested by bob · project thread
Refs #39049 — the framework-side items listed under "Independent of the choice". The fix itself (option A, ruled on the card) is the cloud gate's and is routed to the cloud seat there; this PR does not close the card.
What changes
useHitlInChat: on a non-2xx decision answer, read the error envelope{ success: false, error: { code, message, details: { reason } } }. The card now shows the server'serror.message(a bare-stringerrorstill shows as before) and carriesdetails.reasonon the decision'serrorstate. With no usable body, the fallback names the button pressed: a failed reject readsRejection failed: HTTP <status>, neverApproval failed.ToolDecisionState: theerrorarm gains an optionalreason.toolDetail) and AI Approvals inbox:reason === 'pending_action_session_required'draws the localized sentenceaiApprovals.sessionRequiredinstead of the server's English text. The reason string lives beside the lapse reason inpendingActionLapse.ts, so both surfaces map it the same way.aiApprovals.sessionRequiredadded to every locale pack and toAI_APPROVALS_DEFAULT_TRANSLATIONS;zh-Hantregenerated byscripts/gen-zh-hant.mjs.headersoption docs ofuseHitlInChat/usePendingActions: dropAuthorizationas the example, and say the decision doors admit only the host's signed-in session.Why
Every in-app AI confirmation in production shows
Approval failed: HTTP 403because the hook ignored the structured error the route sends. Whatever the cloud gate does next, a refusal should say why, in the reader's language, and a failed reject should not call itself an approval.Verification
ChatbotEnhanced.refusedDecision-39049.test.tsx(4 cases, through the real buttons, rendered in zh): session-required reason → localized sentence, no403; unknown reason → server message; empty 502 on reject →Rejection failed: HTTP 502; inbox approve refused for want of a session → the same localized sentence.ui/packages/plugin-chatbot/srcandui/packages/i18n→ 4 failed; with this change → 4 passed.packages/plugin-chatbot/full suite: 87 files, 842 tests passed.packages/i18nsuite plusapp-shelldefaults-maps-mirror-en-pack: passed (the zh-Hant generator test included).Clause-②: no
Metadata-protocol: none
Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code