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

Settings › Accounts, who is on the forge, speaks the home page's language #9882

Merged opened this

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

Merged

Settings › Accounts now has no `card(` left in `accounts.ts`. The `test/accounts*.test.ts` files pass, `bun x tsc --noEmit` is clean and `design-lint` is clean. I did not run the full suite; the forge's check does that on the push.

shipped production is serving it deploy 9e8c29c

opened this

Settings › Accounts now has no card( left in accounts.ts. The test/accounts*.test.ts files pass, bun x tsc --noEmit is clean and design-lint is clean. I did not run the full suite; the forge's check does that on the push.

  • Already on main: the accounts list was already a <section class="settings-block" id="accounts"> with rows in .list, so the new list assertions pass on main today and do not show the page changed. Only the sign-ins sub-page, /settings/accounts/:username, still used card().
  • Changed: I replaced that card() with a settings-block (id="tokens") holding an <h2>, a muted note, an <h3> for access tokens, and the tokens as row() items in .list setting-list. The Revoke confirm is unchanged, and I dropped the card import. No new class.
  • Confirms and 404: Suspend and Remove still go through /-/confirm, and a non-admin still gets the forge's one 404. test/accounts-language.test.ts asserts both.
  • Still boxed: the grant and sessions sections on the sign-ins page (grantCard and sessionsCard) are defined in model.ts and account.ts, outside this issue's files. They still render as cards, so the sign-ins page is not fully card-free.
  • Other tests: test/accounts-language.test.ts is new. It covers the list (the settings-block, no class="card, the suspend confirm link), the sign-ins block, the non-admin 404, and that accounts.ts holds no card(. No existing test was changed, and accounts-rows.test.ts passes as is.
  • Doc: I added a one-line entry for Accounts to docs/design/areas/settings.md.

To try it, sign in as an admin and open /settings/accounts, then click Sign-ins on a row.

Closes #9870

commented

Settings › Accounts now has no card( left in accounts.ts. The test/accounts*.test.ts files pass, bun x tsc --noEmit is clean and design-lint is clean. I did not run the full suite; the forge's check does that on the push.

  • Already on main: the accounts list was already a <section class="settings-block" id="accounts"> with rows in .list, so the new list assertions pass on main today and do not show the page changed. Only the sign-ins sub-page, /settings/accounts/:username, still used card().
  • Changed: I replaced that card() with a settings-block (id="tokens") holding an <h2>, a muted note, an <h3> for access tokens, and the tokens as row() items in .list setting-list. The Revoke confirm is unchanged, and I dropped the card import. No new class.
  • Confirms and 404: Suspend and Remove still go through /-/confirm, and a non-admin still gets the forge's one 404. test/accounts-language.test.ts asserts both.
  • Still boxed: the grant and sessions sections on the sign-ins page (grantCard and sessionsCard) are defined in model.ts and account.ts, outside this issue's files. They still render as cards, so the sign-ins page is not fully card-free.
  • Other tests: test/accounts-language.test.ts is new. It covers the list (the settings-block, no class="card, the suspend confirm link), the sign-ins block, the non-admin 404, and that accounts.ts holds no card(. No existing test was changed, and accounts-rows.test.ts passes as is.
  • Doc: I added a one-line entry for Accounts to docs/design/areas/settings.md.

To try it, sign in as an admin and open /settings/accounts, then click Sign-ins on a row.

commented

Settings › Accounts has no card( left in src/web/pages/accounts.ts. This push adds only the missing "Try:" line the check asked for. I haven't seen the check's verdict on it. The gate passes locally and the earlier tests, tsc and design-lint were green.

  • List: the accounts list was already a <section class="settings-block" id="accounts"> with rows in .list, so nothing changed there. Suspend and remove still go through /-/confirm, and a non-admin still gets the forge's one 404.
  • Sign-ins page: /settings/accounts/:username was the one remaining use of card(). It is now a settings-block with an <h2>, a muted note, an <h3> for access tokens, and the tokens as row() items. No new class.
  • Still boxed: the grant and sessions sections on that page (grantCard and sessionsCard) live in model.ts and account.ts, outside this issue's files, so they still render as cards. I left them.
  • Tests and doc: test/accounts-language.test.ts is new and covers the list, the sign-ins block, the non-admin 404 and that accounts.ts holds no card(. The list assertions already pass on main, so it only fails there on the sign-ins block. No existing test was changed. docs/design/areas/settings.md has a one-line entry.

To try it, sign in as an admin on the preview, open /settings/accounts, then click Sign-ins on a person's row.

commented

I merged main into this branch and pushed it, so the pull should merge cleanly again.

The only conflict was in docs/design/areas/settings.md. Both sides had added a paragraph at the same spot: mine for Settings › Accounts (#9870) and main's for Settings › General (#9853). I kept both paragraphs.

After the merge I ran bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts. I also ran the two tests that cover this change, test/accounts-language.test.ts and test/settings.test.ts (10 pass, 0 fail). I did not run the full suite; the forge's check does that on this push.

Nothing else about the pull changed. Settings › Accounts still drops its card: who is on the forge and a person's sign-ins page use plain sections, with no new component class. test/accounts-language.test.ts pins that.

To try it, open /settings and go to Accounts, or fetch the preview: curl -H "authorization: Bearer $FORGE_TOKEN" https://lab--9882--forge-trevato-apps.open-platform.sh.

Changes requested — before the latest push

The accounts list was already a settings-block on main, so the real change is the tokens block on /settings/accounts/:username. That block is good, but the same page still renders two cards, which is principles 6 and 7 (a box around a thing; rows over boxes). The test is also written to avoid that, so it never catches it. Fix first: make grantCard and sessionsCard on the sign-ins page settings-blocks too, then assert the whole page has no class="card. Keep any other callers of those two functions unchanged.

Two more changes:

  1. The first test's list assertions pass on main today, which breaks issue box 3. Either add the assertion that fails on main (the sign-ins page has no card) or drop the list test.
  2. Replace the source-grep test on accounts.ts with a behavioural assertion on the rendered pages.

The preview and screenshots show the design-system look is right where it was changed. Suspend/remove confirms and the non-admin 404 are intact and tested. The doc entry is fine and README is untouched.

commented

The sign-ins page /settings/accounts/:username now renders with no class="card, and I've pushed the fix.

  • Cards removed:

- grantCard in src/web/pages/model.ts is now two <section class="settings-block"> blocks, each with its <h2>, and the grant and ceiling forms keep their actions and ids. - ceilingCard gained an optional plain flag, which grantCard sets. The organization page calls ceilingCard without it and still gets its card, so that caller is unchanged.

  • Where I differ from your note: sessionsCard was already a settings-block with rows in .list setting-list, so I left it alone. The page's only cards were the grant form and the ceiling form.
  • Tests:

- The sign-ins test now asserts the whole page has no class="card. It also checks that the tokens block, the grant and ceiling forms and "Signed-in browsers" are still there, and that there are at least four settings-blocks. The no-card assertion would have failed before this change. - I dropped the accounts-list assertions that already passed on main, keeping only the suspend confirm link. - I removed the source-grep test on accounts.ts. - The non-admin 404 test stays.

  • Checks: tsc, scripts/gate.ts and design-lint are clean. The accounts-language, account-rows, model-grant, model-page-shape and accounts tests all pass (41 across the five model and accounts files, plus 3 in accounts-language and 8 across accounts-language and account-rows). One test run logged "Cannot use a closed database" from the checks push handler during teardown, and the tests still passed.
commented

I merged main into the branch again and pushed it, so the pull should merge cleanly.

The only conflict was in docs/design/areas/settings.md, where both sides had added entries at the same spot. I kept both and left the rest of the pull as it was.

After the merge, scripts/gate.ts, tsc --noEmit and design-lint were clean. I ran only test/accounts-language.test.ts and test/settings.test.ts, and both passed (9 tests). I did not run the full suite; the forge's check does that on this push.

Approved

The sign-ins page is now card-free and the preview answers. The grant and ceiling forms keep their actions and ids, and the org page still gets its card because plain defaults off. Two things to do next: (1) Non-blocking: settingsBlock plus the plain flag in model.ts is a small seam; once the org page moves off cards, drop the flag and the card path. (2) Non-blocking: the test asserts the list only for its confirm link; add a settings-block id="accounts" assertion so the list shape is pinned too. Box 3 is not met as written: it asks the test to GET the accounts page and assert no card and the settings-block, but the test asserts those only on the sign-ins page.

commented

Left #9870 open: 1 unticked item remain (A test (e.g. test/accounts-language.test.ts) GETs the page as an admin and asserts no class="card and the settings-block; it fails on main today.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs