feat(tui): answer structured form interactions - #4392
Conversation
be4056c to
ed745fb
Compare
9fe4ef1 to
773a8c7
Compare
ed745fb to
032d77f
Compare
773a8c7 to
1b643ad
Compare
032d77f to
d8bae9f
Compare
0de6710 to
2c1e2b9
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
PR #4392 — 2c1e2b9 — blind review sealed
Summary: TUI structured-form answer surface stacked on #4379/#4384. Exact head 2c1e2b9ec92f3ab92581de8e676451381ffec553 frozen. Source is approvable with comments; inherits #4379's 2×P2+1×P3. No simplify finding. Full build passed; CLI suites 396/396 green (70-test driver suite after TMPDIR parent fix), exact-head audit green; no hosted test on this head; 0 reviews/0 threads.
Findings (reproducible):
- P2 — reconnect clears pending drafts — replacement
reconnectclears pending interaction and closes overlay, discarding its only#draftscopy. Production recovery then re-seeds same still-pending Host request from defaults. Reducer+overlay probe typedrelease-candidate; after replacement + same-request seed it becameVersion (required): empty. Fix: preserve drafts by{sessionId, requestId}until authority resolves/removes request; add canonical same-request reseeding test. - P2 — constraints not rendered — all Core constraints enforced but none rendered (same as #4384 TUI). Overlay with required integer
min=max=997+ requireddate-timeshowed neither value, only generic invalid feedback → legal forms not discoverably answerable. Fix: render localized range/length/cardinality/format help and test.
Gating: current-main merge clean except explicitly ignored epoch conflict. Inherits base-stack risk.
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 2c1e2b9 的独立盲审,已按 @me2seeks 指示排除 compatibility epoch 冲突的计分。编排仅核对 head 未漂移与 CI 状态。
d8bae9f to
1fba905
Compare
2c1e2b9 to
1804908
Compare
|
Fixed both findings in e898717. The TUI now keeps one schema-matched transient draft snapshot by session/request across the reconnect replay gap, while an authoritative replacement with another request still discards it. Active-field constraints are localized and visible. Added runner-level reconnect replay and overlay regressions. The rebase onto current main also required extending the catalog test values for the new constraint variables (1804908). |
1fba905 to
4609622
Compare
1804908 to
c7abdac
Compare
f1744f3 to
cd16fd6
Compare
c7abdac to
fe3a05f
Compare
|
Rebased onto the updated parent head ( Validation on |
fe3a05f to
e3e26c4
Compare
|
Rebased onto the updated parent head ( |
3dd69e7 to
51bacd2
Compare
e3e26c4 to
4486b9d
Compare
|
Rebased onto the updated parent head ( |
51bacd2 to
9ec0c5f
Compare
4486b9d to
366eb87
Compare
|
Rebased onto the current parent head ( |
9ec0c5f to
0b141e9
Compare
366eb87 to
7a773ed
Compare
0b141e9 to
94d9d5e
Compare
7a773ed to
3e3be1d
Compare
94d9d5e to
b65d7ff
Compare
3e3be1d to
6ebd426
Compare
Review and edit Host-owned forms in the existing TUI interaction queue, preserving optional omission and all six primitive field kinds. Route accepted, declined, and cancelled responses through the generic Runtime Host interaction operation, while non-interactive runs stop the exact Turn instead of dropping the request. Keep requester provenance and sensitive-data guidance visible, validate with the shared Core contract, and retire stale overlays when authoritative transcript state changes. Part of #4364. Generated-by: OpenAI Codex
The TUI form sources predate the formatter rules now on main; rebase onto the current parent and reformat so the changed-file biome gate passes. Reflow and trailing commas only, no semantic change.
b65d7ff to
b3b1072
Compare
6ebd426 to
2f13e01
Compare
M4n5ter
left a comment
There was a problem hiding this comment.
Reviewed at exact commit 2f13e01fb54cb631f8303fd0e99869a83050f367.
The TUI keeps form drafts only for the same Session, request, and schema, clears them after settlement or an incompatible replacement, and renders the constraints enforced by the shared form contract. The current dependency audit, builds, and affected transcript/form/runner tests pass, and I found no blocking correctness or design issue in this change.
Automated review notice: This comment was posted by an automated review agent operated by M4n5ter. It is not an independent human review and does not replace one.
Summary
maka runinstead of dropping a request it cannot answerWhy
#4379 establishes the provider-neutral, Host-owned form contract. Without a TUI adapter, an interactive CLI Turn that receives one of those requests has no way to continue. This PR keeps Runtime Host as the only lifecycle and answer authority; the overlay owns only an uncommitted local draft.
This is a sibling of the Desktop adapter in #4384. Both depend directly on #4379; neither surface depends on the other.
Part of #4364.
Screenshots
Captured from the production TUI runner at the exact parent and current heads.
Test plan
npx biome checkon all changed filesnpm run buildTMPDIR=/dev/shm/maka-4364-tui-tests node --test --test-reporter=dot 'packages/cli/dist/**/*.test.js'Generated-by: OpenAI Codex