Repository navigation
feat(app): queue and steer follow-up prompts - #44683
Conversation
97aed5c to
f1732b6
Compare
|
Responses to the review findings — all addressed in the latest push except where server support is required (this PR is intentionally app-only): [P1] Defer model/agent changes until queue delivery — Fixed. [P1] Make queue rewrites atomic — Mitigated client-side. Clones are now admitted under client-minted IDs, and when an original's cancellation conflicts (it delivered because the turn hit its idle boundary mid-rebuild), its clone is withdrawn instead — so the race degrades to "reorder didn't apply", never duplicate execution or loss. True atomicity needs a server-side reorder endpoint. [P1] Do not cancel before admitting an edited steer — Fixed. The steer is admitted first; the original is cancelled only once the steer exists. A failed admission leaves the original queued and restores the edited text into the composer for retry. [P2] Wait for optimistic admission before rebuilding an edit — Fixed. [P2] Restore the complete draft state after editing — Fixed. The stash now captures mode and the retry marker; [P2] Preserve review-comment instructions during edits — Fixed. [P2] Disable reordering while editing — Fixed. Sortables are disabled while an edit is open (and while a rebuild is in flight), and [P2] Order revert cancellation against admissions — Improved within app-only constraints: revert now cancels the union of the authoritative inbox list and the local snapshot (still fire-and-forget so restore is not delayed). An admission still in flight when the list is fetched can survive the sweep; fully closing that requires a server-side revert-discards-inbox rule — flagged in the code comment as follow-up. New coverage: "steering an edited prompt admits the steer before cancelling the original" asserts the admission/cancel ordering; the queue suite is now 8 e2e tests, full app suite still green. |
|
Round-two findings — all addressed in the latest push, within the app-only constraint: [P1] Do not clone optimistic payloads — Fixed by removing the merge entirely. [P1] Only roll back clones after a verified delivery conflict — Fixed. [P1] Preserve queued model and agent selection — Commands fixed to match prompts: [P1] Handle failure when cancelling an edited steer's original — Fixed. The steer's original is cancelled through [P1] Make revert and inbox cancellation one server-side boundary — Agreed that the complete fix is server-side; noted in the code as the follow-up. Client-side the sweep now uses a [P2] Keep the edit stash until confirmation succeeds — Fixed by inverting the flow: the stash is restored only after the confirmation lands. A failed confirmation keeps the edit open with the edited content still in the composer (correct mode included), so nothing is overwritten or lost and Enter retries. The [P2] Preserve or disable rich content during queue edits — Preserved. Confirming an edit now builds a real prompt request from the composer content ( [P2] Do not merge a stale local queue row over an authoritative steer — Resolved by construction: with the merge removed, a row another client steered shows up in the settled authoritative list with steer delivery and simply drops out of the rewrite; it is never cloned or cancelled. Full queue suite (8 e2e) green, composer unit tests green, full app suite re-run green. |
947e380 to
0cbde34
Compare
|
Round-three triage. This round splits into deterministic bugs (fixed) and race-window enumerations that a client cannot close against these APIs (declined or noted as server-side follow-ups) — further client-side compensation machinery is what created several of these windows in the first place. Fixed (deterministic):
Declined / follow-ups:
Also rebased onto latest |
0cbde34 to
125f6c8
Compare
|
Round-four triage — final position for this PR. Taken: queued move/compaction/synthetic items are now treated as ordering barriers: a rewrite aborts and leaves the queue untouched instead of reordering prompts around a control item (2-line guard). Everything else is declined for this PR, deliberately. Six of the ten findings re-raise items already resolved as declined or as server-side follow-ups (per-item selection at promotion, revert-inbox boundary, lost-response idempotency, concurrent-client races, withdrawal verification). The command finding reverses the previous round's: round three flagged that queueing a command reconfigures the running turn, this round flags the fix for that — and correctly notes the actual answer is server-side command handling. There is no client-side resolution to choose from, only two imperfect behaviors; commands-always-steer matches pre-PR v2 exactly and keeps the running turn intact, so it stays. The remaining windows share one shape: they simulate atomicity the inbox API does not offer, and each client-side compensation layer manufactures the next review round's findings (this round's withdrawal-verification finding is a hole in round two's compensation, which was itself a fix for round one's). The durable fix is a small server surface — inbox reorder/edit endpoints, per-item selection honored at promotion, and a revert-discards-inbox rule — at which point most of the client scaffolding here (settledPendingList, cancelQueued, clone withdrawal) gets deleted, not extended. That is the follow-up worth doing; more client machinery is not. Feature has been manually tested end to end; queue suite is 8/8 e2e plus storybook visual states matched against the Figma comps. |
125f6c8 to
27dd1a0
Compare
e1d191c to
b872fd1
Compare
b872fd1 to
a1a9511
Compare
Implements the complete Figma queue/steer follow-up workflow using existing V2 prompt and inbox APIs.
Included
No core, server, protocol, client-generation, migration, or TUI changes are included.
The existing inbox API cannot reorder rows directly, so drag reordering and position-preserving edits temporarily rewrite the changed queue suffix through existing prompt admission and cancellation APIs. Follow-up #44858 replaces that workaround with one durable, atomic server operation without introducing any new desktop UI.
Verification