Skip to content

Add peek: a one-shot snapshot of a run or flow - #10

Merged
gurnben merged 1 commit into
mainfrom
feat/peek
Oct 21, 2026
Merged

gurnben merged 1 commit into
mainfrom
feat/peek

Conversation

@gurnben

@gurnben gurnben commented Oct 21, 2026

Copy link
Copy Markdown
Member

Summary

Checking on a background run meant either attach (a full-screen session) or logs (the entire transcript). This PR adds peek — the quick glance:

  • traust-cli peek <run-or-flow> — one-shot snapshot: state, usage, and the last dozen journal entries, printed and gone. No following, no TUI.
  • Resolves runs and flows alike: a run peek shows its journal tail; a flow peek shows the stage chain (✓ audit → ▸ triage → · patch) and recurses into the current stage's run — one command answers "what is happening right now" at any level.
  • The plain-event renderer was refactored into a shared string form (renderEventString), so the sink, logs, plain attach and peek render events identically.

Verification

  • Live: peek on the dummy run (state + tail) and on the completed test flow (stage chain + stage snapshot).
  • Tests: run peek shows the tail window only (not the head); flow peek includes stage marks and recurses into the current stage.
  • Full suite with race detector, vet, staticcheck clean.

💘 Generated with Crush

Checking on a background run meant either attach (a full-screen
session) or logs (the entire transcript). peek is the quick glance:
state, usage and the last dozen journal entries, printed and gone.

peek resolves runs and flows alike — a run peek shows its tail, a
flow peek shows the stage chain and recurses into the current
stage's run — so one command answers "what is happening right now"
at any level of the pipeline.

The plain-event renderer was refactored into a string form
(renderEventString) shared by the sink, logs, plain attach and peek,
so every surface renders events identically.

💘 Generated with Crush

Assisted-by: Crush:rits/zai-org/glm-5-3
@gurnben
gurnben requested a review from a team as a code owner October 21, 2026 18:17
@gurnben
gurnben merged commit c555139 into main Oct 21, 2026
2 checks passed
@gurnben
gurnben deleted the feat/peek branch October 21, 2026 18:19
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