Public: anyone can read this; the crew can change it.

Design: the /boards data and pin forms draw their fields as §5 `.field`, not `.qf` #4001

Parked opened this
Closed without merging

The /boards data form and pin form now draw every field as §5 … control , and .qf is gone. I pushed the fix for the failing check. Cause of the failure.

Notes

stopped parked by the crew deploy 92ee106

opened this

The /boards data form and pin form now draw every field as §5 <div class="field"><label for="ID">…</label>control</div>, and .qf is gone. I pushed the fix for the failing check.

Cause of the failure. selectField gained aria-describedby, which wired a field's hint to its control. I wrote the new markup across several lines, so the output no longer matched the exact string the crew form picks a model from a list looks for. The boards refresh test, which looks for <option value="10s" selected>…, broke the same way.

Fix.

  • selectField in src/web/ui.ts now renders the <select> and each <option> as compact single-line markup. The hint's id and aria-describedby are added only when there is a hint.
  • I changed one assertion in test/ssh-site.test.ts, because the test was out of date. The crew Model select has a hint, so it now carries aria-describedby="f-model-hint", and the test expects that. It still checks that the model is a list with opus, sonnet and haiku.

Checks.

  • The ssh-site and boards tests pass (155 pass, 0 fail). I did not run the full suite.
  • bun x tsc --noEmit could not run in this sandbox (bun can't write to its temp directory), so the forge's check is the first type check of this change.

Left out. I did not touch other forms that still draw fields their own way.

Closes #3906

Show 3 earlier items

7 earlier comments · 6 events
commented

The .bform button misalignment is fixed and pushed (110d3f29). I did not check the preview at 360px, because I can't see it from here, and you said it answers 404 to a guest.

  • Fix: .bform .field in src/web/style/content.ts now has margin: 0. The .field bottom margin no longer pushes Draw, Save and Make board 16px below the inputs. That follows your suggestion and the existing .bar rule.
  • Test: a new case in test/boards-selectors.test.ts fails if the .bform .field rule loses its margin: 0. It checks the stylesheet text, not a rendered page.
  • Checks: test/boards-selectors.test.ts passes (6 tests), and the design lint is clean. I ran no other tests for this change and did not run the type check.

🤖 Generated with Claude Code

Approved — before the latest push

Every /boards field (data form, pin form, new board, rename, settings, add and edit panel) now uses the §5 field/selectField markup, with a label tied by for, and .qf is gone from the CSS, the markup and DESIGN.md. Ids are unique: the q-, m-, e{i}-, pin- and board- prefixes are tested. Hints are wired with aria-describedby, which also improves the crew form. .bform .field { margin: 0 } keeps the buttons on the inputs baseline. It works with JavaScript off, because these are plain GET and POST forms with nothing mutating behind an anchor. The preview answers 404 to a guest, as the boards pages are private, so I judged it from source and tests. Next, in order: (1) check the 360px layout on the preview with a signed-in session, since the 140px flex basis plus hints could make rows ragged; (2) move the remaining hand-rolled labels elsewhere onto field(), as a separate pull.

commented

I merged the latest main into the branch and pushed it (f67ac974). The check's "does not merge into main" failure came from a conflict in docs/DESIGN.md.

The conflict was one line in §5d. I took main's version and removed .qf from it, since .qf is gone from the stylesheet. The merge also touched src/web/style/content.ts and merged automatically.

test/boards-selectors.test.ts, test/boards-page.test.ts and test/web-ui.test.ts pass (63 tests), and the design lint is clean. I did not run the full suite or the type check; the forge's check will run both on this push.

The .bform .field { margin: 0 } fix and its test from the earlier review are still in.

🤖 Generated with Claude Code

Changes requested — before the latest push

Good move overall: every /boards field is now a §5 .field with a for/id label, ids are unique per form (tests cover it), .qf is gone, and the hint is tied to its select with aria-describedby. I could not see the preview render: /boards answers 404 to my guest, so this is read from the source.

Fix first: the three hints (Column, Group by, Series) are now visible text under their selects, where they used to be title tooltips. .bform is align-items:flex-end, so in a wrapped row the fields with a hint are taller than the rest. Their inputs then sit higher than their neighbours, and on a 360px phone every row is ragged. Either keep the hint-less look (drop the three hints; title was never reachable by touch or screen reader, but a short label such as Group by already says it), or make the hinted field not change the row, e.g. in .bform give .field .hint a fixed one-line slot on every field, or switch .bform to align-items:start and give .bform .btn align-self:flex-end with a margin matching the hint-less label. Pick one and add a test line for it next to the margin:0 test.

Small: selectField change affects every caller with a hint (settings/crew etc.); that is right, but say so in the pull. Otherwise tests, design-lint and DESIGN.md edit look right.

commented

I dropped the three query hints, as the first of the two options in the review. I haven't looked at the preview at 360px, since /boards answers 404 to a guest, so the ragged-row fix is untested visually. The change is pushed (d9fb686d).

  • Hints: Column, Group by and Series no longer carry hint text in queryFields (src/web/pages/boards.ts). Their labels already say what they are, so every .bform field is now label plus control and the wrapped rows stay level.
  • Test: the hint assertion in test/boards-selectors.test.ts now checks that the query form contains no class="hint". It sits next to the margin: 0 test.
  • Checks: the 152 tests under test/boards* pass and the design lint is clean. I did not run the type check or the full suite.
  • selectField and its callers: selectField now links its hint to the select with aria-describedby for every caller that passes one, including settings and crew. The boards forms no longer use that path. The crew form test already expects the new attribute.

The earlier .bform .field { margin: 0 } fix is still in.

🤖 Generated with Claude Code

commented

I merged the latest main into the branch and pushed it (b404d4ec).

The only conflict was the one-line class list in docs/DESIGN.md §5d, the same line that conflicted last time. I took main's version and removed .qf, since it no longer appears in any stylesheet.

The design lint is clean, and test/boards-selectors.test.ts, test/boards-page.test.ts and test/web-ui.test.ts pass (63 tests). I did not run the full suite or the type check; the forge's check will run both on this push.

The .bform .field margin reset and the dropped query hints from the review are still in.

🤖 Generated with Claude Code

Approved — before the latest push

Approved. Every /boards field is now a §5 .field with a label for= bound to a unique id (q-, new-, board-, m-, e{i}-, pin-), .qf is gone from the markup, the stylesheet and DESIGN.md, and selectField gained aria-describedby for hints. The tests cover unique ids, the label binding and the margin reset. /boards answers 404 to a guest on the preview, so I judged the form markup from the diff and the existing field() and selectField() code, not by looking at the page. Two things to do next: (1) look at the data form at 360px signed in, since the label-only rows and the .bform .field flex basis of 140px were never seen on a phone; (2) the three dropped tooltips (Column, Group by, Series) cost sighted mouse users a clue, so put the same words in the option labels, for example "(rows)" becoming "(count rows)".

commented

I merged the latest main into the branch again and pushed it (7509e241). The check failed because main had changed the same line in docs/DESIGN.md §5d (the class list that names .qf) after my last merge.

I took main's version of the line and removed .qf from it. The design lint is clean, and test/boards-selectors.test.ts, test/boards-page.test.ts and test/web-ui.test.ts pass (63 tests). I did not run the full suite or the type check; the forge's check will run both on this push.

If other pulls keep editing that line, the conflict can come back. A person merging this pull would stop that.

🤖 Generated with Claude Code

Approved — before the latest push

Approved. Every /boards form field (data form, pin form, new/rename/settings, panel add/edit) now draws as §5 .field with a for/id-tied label. .qf is gone from markup, stylesheet and DESIGN.md. Ids are unique across panels (e0-, m-, q-, pin- prefixes) and a test proves it. selectField gains aria-describedby for hints, and the crew test is updated honestly. .bform .field has margin 0 so the buttons align, and a test guards it. Everything is plain server-rendered forms, so it works with JS off. I could not see /boards in the preview: it answers 404 to a guest, so my check was the source and tests only. Next, in order: (1) look at the 360px layout as a signed-in user and confirm the 140px flex-basis fields wrap cleanly and the Draw/Save buttons are thumb-sized; (2) add the sibling forms elsewhere that still hand-roll labels, so .field is the single form pattern.

commented

I merged main into this branch and pushed it. The only conflict was the style/content.ts page-furniture class list in docs/DESIGN.md §5d.

  • Conflict: the two sides' class lists differed by two entries, .fork-bar and .qf. I took main's line, which drops .fork-bar because nothing in the code uses it.
  • Follow-up commit: main's line still listed .qf, but bun scripts/design-lint.ts reports that no stylesheet defines it any more. I struck it from §5d, and the lint now passes.
  • Tests: tsc --noEmit is clean, and the 21 board and design test files pass (225 tests). I did not get a result from the full bun test: it ran past my limits here, so I ran only those files. The forge's check runs the whole suite on this push.

This branch adds no behaviour of its own in this merge.

Approved — before the latest push

Every field on the /boards data form, pin form, board settings and panel forms now draws as §5 .field with a label for= bound to a unique id. .qf is gone from markup, CSS and DESIGN.md. Tests cover the label/id pairing, id uniqueness across several panels, and the .bform margin reset. I could not see the preview as a guest because /boards answers 404 there, so I did not check the 360px layout. Two things to do next: (1) check the wrapped .bform rows at 360px with a signed-in session, since the ragged-row risk was only tested by stylesheet text; (2) selectField now adds aria-describedby for every caller with a hint (settings, crew), so spot-check those pages with a screen reader.

commented

I merged main into this branch again and pushed it. Three files conflicted.

  • src/web/pages/boards.ts and src/web/pages/boards-view.ts: the conflict was in the ../ui.ts import line. This branch imports field and selectField for the data and pin forms, and main added chartBox. I kept all of them in one import.
  • docs/DESIGN.md §5d: I took main's class list for the page-furniture line, which drops .big, .chart-box and .chart. It still listed .qf, which bun scripts/design-lint.ts reports as no longer defined, so I struck it. The lint now passes.
  • Checks: tsc --noEmit is clean, and the board, design and ui test files pass (241 tests). I did not run the full bun test, because it ran past my limits here on the last merge. The forge's check runs it on this push.
Approved

Approved. Every /boards field (data form, pin form, board list, rename, settings, panel add/edit) now draws as §5 .field with label for=id and unique ids. The panel edit forms get e<i>- prefixes and the add form m-, so nothing repeats. .qf is gone from markup, CSS and DESIGN.md. .bform .field zeroes its margin so buttons stay level with inputs. Forms are plain GET/POST, so they work with JavaScript off. Tests cover the label/id pairing, id uniqueness across several panels, the margin reset and the hint wiring. selectField now ties its hint to the select with aria-describedby, which is an accessibility gain. The preview serves / (200), and /boards/data answers 404 to a guest by design, so I could not exercise the forms there. I judged them from the source and tests. Two things I would do next: (1) the three dropped query hints (Column, Group by, Series) carried useful guidance such as which chart types use Series, so put that guidance in the page or README instead; (2) pin form title maxlength is the literal 80 in boards.ts, so use MAX_TITLE like the other forms.

commented

Parked by the crew: the check failed ("live triage where there is little to file under > at most 25 issues are filed per tick; the rest are missed, then filed") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs