tui: fix + refine the operator monolog (full text, overlay, panel-aware)#381
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from dogfooding the typewriter monolog (#379). Two bugs + three behavior refinements.
Bugs
edfornoted(which should be filtered entirely).AgentStatus active=truefires on every delta (a per-token "Working" heartbeat), and the TUI cleared the utterance accumulator on everyactive=true— sonot+edlostnotand finalized ased. This truncated all multi-delta monologs to their tail. Fix: don't clear onactive=true; the accumulator is already cleared at turn end (active=false, once per turn), so each turn starts clean.operator ▸label — the matrix panel title already says "operator".Refinements (requested)
Clearthe 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.minibuffer.intent == Orchestrator.render_matrix_widget_viewportruns 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
working, "not", working, "ed", workedsequence and assertsnotedis filtered (noted), plus a finding across deltas yields the fullsession blocked.Animation still best confirmed live; speed/hold/colors are easy one-line tweaks.