Skip to content

Make the Flow use its space and stop burning a core - #212

Merged
madskronborg merged 8 commits into
masterfrom
madskronborg/test-and-polish-the-new-flow-feature-in-3u9a28
Oct 26, 2026
Merged

madskronborg merged 8 commits into
masterfrom
madskronborg/test-and-polish-the-new-flow-feature-in-3u9a28

Conversation

@madskronborg

Copy link
Copy Markdown
Collaborator

The Flow used its space poorly and was slow to use, so this polishes it after hands-on use in an isolated dev Desktop against the laptop's and vm-mk's real hosts. No control was pressed on a real Run.

  • Map: each Run's Steps now wrap in a grid under a one-line header (title, Machine · execution, Started by). There is no horizontal scroll, and no sticky label covers a glyph. Long Step names are cut to one line, but the tooltip and the spoken name keep the whole name. The inspector sits beside the map once the Flow is at least 1024 px wide. The selected Step stays in view when you select it and when the map resizes.
  • Speed: a running glyph now turns in 12 steps instead of smoothly. With the same record and 5 running glyphs, renderer CPU went from ~40% to 14–17% and GPU process CPU from ~27–30% to 2–3%. A running Task's Flow reads agents' delivery ledgers only when a finished Run needs its Reopened check. On a copy of vm-mk's state, taskFlowOf went from ~200 ms to ~43 ms (median of 7).
  • Correctness: Flow action icons render; they were missing from Nuxt Icon's client bundle. A Run replayed into Steps after it launched no longer draws its first Step twice.
  • Inspector: times read as clock times ("11:22", "23 Oct, 09:00") instead of ISO instants. "Started by" now sits with the Step's facts.
  • Board card (steered in by the human): the branch and pane location each take one line, cut with the full text on hover, and the pane line leads with the tab. The Flow strip's label wraps under the glyphs instead of being cut. At a ~330 px column, a card went from 334 px to 231 px tall, with no status or action removed.

The before and after screenshots and timings are on mk-laptop: the measurements are in ~/.local/state/herdr/plugins/cego.collie/runs/run-3df1ab2e/handoffs/flow-polish-measurements.md and the screenshots in handoffs/screenshots/. The host-side gains (ledger reads, replayed Steps) reach a Machine only once its host runs this release.

Verifications: the gate's check passed on 2cb95eb5, the commit before this head. On this head (a2c8ad99), card-tests and desktop-typecheck passed. Every other recorded verification ran on an earlier tree.

Verification this run is held to:

  • check: /home/mk/.local/share/mise/installs/bun/latest/bin/bun run check (in /home/mk/.herdr/worktrees/.collie/madskronborg/test-and-polish-the-new-flow-feature-in-3u9a28)

The board card commit (a2c8ad99) came after the review and after the gate, so its own tests checked it, not a reviewer. It changed:

  • BoardCard.vue: tighter padding; the branch and pane are each cut to one line, with a title; the Flow strip wraps.
  • paneLine in desktop/src/shared/terminal-input.ts and usePanes.ts: the pane line reads tab · workspace.
  • test/desktop-card-pane.test.ts, which failed first.
  • The pane sentence in docs/using.md.

Non-blocking finding left open:

  • test/desktop-icon-bundle.test.ts:31 (minor), "Record a failing baseline for the new icon-bundle test". The record already holds one: icon-bundle ran with --expect fail on e53cd719, before the fix, and failed (exit 1). It names the five missing icons (message-square-plus, terminal, message-circle-question, scroll-text, file-check).

Not settled by the run

  • assumed in build: The worktree was cut at 0.91.0, before the Flow landed, so I fast-forwarded the branch to origin/master e53cd71 (0.94.0, which contains Flow Show Task work as a Flow across Desktop, CLI and chat #195) before starting. There is no merge commit.
  • assumed in build: No planner was live, so I wrote the spec and tickets in the run's plan dir and chose the test seams myself.
  • assumed in build: Ticket 03 changed while I built it. Serving the record's Flow from the latest board build made a record opened right after Pause/Continue show the old Flow for up to one build (~5 s on vm-mk), which 4 host tests caught. A profile showed 147 of taskFlowOf's ~200 ms went to reading every agent's delivery ledger, so the board now reads the ledgers lazily, only once a card has a finished leader. A running Task's Flow dropped from ~200 ms to ~43 ms on vm-mk's state.
  • assumed in build: Ticket 06 changed while I built it. Skipping the step-less launch would have dropped the Step's real agent and model. Such a launch is now attributed to the entered Step whose key equals its operation.
  • assumed in build: Ticket 02 (stepped glyph rotation) is proved by measurement, not by a unit test. Same record and same 5 running glyphs: renderer CPU ~40% -> ~14-17%, GPU process ~27-30% -> ~2-3%. CSS animation timing can't be observed by the unit tests the repo allows.
  • assumed in build: Tickets 04 and the resize follow-up are layout changes with no logic to unit-test. They are verified by screenshots at 1000 px, at the default 1200 px window (673 px Flow), and at 1900 px (inspector beside the map), in handoffs/screenshots/after-*.
  • assumed in build: Inspector times use the en-GB 24-hour format ('11:22', '23 Oct, 09:00', '23 Oct 2026, 09:00'), matching clockTime's existing 'HH:MM' style.
  • assumed in build: Out of scope, left as found: vm-mk's 4-5 s board builds, which predate the Flow (lastActivityAt/writtenIn walks); the dev-only updates-stream resubscribe loop in a checkout Desktop; and Up/Down moving between Runs rather than between the visual lines of a wrapped Run.
  • assumed in build: The host-side gains (tickets 03, 06) only reach a Machine once its host runs this release. The dev Desktop used for screenshots talked to hosts running 0.94.0.
  • assumed in build: docs/using.md was updated for the new map layout (invariant 7). The other tickets change no documented behaviour.

🤖 Generated with Claude Code

Mads Kronborg and others added 8 commits October 26, 2026 11:53
Nuxt Icon compiles only the names it finds in the view layer's .vue files, and
flow-actions.ts built its names from a fragment, so a Step's Watch, Note, Log,
Evidence and Answer actions drew an empty button. The names are now written
whole and the scan also reads desktop/src/shared, which hands the view icons
by name elsewhere too (a Machine out of reach, one without Collie).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Desktop's CEF composites in software, so a glyph rotating every frame repaints
at 60 fps: with a record open on a Task with two running Steps, the renderer
and GPU process held about 40% and 30% of a core. Twelve steps a turn keeps the
motion and costs about 15% and 3%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An open record rebuilds its Task's Flow on every write under the state
directory, and three quarters of that build was reading every agent's
delivery ledger, which only the Reopened check of a finished Run uses.
On vm-mk's state a running Task's Flow drops from ~200 ms to ~45 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The map was a capped strip that scrolled sideways: at 1000 px two Steps
per Run showed, the current one off screen, ticket names wrapped onto
four lines and the sticky lane label covered the first glyph, while half
the record sat empty under a one-line hint. Each Run's Steps now wrap in
a grid under a one-line header, names are shortened with the whole name
kept in the hover and the spoken name, and a wide record shows the
inspector beside the map, keeping the selected Step in view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The inspector printed raw instants ("Started 2026-10-26T10:22:22.731Z")
and put "Started by" at the very bottom of the record, far from the Step
it describes. Times now read "11:22", or "24 Oct, 11:22" on another day,
and the link sits with the Step's facts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Run that straddled the upgrade to Steps recorded launches that name
no Step, and its Flow drew each one beside the replayed Step of the same
id. Two nodes with one id break the map's keys and its arrow-key
navigation, and the Step itself showed no agent. Such a launch is now
read as the entered Step whose key is its operation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The map is capped under the inspector in a narrow record, and a window
resized after a Step was selected left that Step scrolled out of the map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At a board column's width the branch took two lines, the Flow strip
cut its label short ("5 min, us…") and the pane's place took two more,
repeating the Machine the footer names and ending on the tab that tells
panes apart. The branch and the pane now take one line each, with the
whole of them on hover, the pane leads with its tab, the strip's label
moves under its glyphs rather than being cut, and the card's padding is
tighter: our own card went from 334 to 231 px tall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@madskronborg madskronborg self-assigned this Oct 26, 2026
@madskronborg
madskronborg merged commit 096a406 into master Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant