Skip to content

feat(builder): draw the Agent step with the Agents page's cards, as cards or a table - #249

Merged
harenome merged 20 commits into
ThinkFlowLab:mainfrom
harenome:feat/builder-agent-cards
Nov 20, 2026
Merged

harenome merged 20 commits into
ThinkFlowLab:mainfrom
harenome:feat/builder-agent-cards

Conversation

@harenome

@harenome harenome commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #248

What

The builder's Agent step now shows the same listing as the Agents page, drawn with the shared card and table toolkits. Before, it drew its own tiles, search and pill rows in command-builder.js.

  1. One listing. recipe.entries(kind, benches) builds the agents or capabilities with their ports and their fits. The Agents page and the step both read it. The Agents page output does not change.
  2. A fragment route. GET /new-run/agents?benchmark=<key> returns the step's grid (builder/agents.html), with ?view=table for the table. The builder loads it once per benchmark and view, keeps it while the benchmark stays the same, and shows a skeleton while it loads. An unknown benchmark is a 404.
  3. Pick cards. A card with a pick is a toggle: its title is a button with aria-pressed. A click, Space or Enter flips it, and tables.js sends nullius-pick. The builder changes the recipe from that event. A chosen card shows a check mark. A card that cannot be chosen is disabled, and its reason is in the alert slot with the full text in a tooltip.
  4. One slot per field. On every agent and capability card, in the builder and on the Agents and Capabilities pages, the title row has the name and version. The reason it cannot run comes next, then the proven ports (for example "Computer use") as badges. The foot has the protocol on the left and From on the right. recipe.protocol gives sentence case ("Its own script", "A command", "No agent"), so a card and its filter use the same words. A benchmark's Original reads "As published" and is not in the Protocol filter.
  5. Controls. Search, a Fit dropdown with a puzzle icon that starts on "Can run it", a Filter menu (Protocol, From, Proves), and the cards/table toggle. The toggle loads the other view in place: the page does not reload, the picks stay, and localStorage keeps the viewer's choice. The sprite gets an i-puzzle icon.
  6. Table view. A narrow checkbox column on the left, with no tick-all box. A click on the row flips it. Name takes the spare width. The checkbox sends the same nullius-pick as a card.
  7. Chosen stays visible. A chosen card or row passes any search or filter. An agent unpicked under a filter stays until the next change, so it does not disappear under the pointer. After a recipe import, the grid draws again if a filter hides a chosen agent.
  8. Toolkit changes for every page. A dropdown narrowed to one value names it on its button ("Fit: Can run it"), not a count. A menu that would leave the page on the left opens rightwards. A card summary breaks long words. The focus ring goes round the whole card, not the name link.
  9. Runs on. On the Agents page, when Runs on narrows to one benchmark, that benchmark's own agents show whatever From says. For OSWorld1 that is its 12 agents and Codex.

Touches

backend (nullius/standard/recipe.py) · routes (web/builder.py, web/agents.py) · templates and static (_cards.html, _tables.html, base.html, agents/standard.html, builder/agents.html, builder/new_run.html, tables.js, catalogue/catalogue.css, builder/command-builder.js, command-builder-core.js, command-builder.css) · docs (builder.md, standard.md) · tests

Before and after

Before After
01-before-builder-agent-osworld1 01-after-builder-agent-osworld1
02-before-builder-agent-osworld1 02-after-fit-menu
03-before-builder-agent-osworld1 03-after-table-view
04-before-builder-agent-gsm8k 04-after-builder-agent-gsm8k
05-before-agents-page 05-after-agents-page
06-before-builder-agent-390 06-after-builder-agent-390
07-before-builder-agent-dark 07-after-builder-agent-dark
  1. Builder, Agent step for OSWorld1 with two of its agents and Codex 2.2.2 chosen. 2. The same, with the Fit menu open (before: the old step). 3. The table view (before: the old step). 4. Agent step for GSM8K. 5. Agents page. 6. Agent step for OSWorld1, 390 px wide. 7. Agent step for OSWorld1, dark theme.

Verified

  • In a rootless Podman container (python:3.12): python3 app/tests/parallel.py: 3100 tests in 157 modules, OK.
  • pip install -r app/requirements.txt, then python3 app/tests/parallel.py app/ui_tests: 554 tests in 56 modules, OK.
  • python3 app/tests/catalogue_docs.py --write and python3 app/tests/field_contract.py --write leave the tree unchanged.
  • app/ui_tests/test_recipe_execution_fixtures.py and its fixtures are unchanged.
  • New tests:
    • test_benchmark_agents.py: One listing, whose fits are the builder's.
    • test_builder_agents.py: The step's greying equals the builder's for every benchmark. OSWorld1 offers its own agents and Codex and says why not for the rest. A benchmark without own agents keeps its Original and greys OSWorld's. The table view picks as the cards do. A capability benchmark lists capabilities. An unknown benchmark is a 404, and the builder page loads the toolkit.
    • test_cards.py: A pick card is a toggle and a disabled one says why. A pick flips and sends its event, and a disabled one does not. A row click flips its pick, except on a disabled row. A chosen card shows under any filter. A card passes a filter that its Runs on column narrows to.
  • In a browser, on local servers with empty profiles: the seven views above on main and on this branch, at 1280 px, one at 390 px and one in the dark theme. No page error. Switching to the table kept the three picks.
  • In the same browser, with Fit on "Cannot" for OSWorld1, importing a recipe that chooses Mano showed the Mano card, pressed.

Not checked: a real run from the step.

Risk

  • Every dropdown of the table toolkit with one value chosen now shows that value, not a count.
  • The protocol names change case on every page that shows them. A user search for "a command" still matches, because the search ignores case.
  • The step needs one more request per benchmark and view. If it fails, the step shows one line, and the next render asks again.
  • To undo, revert the commits. No stored data or recipe format changes.

…in one place

The Agents page built its entries, their ports and their fits in the web
layer. recipe.entries now does it for a given list of benchmarks, so the
builder's Agent step can draw the same entries. The Agents page output is
unchanged.
A card's pick ({value, on, disabled}) makes its title a button with
aria-pressed instead of a link; tables.js flips it on a click, Space or
Enter and sends nullius-pick, and the page keeps the choice. A disabled
card's reason goes in its alert slot, which now takes a tooltip, and a
row of filter pills can name its first pill (all).
The Agent step fetched nothing and drew its own tiles, search and chips
from the builder payload. It now loads /new-run/agents for the recipe's
benchmark: the Agents page's entries (recipe.entries) as pick cards, with
Protocol and Fit pills and a Filter menu for From and Proves, a skeleton
while loading and one line on failure. The grid is kept while the
benchmark stays the same, so its filters survive each render, and its
cards follow the recipe. Other benchmarks' agents are part of From.
… protocol

The Original card carried "reference" as its protocol, so the Protocol
pills offered it. It now reads "as published" and is left out of them.
…nchmark

Runs on: OSWorld 1 showed Codex alone, since From hides a benchmark's own
agents by default. Their cards now pass From whenever Runs on narrows to
their benchmark (a card's unless in the card toolkit), so the 12 show
beside Codex without changing From.
…nd the Agents page

Every agent and capability card now reads the same whatever it comes from
and whether it can be chosen: the name and its version on the title row,
the reason it cannot be chosen under it, the ports it has proven (Computer
use) and what it is as badges, and the foot on the card's last line with
its protocol on the left and where it comes from on the right (Bundled,
Yours, or the benchmark it belongs to).

The protocol is in sentence case where it is made (recipe.protocol), so a
card's pill reads as its filter does. The foot no longer wraps in the
builder, which put the protocol on a line of its own on some cards.
A filter of the builder's Agent step could hide an agent the recipe runs,
as the tiles before the card toolkit never did. A pick card that is pressed
now shows whatever the search and the filters say; one unpicked under a
filter stays until the next change, so the card does not vanish under the
pointer.
…r menu

The two rows of pills above the cards (protocol; can run it or not) are
now two groups of the one Filter menu, beside From and Proves, as the
Agents page filters. Every value starts on, so the step still shows any
protocol and any fit until a value is left out.
…s did

A pick card of the card toolkit showed it was chosen only by its colour.
An enabled one now holds a check in its title row's corner, shown while its
toggle is pressed (by CSS, so a click, Space or Enter shows or hides it at
once); a card that cannot be chosen has none.
The Agent step has the catalogue pages' toggle between cards and a table,
cards by default. The table is the card toolkit's rows of the same items:
each row's name is the pick toggle with its check, a click on the row picks
it, a disabled row is faint with why not beside the name, and a chosen row
stays in view under any filter, as a chosen card does. The builder fetches
the other view of the step in place, keeping the recipe and its picks, and
remembers the viewer's choice.
…n it

Fit leaves the Filter menu for a dropdown of its own beside it, ticked to
Can run it at first, so the step opens on what can run this benchmark; a
benchmark's Original card always can. A toolkit dropdown narrowed to one
value now names it on its button (Fit: Can run it) rather than counting
it, so what is hidden is never a surprise; this applies to every dropdown
of the table toolkit.

A choice made outside the grid, such as a loaded recipe, that the filters
hide now draws the grid again, so the chosen agent shows.
A card link with a tooltip (every pick card) was raised for that tooltip,
which made its focus ring wrap the name instead of the card, and the
builder drew its own outline round it too. The link stays unpositioned, so
its ring is the card's.
In the table view of the card toolkit, a pick is now a checkbox in a
leftmost column of no name, ticked when chosen and disabled on a row that
cannot be chosen; the name is plain text and the check beside it goes. The
header has no box that ticks every row, since an agent is picked one at a
time, so the table toolkit's check column and its tick-all are not used:
the box sends the same nullius-pick as a card's toggle, a click elsewhere
on the row still ticks it, and the builder sets the box from the recipe as
it sets a card, so either view picks for the one recipe.
A table toolkit menu opens leftwards from its button. On a narrow screen a
button that is not at the row's right end, such as the Agent step's Fit,
opened its menu past the page's left edge, its boxes cut off. Such a menu
now opens rightwards instead.
The Agent step's table had no column to take the width the table spares,
so the table shared it among every column and the box column grew to about
100px. From now takes it, as an expanding column does elsewhere, and the
box column's header carries the table toolkit's pick-col class (a `pick`
column: blank, as narrow as a `check` column, with no tick-all box), so it
is the check column's width.
Name, not From, now takes the width the table spares, so From stays
compact at the right and Why not, Protocol and Proven keep their natural
widths. On a phone the pinned name wraps beside its box rather than
pushing the reason off its line.
The table toolkit's snug cells have .4rem each side, about 13px between
columns, which reads well for text beside text but left Proven's outlined
pill nearly touching From. The Agent step's table, whose Protocol and
Proven are pills, now has .6rem each side (about 19px) on a screen wider
than a phone; on a phone it keeps snug's, so its pinned name does not
break mid-word.
Fit leads with the plug icon of the sprite, a connector whose halves fit,
as Filter and Columns lead with theirs. It uses the table toolkit's
existing filter_icon, so no other dropdown changes.
The sprite gains i-puzzle, a piece with a knob above and to the right and
a notch on the left, centred in its 24 grid and drawn by .ic as its
neighbours are; Fit uses it in place of the plug, which stays for Settings.
The Agent step's row in docs/builder.md still named Protocol and Fit pills. Fit is now a menu of its own that starts on Can run it, Protocol is in the Filter menu with From and Proves, the step shows as cards or a table, and a chosen agent stays in view under any filter.
@harenome
harenome merged commit bdcf918 into ThinkFlowLab:main Nov 20, 2026
2 checks passed
@harenome
harenome deleted the feat/builder-agent-cards branch November 20, 2026 10:13
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.

Builder: the Agent step draws its own tiles, apart from the Agents page's cards

1 participant