feat(board): live-stream stdout/stderr in the logs pane during a press#149
Merged
Conversation
Before: pressing a button from the board executed it silently — the logs pane only showed PAST run summaries, not the current press's output as it happened. Now: when a press fires, the board 1. creates a LineSink channel and passes it into engine.Execute 2. auto-opens the logs pane so the live feed is visible 3. reads lines via a readFromSink tea.Cmd pub/sub loop 4. renders the last ~8 lines in the pane with stderr in red, stdout in primary, timestamps muted, a "● live" badge in the header flipping to "· done" when the stream closes Lines are capped at 200 per button so runaway scripts don't OOM the TUI; the tail is always freshest. The live buffer survives past press completion so the user can see what just ran — it's reset to empty only on the next press of that same button. runPress now accepts (and closes) the sink channel. Execute's existing LineSink interface did all the heavy lifting — this is a consumer, not a new engine feature. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 20, 2026
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.
Answers "how do I press a button and follow the logs at the same time" inside the board — the natural home.
Before: pressing a button from the board ran silently. The logs pane only showed past run summaries. No way to watch output as it happened.
Now:
How it works
runPress now passes a LineSink channel into engine.Execute (the existing streaming hook). A Bubble Tea pub/sub loop (`readFromSink` Cmd) emits one liveLineMsg per line; the Update handler appends to m.liveLines and re-schedules. The channel is closed by runPress after Execute returns, which terminates the loop via liveStreamDoneMsg.
No engine changes — LineSink was already there for this exact purpose.
Test plan
🤖 Generated with Claude Code