Repository navigation
fix(native-chat): replace the raw question tool row with an awaiting-input row - #20724
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the full 12-file diff at 245c873, tracing the ask row from derivation through both the native and structured transcript paths.
- Shared ask-row derivation —
native-chat-ask-row.tsresolves the row from the tool name alone (so an unparseable payload still draws the row) and aggregates subjects across every ask call in a run, which collapses Codex's one-call-per-question items after folding merges them. - Tool-input parsing —
parseAskFromToolInputdecodes JSON-string arguments before the registered-parser dispatch, matching how live status is parsed. - Awaiting-input row — new component renders
Awaiting user input:/Asked:with the pulsing label underprefers-reduced-motion, a grouped prompt reporting its question count, and the sharedmessage-square-moreglyph. - Run header accounting —
NativeChatToolRunfilters ask calls out ofheaderBlocks, so they leave both theN×count and theRunning …active row, and suppresses the header entirely for an ask-only run. - Structured projection — pending
questionitems now project to arequest_user_inputrunning call instead ofnull, andAskUserQuestiontool-call items are dropped so Claude's call+question pair draws one row.
I confirmed the pending state stays truthful in production: activeTurnIsWorking remains true while a question blocks the turn (use-structured-agent-session.ts:110 keeps turnId, and the turn record is still running), so the structured row reads Awaiting rather than Asked. The projection change is also order-safe for the worker cursor — structuredJournalPrefixIdentity filters with the same projectStructuredItemToNativeChat, so message index and item index stay aligned. The two renamed tests move AskUserQuestion to a genuinely unmodelled name, preserving their original intent. The new tests use exact assertions (animate-pulse class, exact subject objects, 1×), so they would fail if the behavior regressed. pnpm test on the four new/changed suites (55 tests) and the localization extraction gate both pass.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Review complete on 9e01ce6.
Verdict: pass with residual risk. Duplicate suppression uses normalized question text within an inferred turn; distinct identical prompts in one turn could theoretically collide. Mobile raw-row rendering remains the known deferred follow-up. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the delta at 9e01ce6, the only commit since the prior pullfrog review, read against the full 18-file net diff.
- Moved question presentation out of the shared projection — the new renderer-local
structured-agent-question-projection.tsnow owns the pending-question row and ask-call suppression, injected intoprojectStructuredAgentSessionMessagesthrough a new optionalprojectItemsparameter. The shared projection is reverted to byte-identical withmain(git diff --merge-base origin/mainoverstructured-agent-session-projection.tsandstructured-agent-session-message-projection.tsis empty), so the host/archive/worker-RPC lane and itsstructuredJournalPrefixIdentitymessage↔item index pairing are untouched — this resolves the cross-lane divergence the first commit introduced. - Ask-run accounting reworked —
nativeChatAskRunBlockspairs each ask call with its FIFO result and removes both from the run's work while preserving failed calls and errored results;NativeChatToolRunderives the header count, the active call, the settled glyph, and the member rows fromworkonly, so an ask-only run draws no1×. - Awaiting/Asked row wired into receipts —
NativeChatResolutionReceiptrenders the pending awaiting row and the settledAsked:row for question bodies;NativeChatAwaitingInputRowcarries the copy,message-square-moreglyph, pulse, andmotion-reduce:animate-none. - Tests — projection, grouping, suppression, failed-call preservation, and row-state coverage added; two
AskUserQuestion-as-unmodelled stand-ins moved toCreateWidget.
I re-ran the affected suites (pnpm exec vitest run --config config/vitest.config.ts across 9 files, including the new ask-row, question-projection, turn-history, tool-run, receipt, and hook tests): 110 passed. The new tests use exact assertions (exact subject objects, animate-pulse/motion-reduce:animate-none classes, 1×, Asked: vs Awaiting user input:), so they fail if the behavior regresses. The pending-state truthfulness still holds — the projection keeps a pending question attached to the running turn, so the row reads Awaiting while the agent is blocked and Asked once the turn stops.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change adds shared question-call parsing and grouping helpers. Native chat renders awaiting and asked rows with question text or counts, while excluding question calls from tool-work summaries. Structured session projection preserves pending questions, groups adjacent pending questions, suppresses duplicate tool rows, and retains resolved receipts. Session hooks and message lists use the new projection. English translations, icon mappings, and test coverage were added. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The native question-row behavior is ready to merge; resolved questions no longer hide matching tool-call transcript rows. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the implementation, rationale, behavior, testing, validation, and residual risks. However, it does not follow the required template and omits the required Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. Resolution Add all required template sections. Provide a linked issue using ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9e01ce6 to
8ee29e3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 455a450b-166c-46c5-8163-a75bdc751a38
📥 Commits
Reviewing files that changed from the base of the PR and between 9e01ce6 and 8ee29e3610e674e5806ae33a94e4f3f9aee01bad.
📒 Files selected for processing (3)
src/renderer/src/components/native-chat/NativeChatMessageList.tsxsrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
- src/renderer/src/i18n/locales/en.json
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| "ask": { | ||
| "asked": "Asked:", | ||
| "awaiting": "Awaiting user input:", | ||
| "questionCount": "{{value0}} questions" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Restore the approval cancellation label. For approval prompts, NativeChatStructuredSession passes cancelPrompt to NativeChatApprovalCard. The card reads components.native-chat.approval.cancel for the cancel button's aria-label. Since the runtime-required catalog omits this key, translate uses its Cancel default value. The control remains usable, but its accessible label falls back to English instead of the localized value. Restore the key in the runtime-required catalog.
…input row
A question tool call rendered as ordinary tool activity — "Running
AskUserQuestion" with a clipped JSON payload while live, then a "1x
AskUserQuestion {...}" run header once settled — so the one row the reader
actually has to act on read as machine output.
It now draws as "Awaiting user input: <question>", led by a comment-bubble
glyph, with the label pulsing while the answer is outstanding and reading
"Asked: <question>" once it lands. A grouped prompt names how many questions
it asks rather than quoting only the first, since one row stands for the whole
prompt. Question calls also leave the run header, so the count beside them
reports only the work that actually ran.
Codex journals only the question and never a call for it, and a pending
question was dropped from the transcript entirely — its chat log said nothing
while the agent sat blocked on the reader. Pending questions now project the
same row. Claude journals both the call and the question it raised, so the
call itself is suppressed and the one row is fed from one source.
…n item The first pass fabricated a synthetic `request_user_input` tool call inside the shared journal projection so that one renderer could serve every lane. That made a presentation choice on behalf of every consumer of that projection, including archives and older RPC clients that never asked for it. Question presentation is now client-local. The shared projection is restored untouched, and the desktop transcript derives its own rows: a pending question keeps a stable identity row through tool folding while its receipt draws the awaiting line, and the duplicate AskUserQuestion call Claude journals beside the question it raised is suppressed only when a matching question is open in the same turn — so an unmatched call, or one from a lane that journals no question, still reports itself. Question calls now leave the run together with their paired result, which stops a summarized ask from stranding its answer as an orphan Result row. A failed ask keeps its error instead of being folded into the awaiting row, and an ask no longer contends with a concurrently running tool for the active slot: both are reported. Adjacent pending questions — the shape Codex journals, one item per question — group into a single awaiting row that narrows as each one is answered. Also ships the three awaiting-row strings in the runtime-required English catalog. Their call-site fallbacks are a shared constant rather than string literals, so i18next cannot rebuild them from the call site and they have to be present for the static-analysis gate to pass.
8ee29e3 to
67a1e70
Compare
|
Note on the review verdict above, which was recorded against The branch has been rebased twice since, and is now
CI is now green on Residual risk, unchanged: duplicate suppression matches on normalized question text within an inferred turn, so two genuinely identical prompts inside one turn could collide and have a row suppressed. Mobile still renders the raw row and is a deliberate follow-up. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 1ff66e6d-8e74-4382-bcc3-e526c5b8d9d9
📒 Files selected for processing (2)
src/renderer/src/components/native-chat/structured-agent-question-projection.test.tssrc/renderer/src/components/native-chat/structured-agent-question-projection.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the delta at 9e857d9, the only commit since the prior pullfrog review (9e01ce6), read against the full 18-file net diff.
- Reworked the per-turn question tracker in
structured-agent-question-projection.tsfrom aSet<string>to aMap<string, number>that decrements as each matchingAskUserQuestioncall is suppressed, so a turn with fewer question items than same-text calls keeps the unmatched calls instead of hiding all of them. - Added a projection test asserting that two identical calls beside one question item leave the second call in the transcript (
[ask-2, q]); with the oldSetit would collapse to[q].
I traced both passes — the turn-scoped counting keyed by the same normalized question key the call carries, and the in-order consumption — and the order-independence, failed-call exclusion, and turn-boundary guard all still hold. pnpm exec vitest run --config config/vitest.config.ts across the four ask-row suites: 26 passed. I also confirmed the runtime-required catalog's drop of components.native-chat.approval.cancel is by design: its only call site passes the identical literal Cancel, so the entry is superfluous, and node config/scripts/generate-runtime-required-english-catalog.mjs passes with no missing keys (1689/14304).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the delta at 4e36989 (two commits since the prior pullfrog review), read against the full 19-file net diff.
- Corrected the settled heading for a single grouped question in
NativeChatResolutionReceipt.tsx: when the prompt's generic label (1 grouped question from Claude) differs from its one question, the settledAsked:row now shows the generic label, leaving the answer line as the only place the specific question text appears — undoing the repetition9e857d9had introduced. - Kept the specific question text on the pending row, where no answer line exists to carry it.
- Added receipt tests for both: the settled grouped heading is distinct from its answer line (
Libraries?appears exactly once), and the pending grouped prompt names the actual question instead of the generic label.
I traced the three cases through nativeChatReceiptAnswers — settled single grouped (generic heading + specific answer line, matching base main), pending single grouped (specific), and multi-question grouped (count) — and the change is a renderer-local presentation tweak with no wire impact. pnpm exec vitest run --config config/vitest.config.ts on the receipt, projection, and turn-history suites: 23 passed.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the delta at 7821046 (two commits since the prior pullfrog review), read against the full 19-file net diff.
- Suppressed the answer line's question when it would repeat the receipt's
Asked:heading for a single-question prompt, so a Claude legacy-compatible single question (wherebody.question === questions[0].question) no longer prints the same text twice. - Kept the answer question line when it carries new information: the settled generic-label case still shows
1 grouped question from Claudein the heading with the specific question above its answer. - Added a receipt test asserting the single legacy-compatible question text appears exactly once (
Libraries?), alongside the existing grouped-single coverage.
I traced all four shapes (legacy-compatible single, grouped single, multi-question, flat single) through subject and nativeChatReceiptAnswers; the dedup guard only fires when the texts are byte-equal, so the generic-label and multi-question cases are untouched, and the pending path has no answer line at all. pnpm exec vitest run --config config/vitest.config.ts on the receipt, projection, ask-row, and tool-run suites: 33 passed.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Electron UI validation (isolated dev instance)Attached uncropped screenshots from a background-launched Orca on this worktree ( JSONL / bridge native chat (existing e2e seed)Pending Claude JSONL still draws the old tool header, because Structured transcript (the changed desktop row)Production Pending — Grouped — one row: Resolved — No product console errors. Isolated profile had no agent credentials, so structured rows were seeded journal state in the real Electron native-chat surface rather than a live Claude/Codex session. |
There was a problem hiding this comment.
Important
Preserving settled ask calls re-exposes a matched call once its question has been answered, so for the rest of the active turn the transcript draws the ask twice — Asked: <question> beside the receipt's identical Asked: row, or a pulsing Awaiting user input: when the tool result has not landed yet, even though the reader already answered.
Reviewed changes — the delta at 130c02d (the only commit since the prior pullfrog review at 7821046), read against the full 19-file net diff.
- Narrowed the duplicate-call suppression tracker: a
questionitem now registers its normalized key only while its resolution ispending, so a matchingAskUserQuestioncall is no longer suppressed once that question is settled. - Added a projection test asserting a completed call beside a resolved question leaves both rows in the transcript (
['ask', 'q']).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the delta at 66a38eb (two commits since the prior pullfrog review at 130c02d), read against the full 21-file net diff.
- Settled questions now fold their matching call —
structured-agent-question-projection.tsregisters a question item's normalized key regardless of resolution, so a matchingAskUserQuestioncall is suppressed once the question is answered and the receipt'sAsked:row is the only one drawn. This resolves the⚠️ duplicate-row finding from the prior review; I confirmed[turn, call, resolved question]now projects to['q'], and the updated projection test would fail under the old pending-only gate. nativeChatAskRunBlocksreportsunansweredAsks— an ask is only "active" until its FIFO result arrives, andNativeChatToolRundrives the row's pulse from that subset while the subject still comes from the whole run, so a settled call draws a staticAsked:.- The ask row is no longer gated on
structuredActivityUi—nativeChatAskRunBlocksruns unconditionally, andactiveTurnIsWorkingdropped itsshowTurnStatusgate innative-chat-transcript-slots.ts, so the bridge view (NativeChatResolvedView, which passesshowTurnStatus={false}) replaces the rawAskUserQuestionrow and pulses it while the agent is blocked. I tracedactiveTurnIsWorking's consumers: the header and completed-turn guard stay gated onstructuredActivityUi, so the widened scope lands on the ask row only. - Bridge-path coverage — a new
NativeChatMessageListtest exercises a transcript-built ask call settling from a separate folded FIFO tool result, alongside the updated projection test. All 7 affected suites (61 tests) pass.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes — the delta at 15201df (one commit since the prior pullfrog review at 66a38eb), a test-only addition with no production change.
- Settled-receipt coverage — added a
NativeChatMessageList.turn-history.test.tsxcase that renders Claude'sAskUserQuestioncall beside its resolved question and asserts a singleAsked:row with no raw call.
The production fix itself is unchanged from 66a38eb, and the projection test (folds a settled matching tool call into its resolved question receipt) still locks it — I re-ran it with the pending-only gate restored and it fails as expected. The one note below is about how much the new test adds on top.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
|
||
| render(view([user, call, question])) | ||
|
|
||
| expect(screen.getAllByText('Asked:')).toHaveLength(1) |
There was a problem hiding this comment.
This assertion passes even with the settled-call fold reverted — I restored the old pending-only gate and the Asked: count stayed at 1. The completed-turn guard in NativeChatToolRun hides the preserved call whenever activeTurnIsWorking === false, which the view helper always is (isWorking={false}), so this test does not reach the behavior it is named for. Rendering this case with isWorking true (or an expandOverride that defeats the guard) would make it lock the fold.
Technical details
# The new turn-history case is masked by the completed-turn guard
## Affected sites
- `src/renderer/src/components/native-chat/NativeChatMessageList.turn-history.test.tsx:144` — asserts one `Asked:` row for `[user, call, resolved question]`, but `view()` renders with `isWorking={false}` and no `expandedTurnIds`.
- `src/renderer/src/components/native-chat/native-chat-transcript-slots.ts:86-88` — with `isWorking` and `lifecycleWorking` both false, `activeTurnIsWorking` is false.
- `src/renderer/src/components/native-chat/NativeChatToolRun.tsx:178-189` — the settled run is hidden when `structuredActivityUi && expandOverride === false && isSettled && activeTurnIsWorking === false`, so a preserved call draws nothing either way.
## Evidence
- With `structured-agent-question-projection.ts` restored to the pending-only registration, `structured-agent-question-projection.test.ts` fails (`['ask-1','ask-2','q']`), but this new turn-history test still passes (6/6).
## Required outcome
- The test should be able to fail when the projection stops folding a settled matching call, so the settled path has an end-to-end lock rather than relying on the projection-level test alone.
## Suggested approach
- Give `view` an `isWorking` option and render this case with `isWorking` true, or wrap the messages so `activeTurnIsWorking` is true for the row.
Review statusThe review loop is clean at 15201df. Code review
Validation
CI status
Verdict: the code is ready, but wait for the unrelated upstream static-analysis fix before merging. |
Post-merge CI updateThe latest run at 852af43 is still red, but the failure moved to an upstream main file:
The native-chat code remains validated and clean. This PR is waiting on the upstream mobile lint fix. |
Add data-testid to NativeChatQuestionCard's title element and update the e2e test to query by testid with a text filter. The transcript row also renders the question text, so the previous test could match either location, causing flaky results. Gating on the card's own title node ensures the assertion verifies the card is actually rendered. Fixes #20724
* test: target question card title by testid instead of text Add data-testid to NativeChatQuestionCard's title element and update the e2e test to query by testid with a text filter. The transcript row also renders the question text, so the previous test could match either location, causing flaky results. Gating on the card's own title node ensures the assertion verifies the card is actually rendered. Fixes #20724 * test(browser-history): budget the fastest sample, not p95 The prepare/match budget assertions measure wall clock inside a vitest worker that shares cores with the rest of the shard, so a slow sample records a preemption rather than the matcher. CI shard 6/8 measured a p95 of 3.57 ms against the 2 ms ceiling while the same test passes in isolation; #18788 already records this file failing the same way. Assert the fastest sample instead, matching the estimator the palette matcher budget already uses for the same reason. Ceilings stay at 2 ms. Measured locally (20 samples per batch): the fastest sample moved 0.05 ms -> 0.08 ms between idle and a 3,374-file parallel run, while p95 of those same batches swung 0.09 ms -> 0.50 ms. * test: target question card title by testid instead of text Add data-testid to NativeChatQuestionCard's title element and update the e2e test to query by testid with a text filter. The transcript row also renders the question text, so the previous test could match either location, causing flaky results. Gating on the card's own title node ensures the assertion verifies the card is actually rendered. Fixes #20724
…input row (stablyai#20724) * fix(native-chat): replace the raw question tool row with an awaiting-input row A question tool call rendered as ordinary tool activity — "Running AskUserQuestion" with a clipped JSON payload while live, then a "1x AskUserQuestion {...}" run header once settled — so the one row the reader actually has to act on read as machine output. It now draws as "Awaiting user input: <question>", led by a comment-bubble glyph, with the label pulsing while the answer is outstanding and reading "Asked: <question>" once it lands. A grouped prompt names how many questions it asks rather than quoting only the first, since one row stands for the whole prompt. Question calls also leave the run header, so the count beside them reports only the work that actually ran. Codex journals only the question and never a call for it, and a pending question was dropped from the transcript entirely — its chat log said nothing while the agent sat blocked on the reader. Pending questions now project the same row. Claude journals both the call and the question it raised, so the call itself is suppressed and the one row is fed from one source. * refactor(native-chat): derive the awaiting-input row from the question item The first pass fabricated a synthetic `request_user_input` tool call inside the shared journal projection so that one renderer could serve every lane. That made a presentation choice on behalf of every consumer of that projection, including archives and older RPC clients that never asked for it. Question presentation is now client-local. The shared projection is restored untouched, and the desktop transcript derives its own rows: a pending question keeps a stable identity row through tool folding while its receipt draws the awaiting line, and the duplicate AskUserQuestion call Claude journals beside the question it raised is suppressed only when a matching question is open in the same turn — so an unmatched call, or one from a lane that journals no question, still reports itself. Question calls now leave the run together with their paired result, which stops a summarized ask from stranding its answer as an orphan Result row. A failed ask keeps its error instead of being folded into the awaiting row, and an ask no longer contends with a concurrently running tool for the active slot: both are reported. Adjacent pending questions — the shape Codex journals, one item per question — group into a single awaiting row that narrows as each one is answered. Also ships the three awaiting-row strings in the runtime-required English catalog. Their call-site fallbacks are a shared constant rather than string literals, so i18next cannot rebuild them from the call site and they have to be present for the static-analysis gate to pass. * fix(native-chat): preserve unmatched duplicate question calls * fix(native-chat): avoid repeated grouped question text * fix(native-chat): keep pending question text specific * fix(native-chat): avoid repeating single question answers * fix(native-chat): narrow question receipt subject * fix(native-chat): preserve settled ask calls * fix(native-chat): cover bridge ask rows * fix(native-chat): fold settled ask receipts * test(native-chat): cover settled ask receipt folding
…21153) * test: target question card title by testid instead of text Add data-testid to NativeChatQuestionCard's title element and update the e2e test to query by testid with a text filter. The transcript row also renders the question text, so the previous test could match either location, causing flaky results. Gating on the card's own title node ensures the assertion verifies the card is actually rendered. Fixes stablyai#20724 * test(browser-history): budget the fastest sample, not p95 The prepare/match budget assertions measure wall clock inside a vitest worker that shares cores with the rest of the shard, so a slow sample records a preemption rather than the matcher. CI shard 6/8 measured a p95 of 3.57 ms against the 2 ms ceiling while the same test passes in isolation; stablyai#18788 already records this file failing the same way. Assert the fastest sample instead, matching the estimator the palette matcher budget already uses for the same reason. Ceilings stay at 2 ms. Measured locally (20 samples per batch): the fastest sample moved 0.05 ms -> 0.08 ms between idle and a 3,374-file parallel run, while p95 of those same batches swung 0.09 ms -> 0.50 ms. * test: target question card title by testid instead of text Add data-testid to NativeChatQuestionCard's title element and update the e2e test to query by testid with a text filter. The transcript row also renders the question text, so the previous test could match either location, causing flaky results. Gating on the card's own title node ensures the assertion verifies the card is actually rendered. Fixes stablyai#20724





What this changes
A question tool call rendered as ordinary tool activity in the chat log:
Running AskUserQuestionwith a clipped JSON payload while live, then a1x AskUserQuestion {"questions":[…]}run header once settled. We already render a card for the reader to answer, so the one row they actually have to act on was the one reading as machine output.It now draws as a plain row:
Awaiting user input: <question>, led by a comment-bubble glyph, with the label pulsing while the answer is outstanding. Uses the sameanimate-pulseevery other live row in native chat already uses, and drops the motion underprefers-reduced-motion.Asked: <question>, no pulse. A row that still claimed to be waiting would be saying something false.Why Codex needed more than a re-skin
The two agents do not behave the same way, so a renderer-only fix would have covered one of them:
Where the row is derived
Question presentation is client-local. The shared journal projection is left untouched, so archives and older RPC consumers keep the projection they already had — the desktop transcript derives its own rows in
structured-agent-question-projection.ts.A pending question keeps a stable identity row through tool folding while its receipt draws the awaiting line. The duplicate
AskUserQuestioncall Claude journals beside the question it raised is suppressed when a matching question item is present in the same turn, so an unmatched call — or one from a lane that journals no question at all — still reports itself.Two further behaviours fall out of that:
Resultrow, and theN×count beside them reports only the work that actually ran.Adjacent pending questions — the shape Codex journals, one item per question — group into a single awaiting row that narrows as each one is answered.
Localization
The three row strings take their
translate()fallback from a shared constant rather than a string literal (the existing pattern in this folder, so the desktop fallbacks and mobile cannot drift). i18next cannot rebuild a value from a non-literal call-site default, so they also ship inen-runtime-required.json; without that the static-analysis gate fails.Tests
src/shared/native-chat-ask-row.test.ts— single vs grouped subject, Codex's JSON-string arguments, the per-question calls Codex journals for one prompt collapsing into a single row, and an ask whose payload names no question still drawing the row.src/renderer/src/components/native-chat/structured-agent-question-projection.test.ts— a pending question gets a row, a grouped prompt prefers its own question list, matched duplicates are suppressed while failed and unmatched calls survive, turn boundaries are respected, and the host projection is left unchanged.src/renderer/src/components/native-chat/NativeChatToolRun.ask-row.test.tsx— both states from the report, the header count beside an ask, a pending question alongside another running tool, a failed ask preserving its error, and no stale state after a turn stops.src/renderer/src/components/native-chat/NativeChatMessageList.turn-history.test.tsx— end to end: the row and its question render withrequest_user_inputabsent, resolution swaps toAsked:with the answer, and Codex's separate question items collapse to one2 questionsrow that narrows after a single answer.Two existing tests used
AskUserQuestionas a stand-in for an unmodelled tool; it is modelled now, so they were moved to a genuinely unmodelled name and still test what they meant to.Validation
pnpm tc, 94 tests across the six affected files, the fullpnpm lintchain (all four localization gates, max-lines ratchet, anti-slop rules) and the changed-code quality gate all pass. An independent review pass ran readiness checks at both ends and captured visible proof in the app.Residual risk and follow-ups
src/shared/native-chat-ask-row.tsso mobile can read the same strings; wiring it is a follow-up.