Skip to content

Show live executions and a timeline of every execution in the Pi panel - #126

Merged
Epsirom merged 3 commits into
mainfrom
chrok/jolly-bohr-320482
Oct 25, 2026
Merged

Epsirom merged 3 commits into
mainfrom
chrok/jolly-bohr-320482

Conversation

@Epsirom

@Epsirom Epsirom commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Change

Closes #94, part of RSI Mode (#118).

The /braid panel used to draw one box per node from the latest graph definition, so loop rounds collapsed into one box, replaced and removed instances disappeared, and skipped branches looked like pending ones. The panel now draws the execution-only graph from #113 with one box per execution, in two views. Press g to switch between them. The title (Braid · live view / Braid · timeline view) and the footer show the active view, and the panel keeps the choice while it is open.

  • Live view (default): only executions that have not released their result downstream yet: pending, running, and held. It shows what the job is doing now and what comes next, and stays small however long the run goes on. Pending executions show their wait reason (waits predecessors, …). Running ones show model/tool, hold, or paused. When nothing is live, for example after the job finishes, the view says so and points to the timeline.
  • Timeline view: every execution in a flat, acyclic graph, so each round of a cycle sits below the previous one (review@2). Skipped executions are marked ⊘ … skipped · reason, pending ones ○. Superseded executions (superseded → x@n) and executions of removed nodes (removed) stay in the graph.
  • Edges, in both views: solid edges come from predecessorExecutionIds. Dotted edges show the input a pending execution will use or the upstream result a skipped one saw. A dotted replaces edge links a replaced execution to its replacement.
  • Folding in the timeline: the last 2 generations of each node stay expanded. Older settled executions fold into one ≡ node@1–k box per node, and pending, running, and held ones never fold. e expands every generation. At most 80 boxes are drawn either way.
  • Selection: v selects an execution in either view. Enter opens that exact execution's session, and p/h/x act on it. g while selecting keeps the selection when the other view draws it, otherwise it moves to the newest drawn execution of the same node. Esc returns to the same execution. Scrolling, cropping, and reveal-on-select are reused.
  • The braid and status tool results in the conversation keep their one-box-per-node chart. Each box now also shows the wait reason, the running sub-state, the number of runs, and the tokens the node's executions used.
  • The footer now shows the longest hint line that fits the width.

Open questions from #94

  • DSH Web panel parity: not in this PR. I recommend a separate DSH issue; it already has a per-node execution history selector.
  • Cycle layout in the timeline: a flat graph labelled by execution ID, with no subgraph per round. The history is acyclic, so rounds stack top to bottom on their own.
  • How much history stays expanded: the last 2 generations per node, with e to toggle all of them.
  • Decided in review: a separate per-node "heads" view was dropped in favour of the live view.

Notes

  • The terminal Mermaid renderer (grok-mermaid 0.2.3) does not support <br/>, so box labels wrap at 24 columns, as they did before this change. It has only two box shapes, so skipped executions are told apart by icon and text.
  • Pending boxes no longer show the · — elapsed placeholder.
  • Existing panel tests that open finished jobs now press g first, because the live view of a finished job is empty.

Verification

  • npm run check:pi and the Pi test suite (193 tests) pass.
  • test/graph-views.test.ts: the tool-result chart labels, the live view (pending, running, and held only, plus the empty state), timeline markers (superseded, removed, replaces, skipped vs pending), folding and the box limit, and an end-to-end panel test. That test runs a loop with a blocked round (live view while running, then g with the selection kept), then finishes and checks expand, selection, Enter on an exact execution, Esc, and switching back to an empty live view.

@Epsirom Epsirom added the enhancement New feature or request label Oct 25, 2026
@Epsirom
Epsirom force-pushed the chrok/jolly-bohr-320482 branch from 73cb3c2 to 43b86e4 Compare October 25, 2026 13:33
@Epsirom Epsirom changed the title Show lineage heads and the full execution history as two views of one graph in the Pi panel Show live executions and a timeline of every execution in the Pi panel Oct 25, 2026
@Epsirom
Epsirom merged commit 2607310 into main Oct 25, 2026
17 checks passed
@Epsirom
Epsirom deleted the chrok/jolly-bohr-320482 branch October 25, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pi TUI: show lineage heads and the full execution history in one graph

1 participant