Repository navigation
Render AskUserQuestion as an answerable card in the desktop app - #703
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ResolveAsync and AnswerAsync now share a SendResolveAsync tail so the transport-failure/ack mapping and tombstoning live in one place.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoRender AskUserQuestion as an answerable desktop card
AI Description
Diagram
High-Level Assessment
Files changed (20)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 338db6b896
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var s = obj.Str(name)?.Trim(); | ||
| return s is { Length: > 0 } && s.Length <= maxChars ? s : null; |
There was a problem hiding this comment.
Preserve protocol strings after validating whitespace
When a valid question or option label contains leading or trailing whitespace, ProtocolString returns the trimmed value rather than the original protocol value. The composer consequently emits a different answer-map key or selected label from the one in the verbatim questions array, so Claude cannot reliably associate the answer with that question or option; measuring only the trimmed result also lets an over-cap raw string pass. Use trimming only to test for blank content, while preserving and applying the cap to the original string.
Useful? React with 👍 / 👎.
Code Review by Qodo
1.
|
Trimming before measuring the cap let an over-cap raw string through and returning the trimmed copy broke the key match against the verbatim-replayed questions array.
AI-2361 — no GitHub issue exists for this one, so the closing half is dropped.
What & why
A PTY Claude session blocked on
AskUserQuestionshowed a useless Allow / Allow always / Deny card in the desktop app, even though the request already rides the permission lane end to end (thePermissionRequesthook payload reaches the app as a pending permission entry, and the web answers it withallowplusupdatedInput.answers). The app now classifies those entries and renders a question card — every question in the payload, option buttons or checkboxes, an Other free-text per question, click-to-answer for a single single-select — answering over the existingpermission/1wire. No daemon, CLI, or wire change, so it works against any daemon already advertisingpermission/1; the tray splits its wording ("1 question waiting"), and a settlement from any surface clears card, pips and tray as before.Where to look
ClaudeElicitationin Core owns the whole contract: a strict, capped, parser-created immutable model plus a composer that validates every answer against it — that pairing is what bounds the composed resolve frame. Anything unparseable or over-cap falls back to the plain permission card, with "Allow always" hidden for the question tool. The spec riding this PR records the decisions, including why the questions passthrough is byte-faithful in the composer but semantic at the wire.Verification
dotnet test --solution Capacitor.slnx: 10762 total, 10695 passed, 66 skipped, 1 failed —Installed_codex_schema_matches_the_vendored_pin, a machine-local codex 0.150.1 vs vendored 0.147.0 pin drift, unrelated to this diff.dotnet publish src/Capacitor.Cli/Capacitor.Cli.csproj -c Release 2>&1 | grep -E 'IL[23][01][0-9]{2}'→ no output.ClaudeElicitationTests(parse, compose, caps at their boundaries, JSON-element ownership past GC, a maximal worst-case-escaped payload round-tripped throughFrameCodec); service classification matrix, answer/ack/push interleavings and single-snapshot summary; question-card fast path, single flight and dispose-mid-flight; mixed NEEDS YOU row headless smoke; tray wording variants.🤖 Generated with Claude Code