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

One People page at /settings/people: Invite on top, a person is one row of what they can do, each with Remove #18514

opened this

Merged 1h 24m ago, live in production

/settings/people is now the one People page, and /settings/accounts redirects to it. It is pushed, but the check hasn't run yet. tsc is clean, the gate has 0 failures, and the tests I ran pass.

Notes

opened this

/settings/people is now the one People page, and /settings/accounts redirects to it. It is pushed, but the check hasn't run yet. tsc is clean, the gate has 0 failures, and the tests I ran pass. I did not run the whole suite. That is 367 tests across the people, accounts, invite, tui, boot and dead-code files, plus the first-view budget tests and the design, route-mark and guide tests.

What changed

  • Invite on top. The form is the existing mint, with a hidden back that only accepts /settings/people. Each invite is a row showing waiting, used (by whom and when), expired or taken back.
  • Send again and Revoke. Send again makes a fresh link with the same bundle and organization and takes the old one back. Revoke moves to /settings/people/invites/:id/revoke.
  • Mail. One line says whether this forge can send mail, and the waiting-requests, no-owner and edge-only cards sit under the form.
  • A person is one list. The head row has the role, last seen, apps, and how the account was proved and by whom. Below it is one row per grant from everyGrant.
  • Remove. Remove is a form that posts in place and redraws the person's block from /settings/people/row/:name.
    • It is asked through may("forge.administer") in take_away.ts.
    • It can remove membership, the model allowance, the telemetry grant and an app membership.
    • Other lines link to where they are changed.
    • Owners and crew members are refused, so the last owner can never be removed.
  • Deleted. The accounts list page, personRow and the Accounts menu entry are gone. Name search moved to People as ?q=. The per-person page (/settings/accounts/:name, with suspend, verify and remove-account) stays and is linked from each row as Manage. Redirects and links that pointed at the old list now point at People.
  • Terminal. The People screen gets x to take one thing away (member, model_grant or telemetry_grant). An app a person was let into is removed on the page only. The how-to is docs/features/people.md.
  • Tests. The new test/people-page.test.ts covers rows, Remove in place and without script, the last owner and non-admin refusals, escaping, the redirect, the mail line, invite states, Send again and the form's back. I rewrote the older accounts and people tests to point at the new page.

Not done

  • Invite link in the row. The forge stores only a token's hash, so an invite row cannot show a link to copy. The link is shown once, right after it is made, in the flash. Send again is how you get another one.
  • Grant lines. Grants outside the four above (team, crew team, secrets and the rest) link out instead of getting a Remove.
  • Not verified.
    • I did not try the page on a preview, and the Chromium phone measurement in people-fit is skipped where no Chromium starts.
    • The gate flags two near-duplicates, inviteTakeBack against inviteRevoke and takeAct against knobSet, and I kept both.
[
  {"go": "/settings/people", "look": "Invite form is the first block, then the mail line, then Who is here", "expect": "Invite is above everything else; the mail line says whether this forge can send mail"},
  {"go": "/settings/people", "look": "Make an invite link, then look at the invite rows", "expect": "The link is shown once in the flash; the row says waiting, with Send again and Revoke"},
  {"go": "/settings/people", "look": "A member's block: one row per thing they can do", "expect": "Each removable line has Remove; an owner's block has none"},
  {"go": "/settings/people", "look": "Press Remove on a model allowance line", "expect": "The line disappears without a reload or a scroll jump", "ask": "Does the focus stay where you left it?"},
  {"go": "/settings/accounts", "look": "Where the browser lands", "expect": "Redirected to /settings/people"}
]

Closes #18476

6 earlier comments
commented

/settings/people is now the one People page, and /settings/accounts redirects to it. It is pushed, but the check hasn't run yet. tsc is clean, the gate has 0 failures, and the tests I ran pass. I did not run the whole suite. That is 367 tests across the people, accounts, invite, tui, boot and dead-code files, plus the first-view budget tests and the design, route-mark and guide tests.

What changed

  • Invite on top. The form is the existing mint, with a hidden back that only accepts /settings/people. Each invite is a row showing waiting, used (by whom and when), expired or taken back.
  • Send again and Revoke. Send again makes a fresh link with the same bundle and organization and takes the old one back. Revoke moves to /settings/people/invites/:id/revoke.
  • Mail. One line says whether this forge can send mail, and the waiting-requests, no-owner and edge-only cards sit under the form.
  • A person is one list. The head row has the role, last seen, apps, and how the account was proved and by whom. Below it is one row per grant from everyGrant.
  • Remove. Remove is a form that posts in place and redraws the person's block from /settings/people/row/:name.
    • It is asked through may("forge.administer") in take_away.ts.
    • It can remove membership, the model allowance, the telemetry grant and an app membership.
    • Other lines link to where they are changed.
    • Owners and crew members are refused, so the last owner can never be removed.
  • Deleted. The accounts list page, personRow and the Accounts menu entry are gone. Name search moved to People as ?q=. The per-person page (/settings/accounts/:name, with suspend, verify and remove-account) stays and is linked from each row as Manage. Redirects and links that pointed at the old list now point at People.
  • Terminal. The People screen gets x to take one thing away (member, model_grant or telemetry_grant). An app a person was let into is removed on the page only. The how-to is docs/features/people.md.
  • Tests. The new test/people-page.test.ts covers rows, Remove in place and without script, the last owner and non-admin refusals, escaping, the redirect, the mail line, invite states, Send again and the form's back. I rewrote the older accounts and people tests to point at the new page.

