Skip to content

tui: fix + refine the operator monolog (full text, overlay, panel-aware)#381

Merged
edwin-zvs merged 3 commits into
mainfrom
operator-monolog-fixes
Jun 6, 2026
Merged

tui: fix + refine the operator monolog (full text, overlay, panel-aware)#381
edwin-zvs merged 3 commits into
mainfrom
operator-monolog-fixes

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Follow-ups from dogfooding the typewriter monolog (#379). Two bugs + three behavior refinements.

Bugs

  1. Only the last delta showed — e.g. ed for noted (which should be filtered entirely). AgentStatus active=true fires on every delta (a per-token "Working" heartbeat), and the TUI cleared the utterance accumulator on every active=true — so not+ed lost not and finalized as ed. This truncated all multi-delta monologs to their tail. Fix: don't clear on active=true; the accumulator is already cleared at turn end (active=false, once per turn), so each turn starts clean.
  2. Dropped the operator ▸ label — the matrix panel title already says "operator".

Refinements (requested)

  1. Overlay, not takeover. The monolog used to Clear the rain body and skip the rain render, so the rain froze and restarted from empty when the text cleared. Now the rain renders every frame (its state keeps advancing) and the text draws on top — so it never restarts. The call moved after the rain pass.
  2. Skip while the orchestrator panel is open. The operator's text is already visible right below in the panel, so overlaying it on the rain just duplicates it — the overlay returns early when minibuffer.intent == Orchestrator.
  3. Widgets unaffected. render_matrix_widget_viewport runs in its own pass after the monolog, independent of the panel/monolog state — so the operator can show widgets whether the panel is open or collapsed.

Tests

  • Accumulation regression: feeds the exact working, "not", working, "ed", worked sequence and asserts noted is filtered (not ed), plus a finding across deltas yields the full session blocked.
  • Skip-while-panel-open: returns false, draws nothing.
  • Render test updated for the removed label. 253 cli tests pass.

Animation still best confirmed live; speed/hold/colors are easy one-line tweaks.

edwin-zvs added 3 commits June 6, 2026 13:18
Two issues from dogfooding the typewriter monolog (#379):

1. It displayed only the tail of a message -- e.g. "ed" for "noted" (which
   should be filtered entirely). Cause: `AgentStatus active=true` fires on
   EVERY delta (a per-token "Working" heartbeat), and the TUI cleared the
   utterance accumulator on every active=true. So a message streamed as
   "not"+"ed" lost "not" and finalized as "ed". This truncated ALL multi-delta
   monologs to their last fragment, not just "noted".

   Fix: don't clear on active=true. The accumulator is already cleared at turn
   end (active=false, which fires once per turn), so each turn starts clean.
   Now the full text accumulates -> "noted" is filtered, findings show in full.

2. Dropped the "operator ▸" label -- the matrix panel title already says
   "operator", so it was redundant.

Regression test feeds the exact heartbeat/delta sequence (working, "not",
working, "ed", worked) and asserts "noted" is filtered (not "ed"), plus a
finding across deltas yields the full "session blocked". Render test updated
for the removed label.
… is open

Three refinements from dogfooding:

1. The typewriter took over the rain body (Clear + skip the rain render), so the
   rain froze and restarted from empty when the text cleared. Make it an OVERLAY
   instead: the rain renders every frame (state keeps advancing) and the text
   draws on top, so it never restarts. Moved the call after the rain pass.

2. Skip the overlay while the orchestrator panel (minibuffer) is open -- the
   operator's text is already visible right below, so overlaying it on the rain
   just duplicates it.

3. Widgets are unaffected: render_matrix_widget_viewport runs in its own pass
   after the monolog, independent of the panel/monolog, so the operator can show
   widgets whether the panel is open or collapsed.

Tests: skip-while-panel-open (returns false, draws nothing); existing render +
accumulation tests still pass. 4 monolog tests green.
The overlay text used a solid Color::Black background, which read as a highlight
band over the rain. Use Color::Reset (terminal default — the rain's own
backdrop) so the typed line blends in as a subtle overlay.
@edwin-zvs
edwin-zvs merged commit 0b755ce into main Jun 6, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the operator-monolog-fixes branch June 6, 2026 20:40
@edwin-zvs edwin-zvs mentioned this pull request Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant