Skip to content

feat(catalogue): sort and filter the catalogue pages, and show them as cards or a table - #240

Merged
harenome merged 5 commits into
ThinkFlowLab:mainfrom
harenome:feat/catalogue-views
Nov 19, 2026
Merged

harenome merged 5 commits into
ThinkFlowLab:mainfrom
harenome:feat/catalogue-views

Conversation

@harenome

@harenome harenome commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #239

What

Five commits.

  1. Sort.
    • controls(sort=...) also takes a list of field keys, so a page offers only those in Sort by. grid() writes data-s-<field> for those fields.
    • Benchmarks sorts by Name, Tasks and Datasets. Agents and Capabilities sort by Name, Ports proven and Benchmarks it runs. Kits sorts by Name, Port and Checks.
    • The numbers are type='num'. The tasks stat gets a numeric value: a range such as 10–89 sorts by its top number. A count such as 4/7 sorts by its first number.
    • NulliusTable.cards already puts each card back in its own grid, so Benchmarks keeps its shelves.
  2. Agents filter.
    • _choices() in web/agents.py builds Protocol (ACP or a command) and Proves, listing only the ports at least one agent has proven. Proves is a filter-only field with no card slot.
    • Capabilities has no filter: its protocol is always JSON lines.
  3. One Filter menu. Agents puts both in the toolkit's Filter button, not in dropdowns of their own.
  4. Cards or a table.
    • controls(), table() and cards() take default='table'. The toggle's link to the page's default view drops view, and the other link carries ?view=<it>. Workspaces passes nothing new.
    • The four catalogue pages pass default='cards' and draw the table with ?view=table. In that case cards() draws its items through a new rows macro. It keeps a column for each table field that some item fills, and always one for a filtered or a number field. The name column is pinned and holds the entry's mark and link, drawn by a mark macro the cards share.
    • The four pages put the name first and hide secondary columns by default: Domain and Needs on Benchmarks, Proves and Summary on Agents, Summary on Capabilities.
    • Benchmarks' table is one table, with its shelf as the Origin column and rows in shelf order. A controls row drives one table, so one table per shelf would need new machinery.
  5. Example hidden. The Agents table hides Example by default. Only the example agent fills it.

Touches

routes (web/agents.py, web/catalogue.py) · templates (_cards.html, _tables.html, catalogue/benchmarks.html, agents/standard.html, agents/kits.html) · static (catalogue/catalogue.css) · tests

Before and after

The same profile on main and on this branch.

Before After
Benchmarks, 1280 px, light before-benchmarks-light-1280 after-benchmarks-light-1280
Benchmarks, 390 px, dark before-benchmarks-dark-390 after-benchmarks-dark-390
Agents, 1280 px, light before-agents-light-1280 after-agents-light-1280
Agents, 390 px, dark before-agents-dark-390 after-agents-dark-390
Benchmarks table, 1280 px, light after-benchmarks-table-light-1280
Benchmarks table, 390 px, dark after-benchmarks-table-dark-390
Agents table, 1280 px, light after-agents-table-light-1280
Agents table, 390 px, dark after-agents-table-dark-390

Verified

In a throwaway rootless python:3.12 container with Node.js and uv, on a copy of the branch:

  • python3 app/tests/parallel.py: 3074 tests in 156 modules, OK.
  • pip install -r app/requirements.txt, then python3 app/tests/parallel.py app/ui_tests: 674 tests in 55 modules, OK.
  • New and changed route tests:
    • Each page's sort options, number types and sort keys.
    • The Agents Filter button with Protocol and Proves, no dropdowns, and a card's data-f-proves.
    • Each page: cards by default with Cards current, ?view=table with only the table and Table current, and the toggle's links.
    • Each table's columns, hidden columns and shelf order. Workspaces still defaults to the table.

Browser checks, Chromium (Playwright 1.49.1), light at 1280 px and dark at 390 px, on the four pages:

  • Every sort option both ways, then Default. Sorting with search, with the pills and with each filter choice.
  • On Benchmarks, a second shelf made in the page kept its cards when sorted.
  • The toggle by click and by keyboard. In the table view: search, filters, sort, and the name links.
  • Escape and the arrow keys in the menus. No sideways page scroll, and no page JavaScript error.

Not checked: two real shelves, since the bundled catalogue has only official benchmarks, and a screen reader.

Risk

  • A #key link such as /benchmarks#key finds its entry only in the cards view. That is the default.
  • At 390 px, a table scrolls sideways inside its own box with the name pinned, as the toolkit's other tables do.
  • A revert removes the sort, the filter and the table view. The cards stay as on main.

Benchmarks, Agents, Capabilities and Kits get the Sort by menu of the card toolkit: by name and by their counts (tasks and datasets, ports proven and benchmarks it runs, checks). A card collection's sort can name the fields it offers; Benchmarks sorts within each shelf.
Two dropdowns, as Benchmarks' Origin and Runs with: the agent's protocol (ACP or its own command) and the ports it has proven, the latter listing only ports some agent proves.
Benchmarks, Agents, Capabilities and Kits get the Table/Cards toggle that
Workspaces has, with cards as their default and ?view=table for the table.
The toolkits take a page's default view, so the default has no view in its
link and the other view carries it; Workspaces stays table by default.

The cards macro draws the same items as a table when asked: one column per
field a table takes that some item fills, the name pinned with its icon and
a link to the entry, the same search, filters and Sort by. Benchmarks are one
table in shelf order, their Origin being the shelf, since a controls row
drives one table. Secondary fields start hidden in the Columns menu.
@harenome
harenome merged commit 0e6ae8c into ThinkFlowLab:main Nov 19, 2026
2 checks passed
@harenome
harenome deleted the feat/catalogue-views branch November 19, 2026 15:06
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.

Catalogue pages: no sort, no table view, and Agents cannot be filtered

1 participant