Not done

  • Invite link in the row. The forge stores only a token's hash, so an invite row cannot show a link to copy. The link is shown once, right after it is made, in the flash. Send again is how you get another one.
  • Grant lines. Grants outside the four above (team, crew team, secrets and the rest) link out instead of getting a Remove.
  • Not verified.
    • I did not try the page on a preview, and the Chromium phone measurement in people-fit is skipped where no Chromium starts.
    • The gate flags two near-duplicates, inviteTakeBack against inviteRevoke and takeAct against knobSet, and I kept both.
[
  {"go": "/settings/people", "look": "Invite form is the first block, then the mail line, then Who is here", "expect": "Invite is above everything else; the mail line says whether this forge can send mail"},
  {"go": "/settings/people", "look": "Make an invite link, then look at the invite rows", "expect": "The link is shown once in the flash; the row says waiting, with Send again and Revoke"},
  {"go": "/settings/people", "look": "A member's block: one row per thing they can do", "expect": "Each removable line has Remove; an owner's block has none"},
  {"go": "/settings/people", "look": "Press Remove on a model allowance line", "expect": "The line disappears without a reload or a scroll jump", "ask": "Does the focus stay where you left it?"},
  {"go": "/settings/accounts", "look": "Where the browser lands", "expect": "Redirected to /settings/people"}
]
commented

I fixed the three failing rule tests and pushed the fix to the same branch. The forge hasn't re-run its check yet. Locally those three tests pass, along with the behaviors, people-page and people-fit tests. tsc is clean and the gate reports 0 failures.

  • Own script: people.ts set its own scriptJs, which the behaviors rule refuses. It now composes behaviorsJs beside inPlaceJs.
  • Event audience: grant.removed (emitted by Remove in take_away.ts) was unclassified. It is now admins in src/core/event_audience.ts.
  • Unfixtured route: the new GET /settings/people/row/:username fragment has no test fixture, so it is listed in test/budgets/unfixtured/settings-people-row-username.json.

The earlier description of what changed, what I left out and how to try it still stands.

commented

The nine failing tests were all the old /settings/accounts page still being asserted after it became a redirect to /settings/people. I fixed them, and one of the failures also exposed a real gap in the new page.

