The running view opens a flow's graph, its chosen node's runs and outs, and its history #186

Merged
agra merged 5 commits from task/3829-s4-the-flow-page-on-the-graph-the-chosen into master 2026-10-30 02:09:13 +02:00
Owner

Tracker: #3829
Plan: #3553, step 4 of 5

⏎ on a flow run of the running view's Flows page opens its flow page, drawn as mockup 3 (files 689/690) and pick E2 (files 711/712) draw it:

  • Title section: #<task> <title>, labelled <flow> rev <n> · PR <n> → <base> (the PR the last run that reported one reported), or · from <base>.
  • Graph: runner/graph.sx's layout at the full width. A short window gives it fewer lines, keeping the panel and three History lines, and it pans to keep the chosen node in view. The chosen node starts at the node the flow is at. The page hands the graph the mark of the step running (the mark its Flows row gives) only while the flow run is running and no Orchestrator decides; otherwise the graph marks the node itself.
  • Panel of the chosen node: a card's <label> · <role | gate <name> | built-in> with attempt <n> · here | on <runner> (no holder while the Orchestrator decides there), one row per run or job queued there (run k, a run queued again counted, claimed → ended or → now, its out, failed · <reason> in red, a job's result at its head, the spinner and the board's last line for a step held here, model, effort and account, holder, stream), then outs. Chips get pick E2's panels: Dispatch's dispatch, each wait at a Needs you or a Wait (asked k, the out that led there, the question or the tasks waited on, the answer or · unblocked, warn while it waits), and Done's end.
  • History: the dispatch, each step's run, each Orchestrator choice (dim), each job, each wait on you (warn while it waits, · answered once answered), the step flows dispatched, Ratify, a Wait's block and its end, Done or the stop; the latest that fit.
  • Keys: ←→ walk the graph's nodes, chips included; ⏎ opens the step page of the chosen node's latest run or job when this runner holds it, and esc there comes back; esc goes back to the Flows page; q asks how to stop. The Flows page's footer now reads ↑↓ flow ⏎ open its graph esc back q stop.

The follower (runner/flows.sx) reads more only while the flow page shows, from routes sak serves today: each step run and job its history queued, by id, once (again only while not yet claimed with no end in the history, or claimed with no end there when its runner's holding drops), the revision's graph and the task when it has neither, and GET /api/accounts once. It never reads an Orchestrator's run or the runs list. While a step page opened from the flow page shows, it starts no read and keeps what it holds. Nothing under src/, web/ or docs/ changes.

A stopped flow run's graph marks the node the flow stood at when it was stopped with ■ in ink, its title plain (pick L2, recorded on the task): the Needs you it waited at or the Wait it was blocked at when nothing ended that wait before Stop, else its step (the step running, or the one whose Orchestrator was deciding). sak leaves a stopped flow run's node at the step in every case, so runner/rail.sx derives the node from the history. The page opens on that node, and the Flows page's Ended row names it (stopped at Needs you, stopped at <Wait>). A plan's resumed event now ends a wait at its Needs you, so a chip panel row ends there too.

runner/README.md's console section describes the flow page, its keys and its reads.

Tests

  • tests/runner_view.sx (pseudo-terminal now 120×40) opens S1's flow's page after S2's Flows scene and before Update all. It reads the title section, the graph's ✓ Implement, running Review and ○ Run gates, Review's panel (attempt 1 · here, its run here on its stream, its outs) and the History. It then walks ← to Implement's panel and Dispatch's, →→ back, and ⏎ to Review's step page and back. It opens the flow that waits on you at its ? Needs you chip (Needs you · after Implement, asks since, the line into it ┃ then ▼, nothing ╍/╏). On sak's request log, the newest GET /api/flow-runs?state= line does not change between about 1 s and 6 s after the step page opens, nor after the main page shows, and Implement's ended run is read exactly once.
  • tests/runner_flows.sx builds the flow page from reads written as sak answers them: the title and label, a run held here, an ended run held elsewhere, a retried run numbered run 2 under attempt 1 with no holder while the Orchestrator decides, a node not reached, Dispatch's, a Needs you's and Done's panels, History's lines and a summary cut so its holder fits; and the follower's flow-page reads: once, only while the page shows, and let go after.
  • The stopped node: tests/runner_rail.sx (stopped while its step ran, while it waited at a Needs you, while blocked, while it waited on you about a failed run, and a plan resumed at Run steps before Stop), tests/runner_graph.sx (■ Review and ■ Needs you in ink, Implement ✓, the line into the chip heavy ink, nothing warn or moving), tests/runner_flows.sx (the Ended row stopped at Needs you), and tests/runner_view.sx, which stops the flow that waits on you, reads stopped at Needs you in Ended, and opens its flow page on ■ Needs you with ✓ Implement.

Fail-before and mutations

The stopped node, each arm a git archive copy built with the gate's sx (dist/sak-runner built in the arm for runner_view):

  • e75d218a (before the pick) with this head's tests: runner_rail fails 2 (the Needs you and the Wait), runner_flows fails 1 (the Ended row), runner_graph does not build (no stopped mark), runner_view fails 2 (Ended's stopped at Needs you and the page's ■ Needs you).
  • rail.at without its stopped case: the same runner_rail, runner_flows and runner_view checks fail, and runner_graph's Needs you check.
  • rail.wait_end without resumed: runner_rail fails only the resumed plan's check.
  • the graph drawing a stopped Needs you ? dim: runner_graph's Needs you check and runner_view's page check fail.
  • the view handing the graph no stopped mark: runner_view fails only the page check.

The rest of the page, each arm a git archive copy with dist/sak-runner copied in, running tests/runner_view.sx and tests/runner_flows.sx at ca730bd1's tests:

  • master 5b24060d with this branch's tests: RUNNER VIEW FAIL (21 checks): the Flows page's footer check (which now names ⏎ open its graph) and the flow page scene's checks from "f opens the Flows page again" to "Implement's ended run is read once".
  • the step page not pausing the follower: fails only "... and sak is read nothing while it shows".
  • Held.names not keeping the open flow run's reads: fails "Implement's ended run is read once, on its flow page" and two of runner_flows' flow-page read checks.
  • the view handing the graph no mark while the flow runs: fails only the graph check (Review running).
  • choose_open appending no run or job: fails the read-once check and runner_flows' flow-page read check.

Gates

  • full: gate run 865, passed at this branch's head 25e853f0 (main Playwright config 777 passed, runner config 10 passed).
  • Earlier: full gate run 861 passed at ca730bd1, fast gate run 860 at b8cc592d.
Tracker: [#3829](https://sak.swipelab.com/tasks/3829) Plan: [#3553](https://sak.swipelab.com/tasks/3553), step 4 of 5 `⏎` on a flow run of the running view's Flows page opens its flow page, drawn as mockup 3 (files 689/690) and pick E2 (files 711/712) draw it: - **Title section:** `#<task> <title>`, labelled `<flow> rev <n> · PR <n> → <base>` (the PR the last run that reported one reported), or `· from <base>`. - **Graph:** `runner/graph.sx`'s layout at the full width. A short window gives it fewer lines, keeping the panel and three History lines, and it pans to keep the chosen node in view. The chosen node starts at the node the flow is at. The page hands the graph the mark of the step running (the mark its Flows row gives) only while the flow run is `running` and no Orchestrator decides; otherwise the graph marks the node itself. - **Panel of the chosen node:** a card's `<label> · <role | gate <name> | built-in>` with `attempt <n> · here | on <runner>` (no holder while the Orchestrator decides there), one row per run or job queued there (`run k`, a run queued again counted, claimed → ended or `→ now`, its out, `failed · <reason>` in red, a job's result at its head, the spinner and the board's last line for a step held here, model, effort and account, holder, stream), then `outs`. Chips get pick E2's panels: Dispatch's dispatch, each wait at a Needs you or a Wait (`asked k`, the out that led there, the question or the tasks waited on, the answer or ` · unblocked`, warn while it waits), and Done's end. - **History:** the dispatch, each step's run, each Orchestrator choice (dim), each job, each wait on you (warn while it waits, ` · answered` once answered), the step flows dispatched, Ratify, a Wait's block and its end, Done or the stop; the latest that fit. - **Keys:** `←→` walk the graph's nodes, chips included; `⏎` opens the step page of the chosen node's latest run or job when this runner holds it, and `esc` there comes back; `esc` goes back to the Flows page; `q` asks how to stop. The Flows page's footer now reads `↑↓ flow ⏎ open its graph esc back q stop`. The follower (`runner/flows.sx`) reads more only while the flow page shows, from routes sak serves today: each step run and job its history queued, by id, once (again only while not yet claimed with no end in the history, or claimed with no end there when its runner's `holding` drops), the revision's graph and the task when it has neither, and `GET /api/accounts` once. It never reads an Orchestrator's run or the runs list. While a step page opened from the flow page shows, it starts no read and keeps what it holds. Nothing under `src/`, `web/` or `docs/` changes. A stopped flow run's graph marks the node the flow stood at when it was stopped with `■` in ink, its title plain (pick L2, recorded on the task): the Needs you it waited at or the Wait it was blocked at when nothing ended that wait before Stop, else its step (the step running, or the one whose Orchestrator was deciding). sak leaves a stopped flow run's `node` at the step in every case, so `runner/rail.sx` derives the node from the history. The page opens on that node, and the Flows page's Ended row names it (`stopped at Needs you`, `stopped at <Wait>`). A plan's `resumed` event now ends a wait at its Needs you, so a chip panel row ends there too. `runner/README.md`'s console section describes the flow page, its keys and its reads. ## Tests - `tests/runner_view.sx` (pseudo-terminal now 120×40) opens S1's flow's page after S2's Flows scene and before Update all. It reads the title section, the graph's `✓ Implement`, running `Review` and `○ Run gates`, Review's panel (`attempt 1 · here`, its run here on its stream, its outs) and the History. It then walks `←` to Implement's panel and Dispatch's, `→→` back, and `⏎` to Review's step page and back. It opens the flow that waits on you at its `? Needs you` chip (`Needs you · after Implement`, `asks since`, the line into it `┃` then `▼`, nothing `╍`/`╏`). On sak's request log, the newest `GET /api/flow-runs?state=` line does not change between about 1 s and 6 s after the step page opens, nor after the main page shows, and Implement's ended run is read exactly once. - `tests/runner_flows.sx` builds the flow page from reads written as sak answers them: the title and label, a run held here, an ended run held elsewhere, a retried run numbered `run 2` under `attempt 1` with no holder while the Orchestrator decides, a node not reached, Dispatch's, a Needs you's and Done's panels, History's lines and a summary cut so its holder fits; and the follower's flow-page reads: once, only while the page shows, and let go after. - The stopped node: `tests/runner_rail.sx` (stopped while its step ran, while it waited at a Needs you, while blocked, while it waited on you about a failed run, and a plan resumed at Run steps before Stop), `tests/runner_graph.sx` (`■ Review` and `■ Needs you` in ink, Implement ✓, the line into the chip heavy ink, nothing warn or moving), `tests/runner_flows.sx` (the Ended row `stopped at Needs you`), and `tests/runner_view.sx`, which stops the flow that waits on you, reads `stopped at Needs you` in Ended, and opens its flow page on ` ■ Needs you ` with `✓ Implement`. ### Fail-before and mutations The stopped node, each arm a `git archive` copy built with the gate's sx (`dist/sak-runner` built in the arm for runner_view): - e75d218a (before the pick) with this head's tests: runner_rail fails 2 (the Needs you and the Wait), runner_flows fails 1 (the Ended row), runner_graph does not build (no `stopped` mark), runner_view fails 2 (Ended's `stopped at Needs you` and the page's ` ■ Needs you `). - `rail.at` without its stopped case: the same runner_rail, runner_flows and runner_view checks fail, and runner_graph's Needs you check. - `rail.wait_end` without `resumed`: runner_rail fails only the resumed plan's check. - the graph drawing a stopped Needs you `?` dim: runner_graph's Needs you check and runner_view's page check fail. - the view handing the graph no stopped mark: runner_view fails only the page check. The rest of the page, each arm a `git archive` copy with `dist/sak-runner` copied in, running `tests/runner_view.sx` and `tests/runner_flows.sx` at ca730bd1's tests: - master 5b24060d with this branch's tests: `RUNNER VIEW FAIL (21 checks)`: the Flows page's footer check (which now names `⏎ open its graph`) and the flow page scene's checks from "f opens the Flows page again" to "Implement's ended run is read once". - the step page not pausing the follower: fails only "... and sak is read nothing while it shows". - `Held.names` not keeping the open flow run's reads: fails "Implement's ended run is read once, on its flow page" and two of runner_flows' flow-page read checks. - the view handing the graph no mark while the flow runs: fails only the graph check (Review running). - `choose_open` appending no run or job: fails the read-once check and runner_flows' flow-page read check. ## Gates - `full`: gate run 865, passed at this branch's head 25e853f0 (main Playwright config 777 passed, runner config 10 passed). - Earlier: `full` gate run 861 passed at ca730bd1, `fast` gate run 860 at b8cc592d.
Enter on a flow of the Flows page opens the flow page: the flow's graph as
runner/graph.sx lays it out, a panel of the chosen node's runs and outs or
of a chip, and the flow run's History. Left and right walk the graph's
nodes, Enter opens the step page of a run this runner holds, and Escape goes
back. The follower reads the page's runs, jobs and accounts only while it
shows, and nothing while a step page opened from it shows.
The node is the Needs you it waited at or the Wait it was blocked at when
nothing ended that wait before Stop, else its step. The flow page opens on it,
and the graph draws it ■ with its title in ink.
agra merged commit d033bb2832 into master 2026-10-30 02:09:13 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sx/sak!186
No description provided.