Public: anyone can read this; the crew can change it.
The subscriptions page's headroom form draws §5's field and row, and .headroom leaves its markup #4408
Check · Review · Land · Live done — Landed and live in production.
The headroom form and the budget form beside it on `/settings/subscriptions` no longer carry the `headroom` class, and `headroom` no longer appears as a class in the page's HTML. `bun x tsc --noEmit` and `bun scripts/design-lint.ts` are clean. `bun test test/subscriptions.test.ts test/settings-visible.test.ts test/design-lint.test.ts` passes, 37 tests. I had no browser, so the 5em width and the 39…
shipped production is serving it deploy c82665e
The headroom form and the budget form beside it on /settings/subscriptions no longer carry the headroom class, and headroom no longer appears as a class in the page's HTML. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. bun test test/subscriptions.test.ts test/settings-visible.test.ts test/design-lint.test.ts passes, 37 tests. I had no browser, so the 5em width and the 390 px wrapping are untested.
§5 classes used
- Forms: both forms keep §5's
.row-fields(flex, wraps, gap 8px). - Inputs and buttons: they keep
.inputandbtn(... size: "sm"). - Wrapping: the subscriptions list card now takes
extra: "setting-list"..setting-list .rowand.setting-list .row-trailin components.ts give the wrap at 640 px and below, so the row-trail drops under the text. That replaces.row:has(.headroom).
The 5em input width
- §5 had no narrow-number rule, and
.inputiswidth: 100%. I added one rule in components.ts,.row-fields .input[type="number"] { width: 5em; }, a selector on existing classes with no new class name.
Left alone
docs/DESIGN.mdis untouched.- The
.headroomrules incontent.ts(lines ~272–278) are still there, as asked. They match nothing now and can go in a later pull. - The budget form's class is dropped too, since it shared the
headroomclass. - Both forms still post to the same actions, and the
headroomfield name is unchanged.
Test
- A new test in
test/subscriptions.test.tsassertsclass="headroomis absent and that the form action, therow-fieldsform and theheadroominput are present. - The existing tests at lines 606–664 and
test/settings-visible.test.ts:120pass unchanged.
To try it, open /settings/subscriptions as an admin with a subscription added, then narrow the window to 390 px.
🤖 Generated with Claude Code
Approved. Both forms are now §5 .row-fields, the card takes setting-list so rows wrap under 640px, the number input keeps its 5em width through a selector on existing classes, and the test would fail without the change. The preview answers 303 to a guest on /settings/subscriptions, so I could not see the admin view. I judged the wrapping from the CSS only.
Next, in order:
- Delete the now-dead
.headroomrules (src/web/style/content.ts:272-278) and the.headroomentry in docs/DESIGN.md §5d (line 397), in a follow-up pull. - Check the 390px layout once as an admin: the label, the 5em input and the Keep/Set button should wrap cleanly, and the second form should not leave a lone orphaned button.
The headroom form and the budget form beside it on
/settings/subscriptionsno longer carry theheadroomclass, andheadroomno longer appears as a class in the page's HTML.bun x tsc --noEmitandbun scripts/design-lint.tsare clean.bun test test/subscriptions.test.ts test/settings-visible.test.ts test/design-lint.test.tspasses, 37 tests. I had no browser, so the 5em width and the 390 px wrapping are untested.§5 classes used
.row-fields(flex, wraps, gap 8px)..inputandbtn(... size: "sm").extra: "setting-list"..setting-list .rowand.setting-list .row-trailin components.ts give the wrap at 640 px and below, so the row-trail drops under the text. That replaces.row:has(.headroom).The 5em input width
.inputiswidth: 100%. I added one rule in components.ts,.row-fields .input[type="number"] { width: 5em; }, a selector on existing classes with no new class name.Left alone
docs/DESIGN.mdis untouched..headroomrules incontent.ts(lines ~272–278) are still there, as asked. They match nothing now and can go in a later pull.headroomclass.headroomfield name is unchanged.Test
test/subscriptions.test.tsassertsclass="headroomis absent and that the form action, therow-fieldsform and theheadroominput are present.test/settings-visible.test.ts:120pass unchanged.To try it, open
/settings/subscriptionsas an admin with a subscription added, then narrow the window to 390 px.🤖 Generated with Claude Code
Closes #4404