I ran the affected suites locally and they pass: 48 tests across the sweep, own-session, request-access, org-owners, no-mail, sole-owner, keys-accounts, keys-people-list, people-page and accounts-rows files. tsc is clean. I did not run the full suite; the forge runs that on the push.

  • Fix in the code: the new People page dropped the "only owner of <org>" note from a person's line. The "Not removed" message still sends people to look for it, so I put it back in src/web/pages/people.ts.
  • Tests that were wrong: they now read /settings/people and its new wording ("Email not proved", the #people section, rows counted by data-nav). I dropped the "acme: no active owner" badge assertion because the new page has no such badge. The "has no active owner" card and the Owners link are still asserted. The server-timing sweep now lists /settings/accounts as a known redirect.
  • Gate: bun scripts/gate.ts still prints four "one implementation?" similarity notes. I read them as advisory, since they came with a took line and no failure, but I did not confirm that. The notes are on inviteTakeBack and the helpers in test/people-page.test.ts. I left them as they are.

The fix is pushed to the pull; the forge's check will run again on it.

commented

One People page at /settings/people: Invite on top, then one row per person with a line for each thing they can do, each with Remove in place. /settings/accounts redirects to it. This push meets most of @sentinel's review; point 6 and the dedupe notes in point 7 are not changed. I ran the 318 test files that touch people, invites, accounts, settings, sessions and the shared form code. Everything passes except test files I didn't run: /settings/people/row/:username is now a fixture, tsc is clean, and the four checks the forge named pass locally (duplicate-import, both budgets, dead code).

Review points

  1. Link on the row. A waiting invite now shows its link to copy.
    • Storage: the token is kept sealed under the forge's key in a new column, invite.token_sealed. It is cleared when the invite is used or taken back, and only an admin can read it.
    • Unchanged: signup is still found by the hash, and listInvites still never returns a token.
    • Send again: it is offered only on expired or taken-back invites.
    • Migration: 20261206110000-invite-sealed-link, pinned.
  2. Terminal.
    • People x: it now takes an app, as x ada app notes.
    • Invite links c and n: c shows a waiting link and n is Send again. Send again is one action, again, used by both web and terminal.
    • Docs: docs/features/people.md describes all of it.
  3. Quiet page. One explanatory sentence. The mail line shows only when mail cannot be sent, and the "all accounts can sign in" line is gone when all is well. I took this as the review's call over the issue's "mail said plainly"; say if you want the always-on line back.
  4. Layout.
    • Structure: one list, with each person a row.
    • Proof: the facts are a dl, one entry per thing proved.
    • Role: shown as a badge.
    • Lines: a person's lines sit nested under the row.
    • Guests: the Make member form is now a nested line.
    • Not checked: I have not looked at the nested lines in a browser, so whether hairlines still show between them is unchecked.
  5. Speed. The page reads accounts, apps made, Minecraft names, sole-owned organizations and grants once each. The /settings/people/row/:username fragment reads only that person's accounts, apps, names and grants, but still lists everyone's sole-owned organizations. The page costs 45 statements and the fragment 10 in the budget walk. I did not time the page with a few hundred accounts.
  6. Audit actor: removeGrant now takes the acting admin's id and passes it to setMember. That call ignores the actor when removing a membership, because it only deletes the row. The grant.removed event already records who did it, so no test can tell the two apart.
  7. Leftovers.
    • Renamed: the accounts.ts shell and its back button now say People.
    • Folded: the admin-form preamble into adminForm, shared by takeAct, knobSet and roleAct, and inviteTakeBack into inviteRevoke.
    • Fixture: the unfixtured JSON is now a fixture in pages-budget.
    • Left: the gate still prints its duplicate-function notes for appLetInto and wayBackForms. They are advisory, and I left them.
  8. Tests. The new test/people-take-door.test.ts covers the terminal x (refusing an owner, the success toast, an app line) and c/n. people-page.test.ts gains tests for the invite link and for Remove on an app_member line.

Test changes

  • AccountRow gains id, email and provenAt: the single-person page read needs them.
  • Existing tests updated for the new markup: people-fit, people-apps-made and accounts-timing. In accounts-timing the timing phase is now facts, not grants. invites-core gains the new migration.
commented

The multiline-rows check now passes locally, and I've pushed the fix. The forge's check will run again on this push.

The check failed because src/web/pages/people.ts and src/web/pages/people_invites.ts draw rows with facts, the proof line per person and the link on a waiting invite. The check wants those listed under their route or folded behind a detail. I listed both under /settings/people in scripts/multiline-rows.json. All 7 tests in test/multiline-rows.test.ts pass.

I listed them rather than folding the detail. A folded row can't carry facts, and reviewers asked for the proof facts as a dl and for the invite link on its row. The list is meant only to shrink, and this adds an entry. Folding the facts behind a click would take the listing back out, but the proof line and invite link would no longer show until opened.

commented

I merged main into the branch and pushed it, so it should merge cleanly again. tsc --noEmit is clean and 268 of the 268 People and invite tests I ran pass. I did not run the full suite, so the forge's check on this push is the first full run. The gate's --fix only rewrapped one comment, and I committed that. Its remaining notes are "one implementation?" similarity hints on test helpers in people-page.test.ts and people-take-door.test.ts, which I left alone.

main had removed the invite expiry "days" option. Three files conflicted, and I kept both sides' intent:

  • src/actions/invites.ts: it takes main's mint, which no longer takes days. It keeps this pull's sealed copy of a waiting invite's link. again ("Send again") no longer works out days, so a re-sent invite gets whatever expiry main now gives.
  • src/core/invites.ts: the header comment now says both things: the sealed admin copy, and that an open invite lets a stranger in in every signup mode.
  • src/web/pages/admin-limits.ts: the handler uses main's mintRefusal and drops the days validation. It keeps back, so a mint from /settings/people returns there, and any other back value falls back to /admin/limits.

Because days is gone on main, I also took the "expires in (days)" field out of the Invite form on the People page. I updated people-page.test.ts and people-take-door.test.ts to match, with no days argument to mint and no days in the posted form.

commented

I changed the People page CSS so rows wrap at 390px, but I couldn't confirm the fix. Chromium doesn't start in my sandbox, so the 390x844 measurement test was skipped, and I wrote the fix from reading the CSS. The forge's check is the real test of it.

The check failed because a .row-title on /settings/people measured at least the full 390px viewport. The People rows inherited the global nowrap and clipped titles, and a row's acts sat on one line with its text. The new [data-people] rules in src/web/style/content.ts fix that:

  • Rows: a row may wrap, and its title and meta text wrap instead of clipping.
  • Acts: the form beside a row wraps or drops under the text.
  • Facts: the proof facts wrap too.

These match how .setting-list and [data-forges] already handle it.

Checks I ran locally:

  • bun test test/people-fit.test.ts passes, with the Chromium measurement skipped.
  • The first-view budget and duplicate-import tests pass.
  • bun x tsc --noEmit is clean.
  • bun scripts/design-lint.ts reports nothing new.
  • bun scripts/gate.ts --fix changed nothing, but it printed similarity notes for four test files, which I left alone. Three are the people-take-door helpers seed, boot and press. The fourth is block in people-page.test.ts.

The change is CSS only, so there is no new page, action or API route, and no terminal side or how-to is needed. I added no dependency and no outside host.

[{"go":"/settings/people at 390px wide","look":"The long unbroken username and the long hyphenated one","expect":"Both wrap inside their rows, the page doesn't scroll sideways, and Remove and Make member sit under the text when they don't fit"}]

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs