Repository navigation
feat(web): build each table from one column list, with search, sticky columns and aligned numbers - #199
Merged
Conversation
The rules the Launches and Workspaces tables share move from their page stylesheets into the table block of style.css. The Runs table pins its checkbox and Run columns with .sticky-col, as Launches does, so one rule holds every sticky column. An unsortable header is any header without data-type. The unused .grid.tools row-failed rule goes.
…cros columns_button and columns_menu give the Runs and Launches tables one Columns menu; blank gives the Launches, Workspaces and Hosts tables one header with a screen-reader name only.
NulliusTable.paged joins toolbar and pager, as the Launches and Workspaces tables both did by hand.
A press on a label's text moves the focus to the page's <main> (tabindex -1), an ancestor of the menu. The menu's focusout handler took that for leaving and closed the menu before the click reached the label, so only the box or radio itself worked, in Filter, Sort by and Columns alike. Focus moving to an ancestor of the menu no longer closes it.
Each .sticky-col sits at the summed widths of the sticky columns before it, measured on load and again when one resizes or hides or rows come in, instead of an offset written by hand per page. The All runs page's Run column now starts where its checkbox column really ends.
… widths A table's columns are one list of definitions; the table macro builds from it the headers, the controls row, the Columns menu, Sort by and the pages, and tables.js wires them on load, so a page gives its columns, its opt-ins and its rows' cells. - Search: a box at the left of the controls row, over each row's data-search text, any case; it narrows before the pages, a new query shows the first page, Escape clears it, no match shows the empty note. The page count is announced politely. - The buttons go right: Columns, Filter, Sort by. Their menus open leftwards, and Sort by's radios are named after their table. - Every named column sorts unless its definition says not: Launches' Machines and Workspaces now sort by their names. - Widths: a column fits its widest cell on one line, but one that expands, with a floor, takes the rest; past that the table scrolls. - A checkbox column (check_head, check_cell) whose header follows the visible rows, and a general actions cell (.acts-col). - Launches and Workspaces use the table macro, All runs its headers and Columns menu. The Launches-only inventory and inv-* classes become .snug, .acts-col and #launches rules. - Workspaces: Launches is a button like Roots, with the sidebar's icon; Launches and Roots sit last, before the trash. - The search box style moves from Settings into the toolkit, unchanged.
A page marks a sticky column once, in its header (the column list's sticky and edge); tables.js gives each cell under it .sticky-col and .sticky-edge as it places them, so rows are written plain.
…ing pauses A query's words now each have to match, in any order. The pages announce what shows through one live region per table, 300 ms after the last change, instead of the note and the empty text both on every keystroke. A sticky row with fewer cells than headers is left as it is. The pages find their empty note by the table's id, and the Workspaces search says what it reads.
…ned by its column The table macro now loops over the rows and the columns and asks the page for each cell, which it writes with the cell macro: its data-col, its alignment and its pinning come from the column, so a cell cannot land under another column's header. A column's `align` (left, center, right; right for a 'num' column) replaces the `num` flag, which `.grid td` outranked: the numbers flagged with it now right-align, header and cells. The status and actions columns are `blank` columns, a checkbox column a `check` one; the last pinned column draws the edge; the unused `sort` options are gone. Launches and Workspaces build their rows this way.
… check column The header box is the toolkit's `check` column and the rows' boxes its check_cell; checks() keeps the header ticked, unticked or mixed over the visible rows, as the page's own copy of that logic did. Compare still collects the ticked runs in the same order. The header box's tooltip is now its name, "Select all runs for comparison".
A workspace without launches shows the same count button as the others, its icon and 0, greyed: still focusable, it does nothing, and its reason, "No launches in <name>", is its tooltip and its description. The greyed macro takes the button's class and text for it.
The open row's background is close to the buttons' plain border, in light and dark; on that row they take the hover border's token instead.
… written yet The Launches search says it reads agents; a launch's row now carries the agents of its unwritten jobs too, from the plan its record already holds.
A page passes macros as `views` (how the table looks), written before Columns, and `actions` (on the rows or the selection), written after Sort by. Each slot is a group spaced as the toolkit's buttons, left out when it writes nothing, and wraps with them on a narrow screen.
All runs gets the toolkit's search box, Filter and Sort by, beside Columns, with Compact as a view and Compare as an action. Search reads each run's id, agent, model, runner and dataset. The header carets and the arrows on unsorted columns go: a header shows an arrow only when its column is the sorted one, on every table. Compare stays focusable and greyed, its reason its tooltip, until two runs are ticked. A live refresh keeps the query, the filters and the sort, and gives each Filter list the values the runs have now. The caret filter has no user left and is removed from the toolkit.
harenome
added a commit
that referenced
this pull request
Nov 18, 2026
… and filter pills or dropdowns (#201) Closes #200 ## What The four catalogue pages (Benchmarks, Agents, Capabilities, Kits) now build their cards with a card toolkit, `_cards.html`, from the same field list as the table toolkit. A field's `card` key names the slot it fills. A field without `card` is not on the card, and `table` false keeps a card-only field off a table. Each page builds its items in Python (`web/catalogue.py`, `web/agents.py`) as dicts of display values, so the template only says where each value goes. The slots, in order: | Slot | Holds | How many | | --- | --- | --- | | `status`, `tag`, `meta`, `check` | the top row: pills, a version, a checkbox | tags any, the others one | | `icon`, `title` | the icon and the name, a link stretched over the card | one title, required | | `text` | the description | one | | `badge`, `note` | runner pills, notes with an optional icon | any | | `stat` | label first, then value (`<dt>`, `<dd>`), below a line | up to three | | `alert`, `action` | a blocker line, buttons or links | one alert, any actions | A page that breaks a limit fails to render. A click anywhere on a card opens it, except on a control of its own. The pills and notes with a tooltip sit above the card's link to keep their tooltips, so a script follows the link for them. A middle click or a Ctrl, Cmd or Shift click opens a new tab or window, and a click that ends a text selection opens nothing. A stat label wraps between words only: a stat column is at least as wide as its longest word. **Icon rule.** When one item of the page has an icon, the items without one show their initials. When no item has an icon, no card shows one. **Controls.** The cards use the table toolkit's controls row: the search box at the left, the buttons at the right, no Sort by. Agents and Capabilities now have a search. Search and filters hide the cards that do not match. A Benchmarks shelf with no visible card hides, and its count follows the visible cards. After a search or a filter, one live region tells a screen reader how many cards show, 300 ms after the last change, in the page's word: "9 of 12 benchmarks". It says nothing on load. Cards and tables share this code (`NulliusTable.cards`, `narrow`, `voice`). **Filter forms.** A column's `filter` puts its choices in one or more forms: - `button` (default): the global Filter menu. - `dropdown`: a menu of its own in the controls row. Its button ends in a chevron that turns while the menu is open. Under reduced motion, it changes without animation. - `pills`: a row of toggles under the controls row. Every form shows the same state. A pill toggles its value. All clears its column, and Clear filters clears every column. An `only` preset shows in each form. A column narrows when it does not show every value. The Filter button or a dropdown that holds such a column is marked as narrowed and shows a count: the Filter button its narrowed columns, a dropdown its chosen values. After None, a dropdown shows a 0 beside that mark. A card filter compares a value's `value` when it has one, else its text, so a label can differ from its value. A field's `filter_icon` leads its dropdown button and its pill row. Tables get the same forms. **Pages.** - Benchmarks: category pills, an Origin dropdown and a Runs with dropdown, each with a new sprite icon (`i-origin`, `i-runner`). No Filter button. The Find box and the chips are gone. - Kits: family pills, and the search. - Agents and Capabilities: the search. **Visible changes outside the lists.** - Capabilities lose their letter mark, by the icon rule: no capability has a logo. - Agents without a logo show two-letter initials instead of one letter. - The Benchmarks filters take several choices: categories, origins and runners are toggles, not one choice each. - The outlined tags (`std-tag`, `run-tag`) have the same 5 px corners as the filled ones, everywhere they appear: the lists, the detail pages and the Add dialog. The Getting started step for Benchmarks now points at the controls row (`app/nullius/onboarding.py`). The agent mark URL has one source, `agent_mark_url` (`web/filters.py`), for the `agent_mark` macro and the Agents cards. The UI sweep's clipped-text check reads the card stats and text. `catalogue.js` drops its chip filter. It keeps the hash links that open an entry's page and the dataset tabs. `AGENTS.md` names `_cards.html`. Out of scope: a toggle between a table and cards. ## Touches backend (`onboarding`, one string) · routes (`web/catalogue`, `web/agents`, `web/filters`) · templates and static (`_cards.html`, `_tables.html`, `tables.js`, `catalogue/benchmarks.html`, `agents/standard.html`, `agents/kits.html`, `base.html`, `style.css`, `catalogue/catalogue.css`, `catalogue/catalogue.js`) · skills (`ui-sweep/scripts/sweep.py`) · docs (`AGENTS.md`) ## Before and after Seeded data as in #199, with the bundled catalogue. Before is `main`, after is this branch, same width. | | Before | After | | --- | --- | --- | | Benchmarks, 1280 px, light | <img width="420" alt="01-before-benchmarks-1280-light" src="https://github.com/user-attachments/assets/9147af2b-ef6a-4841-aa44-f21d66cb2750"/> | <img width="420" alt="01-after-benchmarks-1280-light" src="https://github.com/user-attachments/assets/de063f5d-ed89-405b-8550-52960801deb1"/> | | Benchmarks, the Origin dropdown open | <img width="420" alt="02-before-benchmarks-dropdown-open-1280-light" src="https://github.com/user-attachments/assets/2debaa0a-29c4-4dc6-b3cc-894003f25a1f"/> | <img width="420" alt="02-after-benchmarks-dropdown-open-1280-light" src="https://github.com/user-attachments/assets/53b7afb0-e233-4c52-a88b-6015a2a7dc76"/> | | Benchmarks, filtered to Coding | <img width="420" alt="03-before-benchmarks-filtered-1280-light" src="https://github.com/user-attachments/assets/f94abe67-30ca-4b0a-9fee-813897579bfa"/> | <img width="420" alt="03-after-benchmarks-filtered-1280-light" src="https://github.com/user-attachments/assets/495654ea-157b-4e34-a62a-133a9aa0cace"/> | | Benchmarks, 390 px, dark | <img width="420" alt="04-before-benchmarks-390-dark" src="https://github.com/user-attachments/assets/0c87dea0-86a5-4dba-9458-ad394d6bc10a"/> | <img width="420" alt="04-after-benchmarks-390-dark" src="https://github.com/user-attachments/assets/609057e1-010d-4da3-b717-3f8445aafbc1"/> | | A card's stats, label first | <img width="420" alt="05-before-card-stats-1280-light" src="https://github.com/user-attachments/assets/fbf1132f-89a2-42c1-bc12-9f7bc3150f99"/> | <img width="420" alt="05-after-card-stats-1280-light" src="https://github.com/user-attachments/assets/6ee545cd-1f41-4ed7-9359-c97a03ce543f"/> | | Agents: logos, and initials for the agent without one | <img width="420" alt="06-before-agents-1280-light" src="https://github.com/user-attachments/assets/aedf1ad7-e059-497e-991d-a4c2c3139c76"/> | <img width="420" alt="06-after-agents-1280-light" src="https://github.com/user-attachments/assets/2692644a-ed48-44fd-80e6-e642607e3472"/> | | Agents, "code" typed in the search | <img width="420" alt="07-before-agents-search-1280-light" src="https://github.com/user-attachments/assets/1b91d9dd-1369-4747-8f7b-1111d131aac5"/> | <img width="420" alt="07-after-agents-search-1280-light" src="https://github.com/user-attachments/assets/a4add8a1-4bf4-45f8-a704-a7e3355ebb3d"/> | | Capabilities, "mem" typed in the search, 390 px, dark | <img width="420" alt="08-before-capabilities-search-390-dark" src="https://github.com/user-attachments/assets/ec6e1821-108b-4d95-b8d6-be06d9f2f238"/> | <img width="420" alt="08-after-capabilities-search-390-dark" src="https://github.com/user-attachments/assets/02edacd6-72e4-4c7e-a526-219db2df4e2b"/> | | Kits, the Capabilities family pill | <img width="420" alt="09-before-kits-family-1280-light" src="https://github.com/user-attachments/assets/3ce03515-8201-4cb3-8ec8-f36733d0912d"/> | <img width="420" alt="09-after-kits-family-1280-light" src="https://github.com/user-attachments/assets/c690a02c-4c23-43fa-882d-cbca340d8132"/> | | Kits, 1280 px, dark | <img width="420" alt="10-before-kits-1280-dark" src="https://github.com/user-attachments/assets/ff05e4e2-59d5-4a81-afda-8c2d2d3dff1e"/> | <img width="420" alt="10-after-kits-1280-dark" src="https://github.com/user-attachments/assets/16b94f40-60fd-40d3-b18c-89c0c23b9e76"/> | ## Verified In throwaway rootless containers (`python:3.12` with Node.js, which the script tests need, and a clone of the branch): - `python3 app/tests/parallel.py`: 2240 tests in 126 modules, OK. - `pip install -r app/requirements.txt`, then `python3 app/tests/parallel.py app/ui_tests`: 595 tests in 48 modules, OK. - New: `app/ui_tests/test_cards.py`. It renders the macros and checks the slot order, the slot limits, empty slots, the icon rule and escaped values. It also checks controls without Sort by, two collections with every filter form on one page, and a filter value that differs from its label. Under Node.js, it runs `tables.js` on cards and checks: - Search and filters hide cards and their empty groups. - The announcement waits for changes to stop, says nothing on load and names its cards. - A click on a card opens it, and a modified or middle click opens a new tab. A click on a control, or at the end of a selection, does not. - `test_tables.py` checks the filter forms: each column in its forms, the forms in step, and a preset in every form. It also checks the filter icon, no Filter button without `button` columns, and the narrowed mark and counts after None and All. - The catalogue route tests read the new markup. Browser check, Chromium (Playwright 1.49), on the seeded data: the views in the table above, before and after. No page JavaScript error and no console error on Launches, Workspaces, All runs, Benchmarks, Agents, Capabilities and Kits. Also, on this branch: - A click on a run-with pill or a needs note opens the benchmark, and the pills keep their tooltips. A click on the example tag opens the agent. A Ctrl click opens a new tab. - After None, the Origin dropdown is marked narrowed and shows 0. - The live regions are empty after load. A search on Benchmarks reads "3 of 9 benchmarks". - At 1280 and 390 px, no stat label or value is cut, and no stats row passes its card. Not checked: other browsers, and a screen reader. A click that ends a text selection is checked in the script test only: the card's link covers its text, so a drag in the browser selects nothing. ## Risk The change rewrites the markup of the four catalogue pages. A script or test that reads the old ids and classes (`#bench-find`, `.bench-cat`, `[data-filter]` on the chip rows) no longer finds them. The Getting started target moves with them. The card filters now compare values, not labels: on Benchmarks, the origin and runner values are `official`, `community`, `standard` and `harbor`. To undo, revert this pull request's commit. Nothing is migrated, and no stored data changes.
This was referenced Nov 18, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #198
What
A table is now one list of column definitions. The
tablemacro in_tables.htmlreads it and builds the headers, the cells, the controls row, the Columns menu, Sort by and the pager.tables.js(NulliusTable) wires them on load. Launches and Workspaces use the macro. All runs builds its headers and its controls row from its column list (COLUMNSinweb/shared.py), and keeps its outcome chips, its live refresh and no pager.A column definition has these keys:
key,labeldata-colof the header and the cells, and the name in the menustypetextornum: how the column sortsalignleft,centerorright(the default fornum), for the header and the cellsstickyblank,check,srmenu,fixed,offwidthfit(default): the widest cell on one line.expand: the rest of the width, wrapping. Past that, the table scrolls.The macro writes each row's cells in the order of the columns and asks the page for each cell's content. A cell therefore cannot land under another column's header, and it gets its column's alignment and pinning. A table opts into each feature with the macro's parameters:
search,columns,choices(Filter),only(a filter preset),viewsandactions(a page's own buttons). Sort by is on unless a column says it does not sort.Controls row. The search box is at the left and takes the remaining width. At the right, in this order: the
viewsslot, Columns, Filter, Sort by and theactionsslot. A slot is a macro of the page that writes any number of buttons. The toolkit places them in a group spaced as its own buttons, and writes no group when the slot writes nothing. At 390 px the search takes its own line and the buttons wrap together, flush right. The menus open leftwards. Search matches each word of the query against the row'sdata-searchtext, in any order and any case. It narrows the rows before the pager, and a new query shows the first page. Escape clears it. No match shows the empty note. One live region per table tells a screen reader what shows, 300 ms after the last search, filter, sort or page change, in the table's own word: "1–25 of 32 launches". It says nothing on load.Headers. A header shows an arrow only when its column is the sorted one, on all three tables. The ↕ on unsorted headers and the header filter carets are gone. Filters are in the Filter menu.
Sticky columns.
tables.jsplaces each sticky column at the summed widths of the sticky columns before it. It measures them on load and again when a column resizes or hides, or when rows arrive. A page marks a sticky column once, in its definition. The hand-written offsets are gone. On All runs, the Run column now starts where the checkbox column ends.Alignment.
alignreplaces thenumflag, which.grid tdoverrode. Numbers in Launches, Workspaces and All runs are now on the right, header and cells.Menus. In Filter, Sort by and Columns, a click on an option's text moved the focus to
<main>. The menu then closed before the click reached the label. A focus move to an ancestor of the menu no longer closes it.Pages.
web/runs.py). Machines and Workspaces now sort by name.checkcolumn. It stays ticked, unticked or mixed over the visible rows, and a hidden row keeps its tick. Compare collects the ticked runs in the same order as before. A live refresh keeps the query, the filters and the sort. Each Filter list takes the values the runs have now, and a new row passes the same query and filters. The visible "Tick two or more runs to compare" hint and the "N of M runs" note beside the buttons are gone. The page header still counts the runs shown.blankheader.The caret filter (
filter_button) has no user left and is removed from the toolkit. The shared table styles move into one block instyle.css. The search box style moves there from Settings, unchanged.AGENTS.mdnames the two toolkit files.Touches
routes (
web/shared,web/runs) · templates and static (_tables.html,tables.js,runs/launches.html,runs/index.html,workspaces/workspaces.html,settings/settings.html,style.css,runs/launches.css,workspaces/workspaces.css,settings/settings.css) · docs (AGENTS.md)Before and after
Seeded data: 32 run records and four workspaces ("Main study", two named "Ablation", and "Empty one" with no runs). Before is
main, after is this branch, same width.Verified
In throwaway rootless containers (
python:3.12with Node.js, which the script tests need, and a clone of the branch):python3 app/tests/parallel.py: 2240 tests in 126 modules, OK.pip install -r app/requirements.txt, thenpython3 app/tests/parallel.py app/ui_tests: 575 tests in 47 modules, OK.New:
app/ui_tests/test_tables.py. Under Node.js, it runstables.json a small DOM. It checks:It also renders the macros. Every named column has a header, sorts and is in the Columns menu. The cells follow the columns. Two tables on one page name their own radios. Names and values are escaped. The
viewsandactionsslots, fromcontrolsand fromtable: two items each, in place and order, one group each, and no group when a slot is absent or writes nothing.test_run_routes.pychecks the Launches and Workspaces markup, the greyed 0, and the planned agents in the Launches search text.test_runs_by_launch.pychecks the All runs controls row: the search, the order Compact, Columns, Filter, Sort by, Compare, the Filter and Sort by contents, the greyed Compare, headers without buttons, and each row's search text.Browser check, Chromium (Playwright 1.49), on the seeded data: the views in the table above, before and after. No page JavaScript error and no console error on either side. Also, on this branch:
Not checked: other browsers and a screen reader. The All runs page script runs in the browser check only, not in the test suites. A tooltip does not show in a headless screenshot. The greyed Compare's tooltip and description are checked in markup.
Risk
The change rewrites the markup of three tables. A page that reads a removed class or id breaks without an error: the old Launches-only
inv-*classes are now.snug,.acts-coland#launchesrules, and All runs no longer has#col-btn,#col-menu,#filter-noteor the header.filter-btncarets. All runs' "Clear filter" chip now also clears the search and the Filter menu. To undo, revert the branch's commits. Nothing is migrated, and no stored data changes. The viewer's choices stay under the same keys (runs.cols,runs.compact,<table>.cols,<table>.per).