feat(desktop): answer structured form interactions - #4384
Conversation
f6247a5 to
b814c29
Compare
b814c29 to
661ee44
Compare
828699d to
098cac3
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
PR #4384 — 098cac3 — blind review sealed
Summary: Desktop structured-form answer surface stacked on #4379. Exact head 098cac3a547454b51cf0a37c36b775024583ddc9 frozen. Source is approvable with comments; inherits #4379's 2×P2+1×P3. No simplify finding. Full build passed; 91 focused Desktop/UI tests passed; exact-head hosted test green. 0 reviews/0 threads on stacked base; mergeable on stacked base.
Findings (reproducible):
- P2 — drafts reset on fields identity change — form resets drafts when
fieldsarray identity changes. Runtime Host recovery republishes same pending request as freshly projected objects; React DOM probe typedrelease-candidate, rerendered clone with same request ID → input became empty. Any pending-set change can trigger. Fix: reset only on stablerequestId/semantic revision, add recovery regression. - P2 — constraints not rendered — surface enforces
minimum/maximum, length, cardinality,formatbut renders only generic invalid message. Production render of integermin=max=997+date-timefield contained neither997nordate-time, so legal opaque forms can be undiscoverably unanswerable. Fix: render visible/accessible constraint help and cover formats/ranges.
Gating: hosted test green on stacked base; full stack inherits #4379 risk. Direct current-main merge has explicitly ignored epoch conflict plus generated inventory conflicts (base stack not landed) — not retained as finding.
Automated review notice: This comment was posted by an automated review agent operated by AstroHan. It is not an independent human review and does not replace one.
简体中文
本条结论来自 @捣蛋鬼 在 exact head 098cac3 的独立盲审,已按 @me2seeks 指示排除 compatibility epoch 冲突的计分。编排仅核对 head 未漂移与 CI 状态。
098cac3 to
28ad94a
Compare
|
Fixed both findings in 28ad94a. Draft state is now keyed by requestId, so a recovery projection of the same request keeps local edits while a different request resets them. Field constraints are rendered visibly and linked to their field group through aria-describedby. Added a DOM regression covering cloned fields, request replacement, ranges, formats, and accessible descriptions. |
28ad94a to
5bf55c9
Compare
|
The previous CI failure was the renderer architecture ledger after the rebase, not a form test failure. This head refreshes that ledger and retains the form variant in the composer interaction union alongside main's Goal projection ownership. Local full build, renderer architecture check, UI form regression, and AppShell response regression pass. |
5bf55c9 to
addd05b
Compare
addd05b to
4e66b42
Compare
|
Rebased onto the updated parent head ( The parent narrowed Validation on |
4e66b42 to
78bd322
Compare
|
Rebased onto the updated parent head ( The form responder wiring adds tokens to two debt-tracked legacy files; single-statement conditionals collapse to braceless form so both stay at or below the parent baseline ( Validation on |
78bd322 to
64b659b
Compare
|
Rebased onto the updated parent head ( |
64b659b to
dff1608
Compare
|
Rebased onto the current parent head ( Main rewrote the transcript reading-position block while the parent moved, so the token-debt golf was re-measured from scratch against the new base: seven single-statement conditionals collapse to braceless form and Validation on |
2b7430c to
23e509f
Compare
23e509f to
04616dc
Compare
Render the Host-owned primitive form contract in the shared composer slot for both the main conversation and Side Chat. Preserve optional omission separately from explicit values, validate through the shared core contract, and expose cancel, decline, and accept without introducing surface-owned continuation state. Decode renderer responses at the Desktop IPC boundary, settle them through Runtime Host, and retire prompts only after the authoritative answer succeeds or its acknowledgement is projected. Cover all six field kinds, malformed responses, reconnect hydration, and both Desktop surfaces. Part of #4364. Generated-by: OpenAI Codex
Route main-surface form answers through the existing Desktop platform adapter, expose test-only companion helpers from the Workbar testing entry, and keep legacy AppShell debt monotonic while sharing response settlement behavior. Add focused coverage for answer acceptance and failure retention. Part of #4364.
Refresh the generated Astryx surface inventory for the aligned structured-form prompt. Part of #4364.
Keep the Session Workbar Storybook services aligned with the required structured-form response capability. Part of #4364.
The parent narrows the composer queue to the request kinds a surface without form support can render, so a pending form can no longer hide the composer behind an empty prompt. This branch installs the Desktop form surface, so the shared queue accepts form_request again and retires it on form_answer_ack, matching the boundary/question siblings. Replace the parent coverage that asserted forms stay out of the queue with enter/leave and rehydration coverage for the form kind.
The composer form responder wiring adds tokens to two debt-tracked legacy files. Collapse single-statement conditionals to braceless form so both files stay at or below the parent baseline and refresh the renderer architecture ledger.
The form interaction prompt and its story bring the inventory to 245 files; regenerate so the hosted inventory gate matches the tree.
04616dc to
e8b22e8
Compare
Summary
falsevalues, while validating all six primitive field kinds through the shared core contractWhy
PR #4379 establishes the durable form interaction contract and Runtime Host continuation authority. Desktop still needs a surface adapter so a tool can collect bounded structured input without falling back to an untyped text question or inventing a second pending-interaction owner in the renderer.
This PR is stacked on #4379 and implements the Desktop slice of the rollout in #4364. It does not add provider-specific form state or change the MCP wire path.
Screenshots
Before, Desktop could only render the fixed question prompt. After, the same composer slot renders a structured form, preserves optional field intent, and reports field-local validation errors.
Usability states
trueTest plan
npm run buildPart of #4364.