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. |
Define a bounded provider-neutral primitive form contract and carry its request and acknowledgement facts through the Runtime Event Log. Broker pending forms through the existing InteractionStore authority so schema-invalid answers remain pending, concurrent equivalent answers converge on one canonical outcome, and Turn closure or Host restart closes the exact continuation. Part of #4364. Generated-by: OpenAI Codex
Expose one closed decoder for renderer-to-runtime form responses so surface adapters do not copy protocol validation. Queue the same canonical continuity refresh for form requests that user questions already receive. Refs #4364. Generated-by: OpenAI Codex
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. |
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.
5bf55c9 to
addd05b
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.