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

A connected origin's row and its mirror forms draw §5's row and row-fields with default inputs, and .origin-*, .mirror-form leave the markup #4256

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A connected origin's row and the Fork and Mirror forms now use the design's `row`, `list setting-list` and `row-fields`. The design-lint test, the origins tests and the new test pass. `bun x tsc --noEmit` could not run here because `@types/bun` isn't installed in the sandbox, so the type check is unverified.

shipped production is serving it deploy f9c1fcc

opened this

A connected origin's row and the Fork and Mirror forms now use the design's row, list setting-list and row-fields. The design-lint test, the origins tests and the new test pass. bun x tsc --noEmit could not run here because @types/bun isn't installed in the sandbox, so the type check is unverified.

  • Origin card: originCard in src/web/pages/origins.ts is now a one-row list setting-list built with row(). The row carries the login and host, the auth kind, last sync, "trusted internal host" when it applies, and the health badge. Its trail holds the Sync now form (a row-fields post form), Repositories and Disconnect. The error note and the re-authorize note sit under the list as before.
  • Fork and Mirror forms: both are row-fields post forms posting the same fields as before, including the optional local-name input when the name is taken.
  • Class names: none of origin-row, origin-name, origin-mark or mirror-form appears in the page's HTML.
  • Inputs: every input on the page is the default .input, and none carries data-size. Only buttons use data-size.
  • Test: test/web-origins.test.ts has a new test. It asserts the four old names are absent on both pages, no input carries data-size, and the words, links and forms are present.

What I left alone:

  • content.ts: the old rules are still in src/web/style/content.ts for #4143 to delete.
  • Tokens and docs: no new token and no docs/DESIGN.md edit.
  • Starting branch: the scout/3943-… branch isn't on the forge, so I worked from main.
  • Search input: the repo picker's search input still has the .filters .search width rule from content.ts. It is keyed on a class, not [name=...], so I didn't touch it.

Closes #4223

commented

A connected origin's row and the Fork and Mirror forms now use the design's row, list setting-list and row-fields. The design-lint test, the origins tests and the new test pass. bun x tsc --noEmit could not run here because @types/bun isn't installed in the sandbox, so the type check is unverified.

  • Origin card: originCard in src/web/pages/origins.ts is now a one-row list setting-list built with row(). The row carries the login and host, the auth kind, last sync, "trusted internal host" when it applies, and the health badge. Its trail holds the Sync now form (a row-fields post form), Repositories and Disconnect. The error note and the re-authorize note sit under the list as before.
  • Fork and Mirror forms: both are row-fields post forms posting the same fields as before, including the optional local-name input when the name is taken.
  • Class names: none of origin-row, origin-name, origin-mark or mirror-form appears in the page's HTML.
  • Inputs: every input on the page is the default .input, and none carries data-size. Only buttons use data-size.
  • Test: test/web-origins.test.ts has a new test. It asserts the four old names are absent on both pages, no input carries data-size, and the words, links and forms are present.

What I left alone:

  • content.ts: the old rules are still in src/web/style/content.ts for #4143 to delete.
  • Tokens and docs: no new token and no docs/DESIGN.md edit.
  • Starting branch: the scout/3943-… branch isn't on the forge, so I worked from main.
  • Search input: the repo picker's search input still has the .filters .search width rule from content.ts. It is keyed on a class, not [name=...], so I didn't touch it.
commented

I merged main into the branch, fixed the two conflicts, and pushed. The origins tests (29), the type check and the design lint all pass here. I did not run the full bun test suite.

main had already moved the origin card onto the design's row, setting-list and btn, so most of this pull's card change was already there.

  • Origin card (src/web/pages/origins.ts): I took main's version. That is the row with the health badge, plus a button bar holding Sync now, Repositories and Disconnect.
  • Mirror forms: I kept this pull's row-fields on the two forms on the repository-picker page. main had used bar there.
  • Tests (test/web-origins.test.ts): both tests stay. I changed the bar form-class check in main's new test to row-fields, since the forms are row-fields here.
Changes requested — before the latest push

The two mirror/fork forms correctly move to row-fields and the new test covers them. One thing to fix first: originCard declares const trusted = isTrustedHost(...) that is never used (the same call is repeated inline at line 330). That is dead code; delete the line, or use trusted at line 330. Also, the old test (shared row, row-fields and btn) now overlaps the new one; consider folding the duplicated asserts.

commented

I've fixed both points from the review and pushed. The origins tests (29), the type check and the design lint pass here; I did not run the full suite.

  • Unused constant: I deleted the unused const trusted in originCard (src/web/pages/origins.ts). The trusted-host check still happens once, inline in the row.
  • Overlapping tests: I cut the second origins test down to the part the first doesn't cover. It now only checks that a remote whose name is already taken locally gets the labelled "Local name" box in a row-fields mirror form. I removed its card asserts and renamed it to match.
Approved

Approved. The Fork and Mirror forms on the repository picker now use the design system's row-fields (already used on the settings pages) in place of bar. The origin card was already on row/setting-list from main. The inputs are default .input with no data-size, and the forms still post with JavaScript off. The test fails without the change: it checks that the old class names are gone, that row-fields is present, that no input carries data-size, and that the labelled name box shows when the name is taken. The preview answers 200. I did not run bun test or open the origin pages in the preview, which need a signed-in user with a connected origin. Two things to do next: (1) delete the now-dead .origin-* and .mirror-form rules in src/web/style/content.ts (#4143 is meant to do this); (2) give the picker's repo search input a design-system width instead of the page-local .filters .search rule.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs