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

Settings › Trusted speaks the home page's language #9796

Merged opened this

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

Merged

Settings › Trusted (`trustedPage()` in `src/web/pages/trusted.ts`) is now laid out like the home page and Settings › Backups (#9754): headings over rows, no boxed cards. Only the markup changed. Who may act, the routes, the same-origin checks and the fields each form posts are all the same.

shipped production is serving it deploy a5a2512

opened this

Settings › Trusted (trustedPage() in src/web/pages/trusted.ts) is now laid out like the home page and Settings › Backups (#9754): headings over rows, no boxed cards. Only the markup changed. Who may act, the routes, the same-origin checks and the fields each form posts are all the same.

  • Sections: the three card(...) blocks are now <section class="settings-block"> with an <h2> each: Fold-in, Trusted sources, Trust a source. The card import is removed.
  • Entries: each trusted source is a row() in <ul class="list setting-list" id="trusted-list">. Its state is a badge in the title: Trusted (with a check icon), Ends soon or Lapsed. The data-state colour is extra, never the only signal. The ", ends soon" text moved from the meta line into the badge. Remove and Revert landings stay in the row's trail as .row-fields forms.
  • Empty list: instead of a list with one muted item, one plain sentence says that with no one trusted every pull waits for review, and what trusting a source does.
  • Kill switch: the "Folding in is stopped" badge now also carries the lock icon that used to sit in the card's heading.
  • Test: a new test in test/trusted-sources.test.ts (#9792) renders the page as an admin. It checks for the three <h2>s inside settings blocks, no card/card-head/card-body, the first entry being a row with a badge, and all four form actions. It fails on main and passes here. The existing tests were not changed.
  • Docs: docs/design/areas/settings.md records the shape. No new component class.

Checks: bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean. scripts/fast.ts named 1220 test files, too many to run here, so I ran the 24 files covering this page and the design docs: test/trusted-, follow-sources, tui-trusted, settings- and design*. All 190 tests pass. The forge's check runs the full suite on push.

The keep_plan tool the issue asks for was not available in this run, so no plan was posted on the issue.

To try it: as an admin, open /settings/trusted on the preview. Add a source, check its badge, then try Remove, Revert landings and Stop/Resume folding in.

🤖 Generated with Claude Code

Closes #9792

commented

Settings › Trusted (trustedPage() in src/web/pages/trusted.ts) is now laid out like the home page and Settings › Backups (#9754): headings over rows, no boxed cards. Only the markup changed. Who may act, the routes, the same-origin checks and the fields each form posts are all the same.

  • Sections: the three card(...) blocks are now <section class="settings-block"> with an <h2> each: Fold-in, Trusted sources, Trust a source. The card import is removed.
  • Entries: each trusted source is a row() in <ul class="list setting-list" id="trusted-list">. Its state is a badge in the title: Trusted (with a check icon), Ends soon or Lapsed. The data-state colour is extra, never the only signal. The ", ends soon" text moved from the meta line into the badge. Remove and Revert landings stay in the row's trail as .row-fields forms.
  • Empty list: instead of a list with one muted item, one plain sentence says that with no one trusted every pull waits for review, and what trusting a source does.
  • Kill switch: the "Folding in is stopped" badge now also carries the lock icon that used to sit in the card's heading.
  • Test: a new test in test/trusted-sources.test.ts (#9792) renders the page as an admin. It checks for the three <h2>s inside settings blocks, no card/card-head/card-body, the first entry being a row with a badge, and all four form actions. It fails on main and passes here. The existing tests were not changed.
  • Docs: docs/design/areas/settings.md records the shape. No new component class.

Checks: bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean. scripts/fast.ts named 1220 test files, too many to run here, so I ran the 24 files covering this page and the design docs: test/trusted-, follow-sources, tui-trusted, settings- and design*. All 190 tests pass. The forge's check runs the full suite on push.

The keep_plan tool the issue asks for was not available in this run, so no plan was posted on the issue.

To try it: as an admin, open /settings/trusted on the preview. Add a source, check its badge, then try Remove, Revert landings and Stop/Resume folding in.

🤖 Generated with Claude Code

commented

Settings › Trusted (trustedPage() in src/web/pages/trusted.ts) is now laid out like the home page and Settings › Backups (#9754): headings over rows, no boxed cards. Only the markup changed. Who may act, the routes, the same-origin checks and the fields each form posts are all the same.

  • Sections: the three card(...) blocks are now <section class="settings-block"> with an <h2> each: Fold-in, Trusted sources, Trust a source.
  • Entries: each trusted source is a row() in <ul class="list setting-list" id="trusted-list">. Its state is a badge in the title: Trusted (with a check icon), Ends soon or Lapsed. The data-state colour is extra, never the only signal. The ", ends soon" text moved from the meta line into the badge. Remove and Revert landings stay in the row's trail as .row-fields forms.
  • Empty list: instead of a list with one muted item, one plain sentence says that with no one trusted every pull waits for review, and what trusting a source does.
  • Kill switch: the "Folding in is stopped" badge now also carries the lock icon that used to sit in the card's heading.
  • Test: a new test in test/trusted-sources.test.ts (#9792) renders the page as an admin. It checks for the three <h2>s inside settings blocks, no card/card-head/card-body, the first entry being a row with a badge, and all four form actions. It fails on main and passes here. The existing tests were not changed.
  • Docs: docs/design/areas/settings.md records the shape. No new component class.
  • Gate fix: the first push failed the gate rule asking for a Try: line in a commit message. Force pushes are refused, so a second, empty commit adds that line instead of rewriting the first.

Checks: bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean. scripts/fast.ts named 1220 test files, too many to run here, so I ran the 24 files covering this page and the design docs. All 190 tests pass. Since the gate fix only adds an empty commit, I re-ran just the gate (it passes against main) and test/trusted-sources.test.ts (32 pass). The forge's check runs the full suite on push.

The keep_plan tool the issue asks for was not available in this run, so no plan was posted on the issue.

Try: sign in as an admin and open /settings/trusted on the preview. Trust a source, check its row and badge under "Trusted sources", then try Remove, Revert landings and Stop/Resume folding in.

🤖 Generated with Claude Code

Changes requested — before the latest push

The layout follows the home page well: three settings-blocks with h2s, rows in a .list, state as a badge with text, same routes, no card, no new component class. Two things to fix. First: the empty state is two sentences and repeats the Fold-in paragraph above it (issue box 1 asks for one plain sentence; principle 1: nothing explains itself twice). Second: the new test only checks the first entry as Trusted, so the new Lapsed and Ends soon badges, the state data attribute and the empty-state sentence have no test that would fail without them. Fix both in one round. I could not view the signed-in page on the preview with a bare token, so I judged markup from the diff.

commented

Settings › Trusted (trustedPage() in src/web/pages/trusted.ts) is now laid out like the home page and Settings › Backups (#9754): headings over rows, no boxed cards. Only the markup changed. Who may act, the routes, the same-origin checks and the fields each form posts are all the same.

  • Sections: Fold-in, Trusted sources and Trust a source are each a <section class="settings-block"> with an <h2>, in place of the three card(...) blocks.
  • Entries: each trusted source is a row() in <ul class="list setting-list" id="trusted-list">. Its state is a badge in the title, each with a glyph: Trusted with a check, Ends soon with a clock, Lapsed with a ban. The row's data-state is open, or draft once lapsed; the colour is extra, never the only signal. Remove and Revert landings stay in the row's trail as .row-fields forms.
  • Empty list: one sentence: "No one is trusted, so every pull waits for review."
  • Docs: docs/design/areas/settings.md records the shape. No new component class.

Since the review:

  • The empty state is cut to that one sentence; the second sentence repeated the Fold-in paragraph.
  • Ends soon and Lapsed now carry a glyph like Trusted does.
  • Two new tests in test/trusted-sources.test.ts, on top of the earlier one:

- Lapsed and ending soon: writes a lapsed entry and one ending within the warning window straight to the table, because the add action refuses a past date. It checks each row's badge, glyph and data-state, plus the Trusted row. - Empty: a fresh forge with no entries shows the sentence and no #trusted-list.

All three tests fail against both main and the previous push of this pull. They pass now.

Checks: bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts are clean. I ran the test files covering this page and the design docs (test/trusted-, follow-sources, tui-trusted, design): 133 tests pass. The full suite was too broad to run here; the forge runs it on push.

Try: as an admin, open /settings/trusted on the preview. Trust a source and see its row and badge under "Trusted sources", then Remove it. Stop and resume folding in.

🤖 Generated with Claude Code

Approved

Clean. Three settings-blocks with h2s, entries as row()s in a .list with a glyph+text badge (check, clock, ban), one-sentence empty state, same routes and forms, no new component class, design notes recorded. Juniper's two findings are fixed, and the lapsed, ends-soon and empty cases now have tests. The change is markup only: no auth, input or output-escaping surface moved, and the TUI screen is untouched.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs