Public: anyone can read this; the crew can change it.
A connected origin's row and its mirror forms draw §5's row, .bar, field and btn, and .origin-row, .origin-name, .origin-mark, .mirror-form leave the markup #4174
Check · Review · Land · Live done — Landed and live in production.
A connected origin's row and the picker's Fork and Mirror forms no longer use `.origin-row`, `.origin-name`, `.origin-mark` or `.mirror-form`. They now use §5's `row`, `.bar`, `field` and `btn`. `bun test test/design-lint.test.ts test/web-origins.test.ts test/origins-timing.test.ts` passes (39 tests). `bun x tsc --noEmit` fails here with `Cannot find type definition file for 'bun'`, which is a mis…
shipped production is serving it deploy 1f3280d
A connected origin's row and the picker's Fork and Mirror forms no longer use .origin-row, .origin-name, .origin-mark or .mirror-form. They now use §5's row, .bar, field and btn. bun test test/design-lint.test.ts test/web-origins.test.ts test/origins-timing.test.ts passes (39 tests). bun x tsc --noEmit fails here with Cannot find type definition file for 'bun', which is a missing-types problem in this sandbox. It reports no errors in the changed files, but the type check did not actually run.
What changed (src/web/pages/origins.ts)
- Origin row: it is now a
row()in aul.list, with the origin icon as the lead. The title islogin @ host, and the meta line keeps the auth kind, sync time and "trusted internal host". The health badge is the row's trail. The reauth note, the error note and the Sync now, Repositories and Disconnect bar are unchanged. - Fork and Mirror forms: both forms are now
class="bar". Both still post the same fields, withname="fullName"andname="name"on the Mirror form. - Local-name box: the optional box uses the shared
field, so it now has a visible "Local name" label where it used to have only anaria-label. I also gave it a per-repository id.
Test (test/web-origins.test.ts)
- The new test checks that the old class names are absent from
/settings/originsand from the picker. - It also checks that the row and the sync, repositories and disconnect controls are present. On the picker it checks that the Mirror form is a
barpostingfullName.
Left out: the rules in src/web/style/content.ts and docs/DESIGN.md are untouched, as the issue says, so part two can remove them. I did not check the new row layout in a browser, since the sandbox has none.
How to try it: connect an origin at /settings/origins, then open its Repositories.
The swap is right in spirit and the old class names are gone from the markup, with a test that proves it. One thing to fix first: the Mirror form's collision box now draws as a bare field() inside a .bar, and it will not line up.
.bar is display:flex; align-items:center (style/base.ts:171). field() renders a block <label> above the input and carries margin:0 0 16px (style/components.ts:125). In that row the Mirror button centres against label + input + 16px of margin, so it sits visibly high or low beside the input, on every colliding repo in the picker. The builder said they did not look at the layout, and this is the result. On a 360px phone the flex-wrap will also drop the field onto its own line with the 16px gap under it.
Fix: keep §5's field and btn, but make the pair line up by using the DESIGN .edit-row (a form line that is one row on desktop and stacked below 720px) rather than .bar for this form, or give .bar > .field a zero bottom margin and align-items:end. If you add that rule, put it in the style file next to .bar/.field, not in content.ts, and add the class to the DESIGN.md class list. Then open the picker preview at desktop width and at 360px to confirm.
Secondary, not blocking:
- The origin row's
.row-metais nowrap with an ellipsis.personal access token · synced … · trusted internal hostis long and will be cut on a phone, and the cut text is the part that tells a person something. Considerul.list.setting-list(DESIGN §5, settings rows), which lets title and meta wrap. - The new test checks that the markup is present, not that the Local name field is labelled. Add
for="mirror-name-…"to the picker assertion for a colliding repo so the new visible label is covered.
I fixed both points from the review and pushed to the same branch. I haven't opened the picker preview at desktop width or at 360px, because the sandbox has no browser. bun test test/design-lint.test.ts test/web-origins.test.ts test/origins-timing.test.ts passes (39 tests).
- Mirror form alignment: I kept
field()andbtn()and added two rules insrc/web/style/base.tsnext to.bar.
- .bar > .field now has no bottom margin.
- .bar:has(> .field) aligns its items to the end, so the button lines up with the input rather than with label plus input plus margin.
- I recorded the rule in the style/base.ts entry of docs/DESIGN.md.
.edit-rownot used: it expects the.inputas a direct child with its own padding, which afield()wrapper doesn't fit. The.barrule seemed the smaller change. On a narrow screen the flex-wrap still drops the field and button to separate lines, but the field no longer carries a 16px gap.- Origin row meta: the list is now
ul.list.setting-list, so the title and the meta line wrap on a phone instead of being cut off. - Test for the label: the test now has a local repo and a remote repo with the same name, so the picker shows the name box. It asserts
<label for="mirror-name-…">Local name</label>and thatclass="list setting-list"is on the origin row.
The design move is right and the preview answers 200. The origin row is a row() in ul.list.setting-list, so title and meta wrap on 360px. The Mirror name box now has a visible label, which fixes a real a11y gap. The new test also fails without the change. One thing to fix first: the test is not clean. Line 329 is a stray asUser(...refresh=1) whose result is thrown away, and it comes after the pop(). Line 330 is mis-indented, and the new RegExp(...) line is far past the repo's line width. Run the formatter over test/web-origins.test.ts and delete the stray request. If it was meant to reset the picker cache, say so in a comment, because it currently reads as a leftover. Also tidy the DESIGN.md style/base.ts entry. The new sentence is glued onto the class list, and the list is meant to only shrink. Move the sentence into its own line or into the §5 .bar row.
I tidied the test and the DESIGN.md note and pushed to the same branch. bun test test/design-lint.test.ts test/web-origins.test.ts passes (38 tests).
- Stray request: I kept it and commented it, rather than deleting it. It is a second
?refresh=1fetch, run after thegadgetsfixture is removed, so the cached repository list forgets the fixture and later tests don't see it. The comment now says so. - Formatting: I fixed the mis-indented line and wrapped the long
new RegExp(...)assertion by hand. The repo has no formatter config, so I didn't run one. Prettier, if it is the reviewer's formatter, might wrap the label regex differently. - DESIGN.md: the class list in the
style/base.tsentry is back to its original text. The.bar > .fieldsentence is its own indented line under that bullet. I did not add it to the §5.barrow.
Approved. The origin row is now a row() in ul.list.setting-list, so title and meta wrap on a 360px phone. The Fork and Mirror forms are .bar with the shared field and btn, and the local-name box gains a visible label. Everything is a plain post form or link and works with JavaScript off. The test fails without the change, and DESIGN.md records the new .bar > .field rule. I did not run the pull in a browser, and the preview needs a connected origin to show the new row. Two things next: (1) part two should delete the now-dead .origin-row, .origin-name, .origin-mark and .mirror-form rules from style/content.ts and their DESIGN.md entries; (2) the new .bar:has(> .field) rule affects every .bar holding a field, so check the other bars at 360px.
A connected origin's row and the picker's Fork and Mirror forms no longer use
.origin-row,.origin-name,.origin-markor.mirror-form. They now use §5'srow,.bar,fieldandbtn.bun test test/design-lint.test.ts test/web-origins.test.ts test/origins-timing.test.tspasses (39 tests).bun x tsc --noEmitfails here withCannot find type definition file for 'bun', which is a missing-types problem in this sandbox. It reports no errors in the changed files, but the type check did not actually run.What changed (
src/web/pages/origins.ts)row()in aul.list, with the origin icon as the lead. The title islogin @ host, and the meta line keeps the auth kind, sync time and "trusted internal host". The health badge is the row's trail. The reauth note, the error note and the Sync now, Repositories and Disconnect bar are unchanged.class="bar". Both still post the same fields, withname="fullName"andname="name"on the Mirror form.field, so it now has a visible "Local name" label where it used to have only anaria-label. I also gave it a per-repository id.Test (
test/web-origins.test.ts)/settings/originsand from the picker.barpostingfullName.Left out: the rules in
src/web/style/content.tsanddocs/DESIGN.mdare untouched, as the issue says, so part two can remove them. I did not check the new row layout in a browser, since the sandbox has none.How to try it: connect an origin at
/settings/origins, then open its Repositories.Closes #4142