operator: echo the loop/observation trigger into the panel#380
Merged
Conversation
… suppression
The operator panel showed the operator's response to each ambient/observation
turn ("noted", "Worked", a finding) but not the INPUT that triggered it -- the
observation is a Message event, never rendered to the panel's PTY. So a user
watching the panel saw context-free "noted / Worked / noted ..." and couldn't
tell what was being noted.
Now, before the response streams, the operator echoes the OBSERVATION trigger
into the panel (dim), with the monitor's instruction boilerplate stripped so
only the substance shows -- an ambient monitor finding or a fleet event. The
panel reads question -> answer.
Also removes the dead ambient-turn PTY/message suppression: it keyed on the
stale "ambient operator loop tick" string (the loop's observation became
"ambient fleet monitor flagged" in #376), so it never fired -- and the intent
is now to SHOW responses with their trigger, not hide them. Leaving it was a
trap (fixing its string would have hidden the wanted responses).
The typewriter monolog (#379) is unaffected -- it consumes the response Message
stream; the echo is PTY-only.
- interactive.rs: observation_panel_echo() + emit it before the user Message;
removed ambient_turn detection + both suppression blocks.
- Test: observation_panel_echo strips the marker/boilerplate, keeps substance,
returns None for real user input. 38 interactive tests pass. Spec 0024.
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.
Problem. The operator panel showed the operator's response to each ambient/observation turn (
noted,Worked, a finding) but not the input that triggered it — the observation is aMessageevent, never rendered to the panel's PTY. So watching the panel you saw context-freenoted / Worked / noted …and couldn't tell what was being noted.Two stale-string facts behind this (both from #376):
"...ambient operator loop tick", but the loop's observation became"...ambient fleet monitor flagged"— so it never fired and responses leaked into the panel.Change
Before the response streams, the operator echoes the
OBSERVATION:trigger into the panel (dim), with the monitor's instruction boilerplate stripped so only the substance shows. The panel now reads question → answer:Also removes the dead ambient-turn PTY/message suppression — it never fired, contradicts the "show responses" intent, and was a trap (fixing its string would have silently hidden the responses the user wants).
observation_panel_echo()formats the trigger (stripsOBSERVATION:+ the monitor boilerplate, dims each line); emitted as PTY before the userMessage. Fires for fleet-event observations too, so those replies get context as well.ambient_turndetection + bothemit_pty=false/emit_messages=falseblocks.The typewriter monolog (#379) is unaffected — it consumes the response
Messagestream; this echo is PTY-only.Tests
observation_panel_echounit-tested (strips marker/boilerplate, keeps substance,Nonefor real user input). 38 interactive tests pass; full build clean. Spec0024added.Visual best confirmed live — after restart, an operator tick shows its trigger then the reply in the panel.