Skip to content

feat(tui): show accepted-but-unread queued input - #1395

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-10437-show-accepted-but-unread-queued-input-while-the-dispatcher
Oct 13, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-10437-show-accepted-but-unread-queued-input-while-the-dispatcher

Conversation

@bwachman

@bwachman bwachman commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Note on base

This branch is stacked on the cl-10432 branch, which sits on top of the stack that provides the worker-wait / parked-question machinery. The diff is the CL-10437 change only: the queued-input strip on top of cl-10432. The base must stay cl-10432-codify-outcome-aware-escalation-policy-for-blocked-worker so the PR shows only the single CL-10437 commit.

Summary

Shows accepted-but-unread queued operator input in the TUI so the operator can see that the dispatcher has accepted input that has not been read yet. When a queued delivery is accepted (an accepted final result arrives), the ledger entry appears as a QUEUED INPUT row and stays visible until the director reads the message, which is signaled by the existing upstream message.run.started event (Option A read signal). Worker wakes never enter the ledger. The strip occupies a one-row geometry zone, coexists with the WORKER WAITING zone, and collapses and restores cleanly.

Verification

After the rebase onto main and the review fixes, CI passes on 9cfed0e; the results below are from the original verification.

Check Result
Focused suite (bun test src/tui/queued-input.test.ts src/tui/runtime-bridge.test.ts src/tui/queued-delivery-hop.test.ts src/tui/queued-input-chrome.test.ts src/tui/worker-wait-chrome.test.ts src/tui/geometry.test.ts src/tui/geometry/resolve.test.ts src/tui/stream-event-map.test.ts) 206 pass / 0 fail
Typecheck clean
Regression none
Read-signal blocker (Option A) resolved: ledger exits on the existing upstream message.run.started event (not message.received), so the row paints until the director reads the message
Worker wakes in ledger none (wake-origin fix)
End-to-end mid-run steer probe row visible until the director reads the steer
v2 review findings all resolved (v2 blocker + Should-fix 1 wake-origin + Should-fix 2 runner-level/failure-discard tests + Should-fix 3 docs/TUI.md + nits; build-info fixup is not in this branch since cl-10200 does not carry it)

AC to code and test mapping

  • QUEUED INPUT row visible while accepted-but-unread operator input exists: src/tui/queued-input.ts + queued-input-chrome.test.ts
  • Ledger entry only after an accepted final result, exits on message.run.started (Option A read signal): src/tui/runtime-bridge.ts + stream-event-map.ts + queued-input-chrome.test.ts
  • messageId identity/dedup, FIFO, out-of-order consume; no content fallback: src/tui/queued-input.ts
  • Worker wakes never enter the ledger (wake-origin fix): src/tui/runner/submit.ts + delivery-queue.ts + queued-input-chrome.test.ts
  • Lifecycle clears (clearQueuedDelivery/dispose/teardown), stale accepts inert: src/tui/runtime-bridge.ts + tests
  • Geometry one-row zone, coexistence with WORKER WAITING, collapse/restore: src/tui/geometry/zones.ts + geometry/resolve.ts + geometry/resolve.test.ts
  • docs/TUI.md updated for the strip and stacking: docs/TUI.md

Deferred / Notes

  • Production message.received correlation confirmed in probe (deferred; the read signal uses message.run.started).
  • Durable persistence is out of scope: the strip is display-only, no persistence across restart.

Refs CL-10437

@linear-code

linear-code Bot commented Oct 11, 2026

Copy link
Copy Markdown

CL-10437

@bwachman
bwachman changed the base branch from cl-10200-make-parked-worker-ask_director-questions-visible-and to cl-10189-show-required-input-for-primary-session-ask_operator-at-the October 11, 2026 18:39
@bwachman
bwachman force-pushed the cl-10437-show-accepted-but-unread-queued-input-while-the-dispatcher branch from 16660d8 to 3899e2e Compare October 11, 2026 18:39
@bwachman
bwachman force-pushed the cl-10437-show-accepted-but-unread-queued-input-while-the-dispatcher branch from 3899e2e to 7e4fdd5 Compare October 11, 2026 20:50
@bwachman
bwachman changed the base branch from cl-10189-show-required-input-for-primary-session-ask_operator-at-the to cl-10432-codify-outcome-aware-escalation-policy-for-blocked-worker October 11, 2026 20:50

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ledger lifecycle verified against the reactor — accepted-result entry, message.run.started read signal, wake-origin exclusion, and lifecycle clears all confirmed (206/0 focused suite). One item: the body is stale — base is cl-10432 (not cl-10200), the PR is one squashed commit (body says 5), focused suite reports 206 (body says 203). Refresh the body.

@bwachman
bwachman force-pushed the cl-10432-codify-outcome-aware-escalation-policy-for-blocked-worker branch from 5c7743b to fd6416e Compare October 13, 2026 00:50
@bwachman
bwachman force-pushed the cl-10437-show-accepted-but-unread-queued-input-while-the-dispatcher branch from 7e4fdd5 to 9cfed0e Compare October 13, 2026 00:50
@bwachman

Copy link
Copy Markdown
Contributor Author

The PR body is refreshed: base is now cl-10432 (was cl-10200), the PR is one commit (was 5), and the focused suite count is 206 pass / 0 fail (was 203), re-run at this head.

@TheGreatAxios
TheGreatAxios force-pushed the cl-10432-codify-outcome-aware-escalation-policy-for-blocked-worker branch from fd6416e to 2c73ecd Compare October 13, 2026 01:42
@TheGreatAxios
TheGreatAxios force-pushed the cl-10437-show-accepted-but-unread-queued-input-while-the-dispatcher branch from 9cfed0e to 864a948 Compare October 13, 2026 01:51
@TheGreatAxios
TheGreatAxios changed the base branch from cl-10432-codify-outcome-aware-escalation-policy-for-blocked-worker to main October 13, 2026 01:51
@TheGreatAxios
TheGreatAxios merged commit d5735d3 into main Oct 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants