Skip to content

feat(web): show the Workspaces page as cards, with a card layout shared by every card page - #238

Merged
harenome merged 7 commits into
ThinkFlowLab:mainfrom
harenome:feat/workspace-cards
Nov 19, 2026
Merged

harenome merged 7 commits into
ThinkFlowLab:mainfrom
harenome:feat/workspace-cards

Conversation

@harenome

@harenome harenome commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #237

What

Workspaces: Table or Cards.

  • The toggle. controls() and table() in _tables.html take layout='table'|'cards'. It adds an icon .seg-toggle at the end of the controls row, Table (#i-table) and Cards (a new #i-cards, staggered tiles). The links keep the other query parameters. Only Workspaces turns it on.
  • The two views. Workspaces renders one view: the table, or with ?view=cards the cards (cards(..., sort=true, layout='cards')). Both come from the same column list, each field with its card slot. Roots, the launches button, the pencil and the rename form are macros both views share. The page's script hides .ws-show, .card-link, .ws-edit when the form opens, so one handler serves a row and a card.
  • Rename. workspace_rename reads a hidden view field and returns to the view the rename came from.

The card toolkit, for every card page. That is Benchmarks, Agents, Capabilities, Kits and Workspaces.

  • Title row: the icon, the title, then a corner with check, then a new delete slot (at most one). A title value can carry after, a control placed after its last word, as the Workspaces pencil is.
  • Foot: the old top row, status, tag and meta, is now the card's last line, only when one of them has a value. It has one height with or without a status glyph, so the stats of a row line up.
  • Actions: flush right. A delete is an icon-btn danger trash, which is neutral until hover or focus, like the table's.
  • Stats:
    • The page fails no longer when a card has more than three.
    • The grid carries --stats, its number of stat fields. It has that many columns.
    • With four or more stats, each card is at least 72 px per stat wide. On a narrow screen, a size container query wraps them into even rows: 2 + 2, 3 + 2, 3 + 3.
    • An empty stat shows — in its cell. No page passes one today.
  • Sort: NulliusTable.cards runs the same Sort by menu as the table when cards() has sort=true. Each card carries its sort keys as data-s-<field>. The catalogue pages keep sort=false.
  • Order: the title now comes first in the card's markup.

Touches

templates (_cards.html, _tables.html, base.html, workspaces/workspaces.html) · static (tables.js, catalogue/catalogue.css) · routes (web/workspaces.py) · tests

Before and after

The same synthetic profile on main and on this branch: 100 workspaces, the bundled catalogue.

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
Workspaces, 1280 px, light before-workspaces-light-1280 after-workspaces-light-1280
Workspaces, 390 px, dark before-workspaces-dark-390 after-workspaces-dark-390
Workspaces cards, 1280 px, light after-workspaces-cards-light-1280
Workspaces cards, 390 px, dark after-workspaces-cards-dark-390

Verified

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

  • pip install -r app/requirements.txt, then python3 app/tests/parallel.py app/ui_tests: 667 tests in 55 modules, OK.
  • python3 app/tests/parallel.py: 3061 tests in 155 modules. One test failed: test_osworld2_driver test_a_driver_killed_mid_run_leaves_its_reaper_the_vm_and_its_volume. This branch does not touch the backend, and the module passed 3 of 3 times on its own.
  • New and changed tests:
    • test_cards.py: the slot order; the check and delete ending the title row; a card with only a check, only a delete or both; one delete per card; no corner and no foot when empty; four stats with no failure, --stats, and — in place of an empty stat.
    • test_run_routes.py: the default view and ?view=cards; the toggle on Workspaces only, keeping other parameters; Roots as the fourth stat; the delete in the corner and no action line; the pencil and the form on each card; a rename with view=cards returning to the cards.

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

  • Every card page: no page JavaScript error and no sideways scroll. Search and the category pills on Benchmarks work.
  • Workspaces cards:
    • The toggle works both ways, by click and keyboard. Search, and Sort by name and Runs, work; Default restores the order.
    • The Roots stat opens the fetched dialog. The corner trash opens the Delete dialog, and Escape returns focus to it.
    • The pencil opens the form. Escape and Cancel restore the name. A real rename on a scratch profile returns to the cards.
    • A long name wraps with the pencil after its last word and the trash at the top right.
  • A check added to a card in the browser sits before the trash, level with the title's first line, also when the title wraps.

Not checked: a screen reader, and a page with a check field, since none has one yet.

Risk

  • Every card page changes its layout. A revert restores the top row, the left-aligned actions and the limit of three stats.
  • At 1280 px, Workspaces cards are two per row: four stats at 72 px each. A smaller minimum fits three per row, but a two-digit count button can then overflow.
  • A Workspaces card opens nothing when clicked, as opening a workspace is a form post. Its title is not a link.
  • view is the toggle's query parameter. Runs and Compare already use view for other things, so a toggle there would need another name.

A Table/Cards toggle at the end of the controls row (the controls macro's
`layout`, a link to ?view=cards that keeps the rest of the query). The
server renders only the view chosen. The cards are the card toolkit's over
the table's own fields, each in its slot; their Roots and Delete open the
same dialogs. Sort by now works on cards too, for a collection that asks.
…nd date at its foot

The card toolkit drops its top row: the check sits at the right of the title row, level with the title's first line however it wraps, and status, tags and meta form the card's last line, after its actions, the meta at the right. Actions sit at the right edge, so the left holds what a card is and the right what can be done with it. The title now comes first in the card's markup.
…cards their Roots as one

The card toolkit no longer stops at three stats: a stat field is a column (--stats on the grid), and more than three widen every card of the page so they keep one line, fewer cards a line. On a card too narrow for one line they wrap in two balanced rows. A stat without a value keeps its place as a dash, so the next ones stay aligned across cards. A Workspaces card shows its Roots as a stat after Launches, the same count button and dialog; Delete is its only action.
A card's title may carry a control after its last word (its value's after) and a class on the title row. A Workspaces card puts the table's pencil there, and the same form swaps in for its name: the page's script, the same POST and token. A rename returns to the view it was made from.
The card toolkit's title row ends with a corner for the check and a new delete slot, in that order, level with the title's first line. A delete is a quiet trash button, the table's row delete, with an action's value shape. A Workspaces card's Delete moves there, the same button and dialog, and the card has no action line.
@harenome
harenome merged commit d58810a into ThinkFlowLab:main Nov 19, 2026
2 checks passed
@harenome
harenome deleted the feat/workspace-cards branch November 19, 2026 14:05
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.

Workspaces: show the list as cards, and give every card a check and a delete beside its title

1 participant