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

/people lists people as rows by last activity, with a plain word for each one's role #13086

Merged opened this

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

Merged

/settings/people now lists people most-recently-seen first. It has no before/after pictures at 390 and 1280 px, and I did not build the guest-facing /people list. The gate, bun x tsc --noEmit, bun scripts/design-lint.ts, bun test test/mcp-size.test.ts and the people tests all pass.

Notes

shipped production is serving it deploy 8e1361f

opened this

/settings/people now lists people most-recently-seen first. It has no before/after pictures at 390 and 1280 px, and I did not build the guest-facing /people list. The gate, bun x tsc --noEmit, bun scripts/design-lint.ts, bun test test/mcp-size.test.ts and the people tests all pass.

What changed

  • Rows: each row is a name, a plain role word (owner, member, guest or crew member) and last seen. An admin shows as owner, an agent as crew member, and no ids appear.
  • Last seen: it is the latest of a browser session's last request and an API token's last use, shown as "3h ago" with the exact time on hover. Anyone with neither shows "never" and sorts last, newest account first.
  • Filters: one line, everyone · owners · members · guests · crew, set by ?role=; an unknown value is ignored. The new src/core/people_rows.ts holds the query.
  • Kept: the per-person apps line, the "Make member" form with its starter allowance, "Make guest", and the role-limits note. Members and guests still say "no allowance" when they have none, because test/people-apps-made.test.ts checks it.
  • Terminal: the People screen now says owner where it said admin.
  • Tests: test/people-rows.test.ts covers the order, the words, the filter, and no ids on the page.

What I chose not to do

  • Pictures: the sandbox can't take screenshots, and /settings/people isn't in app.looks in forge.json, so the commit says No look:.
  • Guest privacy: the issue says "a guest sees only people they share an app with; keep that test", but I found no guest-facing /people list and no such test. The only list is the admin-only /settings/people, which stays 403 for non-admins (test/roles.test.ts). I left this alone.
  • MCP: no tool changes.

Try it: sign in as the owner on the preview and open /settings/people, then ?role=guest and ?role=crew.

🤖 Generated with Claude Code

Closes #13011

Show 1 earlier items

7 earlier comments · 2 events
commented

/settings/people now lists everyone as rows, most recently seen first. Each row has the name, a plain role word (owner, member, guest or crew member) and when they were last seen. A one-line filter narrows it with ?role=owner|member|guest|crew. The terminal People screen says "owner" for an admin, as the page does.

This push fixes two of the three failures:

  • First-view budget (test/attention.test.ts): the page had grown to 124 words and 23 blocks against a budget of 107 and 20. I removed the intro paragraph and heading, which only repeated the page title, and moved "seen …" into the small line under the name. The page now has 104 words and 19 blocks, so the budget file is unchanged.
  • Empty page (test/keys-people-list.test.ts): the old test hid an agent-flagged admin to get an empty list. Crew are now listed on purpose, so the page is no longer empty. I changed the test to request ?role=guest and expect "Nobody here.". The old assertion was wrong for the new behaviour.

The third failure, every instruction names a script or a tool that exists in test/deadends.test.ts, is red on main at fa9f985 as well, so I left it alone.

Checks run here: bun x tsc --noEmit, bun scripts/design-lint.ts, and 52 tests across the people and settings suites (the three people-page suites plus the seven related ones) — all passed. I did not run the full suite here. scripts/fast.ts named 2062 files for this diff, too many to run in the sandbox, so the forge's check covers the rest.

Not done: the before/after pictures at 390 and 1280 px, light and dark, that the issue asks for.

To try it, sign in as an admin and open /settings/people, then /settings/people?role=crew.

🤖 Generated with Claude Code

Changes requested — before the latest push

Round 1, all changes in one list:

  1. test/keys-people-list.test.ts is now vacuous: it still slices from "Guests, members and admins", a heading this pull removed, so indexOf is -1 and the data-nav assertion checks nothing. Anchor on data-people / id="people".
  2. Both doors: the terminal People screen only renames admin to owner. It has no last-seen ordering, no crew rows and no role filter, so the terminal does not match the page. Add the same ordering and filter to src/tui/screens/people.ts (from peopleByActivity) with a test, and add docs/features/people.md for the how-to.
  3. Design principle 1: the page lost its one confident sentence and now opens on a bare "Show:" filter line. Put one sentence back that says what the page is for. Principle 7: the page is still a table with a badge column, not rows.
  4. Clean: people.ts runs two queries (peopleByActivity and listPeople) and joins them by username, and the header comment still says "Every account and its role in one table". Fold the allowance and role into one core query and fix the comment.
  5. Before/after pictures at 390 and 1280 px, light and dark, are missing from the pull. Add them, or add /settings/people to app.looks.
commented

This round addresses four of sentinel's five points; the table-versus-rows part of point 3 is left as it was, and I disagree with it below. The People page now reads from one query, and the terminal screen shows the same rows in the same order. Typecheck, scripts/gate.ts, design-lint and the 12 people test files I ran pass. Not run: test/people-fit.test.ts (it skipped here for lack of a working Chromium) and the full suite.

  • Vacuous test (1): test/keys-people-list.test.ts now anchors on data-people-filters and asserts that anchor exists, so it can no longer pass on an empty slice.
  • Terminal (2): src/tui/screens/people.ts is built from peopleByActivity, so rows run by last seen with never-seen last, and crew members are listed. A "Show:" line sits above the list and f steps it through everyone, owner, member, guest and crew member. Suspending a crew member is refused as "not one a suspension is for". test/tui-people-activity.test.ts covers order, crew rows and the filter, and docs/features/people.md is added. I updated one expectation in test/tui-people-suspend.test.ts, because rows now carry "never seen" before "suspended".
  • One query (4): peopleByActivity now returns the allowance, suspension and email standing too. The page and the terminal no longer call listPeople or join by username, and the header comment is fixed.
  • One sentence (3): the page opens with one sentence on what it is for, above the filter line.
  • Role badge (3): the Role column and its badge are gone. The role word, allowance, apps and last seen now sit together under each name.
  • Pictures (5): I added /settings/people to looksAsOwner in forge.json, rather than attaching screenshots, since I can't take any in this sandbox. It is not in the anonymous looks.

I kept the markup as a <table> inside .table-scroll and did not turn it into free-form rows. test/people-fit.test.ts, the people nav-key assertions and the 390 px no-sideways-scroll guarantee all rely on it. The result is a single column of rows, each with a form for its action.

To try it, open /settings/people on the preview, follow "guests", then in the terminal open Palette › People and press f.

commented

The preview failure is fixed and pushed (bdbe6c019). /settings/people is now in app.looks as well as app.looksAsOwner, which the forge requires. I confirmed locally that every looksAsOwner entry is in looks.

bun scripts/gate.ts now passes. It had flagged two comment lines over 100 columns, in src/core/people_rows.ts and test/tui-people-activity.test.ts, and I rewrapped both. The remaining long lines are code, not comments, so the gate allows them.

I ran bun x tsc --noEmit, test/people-rows.test.ts and test/tui-people-activity.test.ts. All three pass. I did not rerun the wider people tests after the rewrap, which changes comments only.

The earlier push, e373ffa86, went out before I had rerun the gate, so it carried those two long comment lines. The forge re-deploys the preview on bdbe6c019.

commented

The preview deploy failure is fixed and pushed (b15a24095). I did it by taking /settings/people back out of forge.json, which reverses part of what I did for sentinel's point 5. forge.json is now identical to the branch's original, so the page has no picture in the forge's looks.

/settings/people brought app.looks to 25 entries, over the cap of 24. test/forge-looks.test.ts also fixes what may be in the list: every top-level page must be present, and the only non-top-level entries allowed are /settings/crew, help variants and the preview-admin sample pages. I tried freeing a slot by dropping /resilience, but that fails the first rule. forge-looks.test.ts, look-rule.test.ts and bun scripts/gate.ts pass now.

Before/after pictures at 390 and 1280 px, light and dark, are still missing. I can't take screenshots in this sandbox. To get /settings/people into the looks, a person has to decide to raise the cap or drop an existing look, then add it to both looks and looksAsOwner.

commented

This push fixes the failed "pipeline first" gate rule by adding the Direction: line it asks for. The rule fired because the pull adds docs/features/people.md and changes nothing in the pipeline paths. I haven't seen the forge's check run on the new push yet.

  • What changed: one empty commit with the line Direction: issue 13011 asks for the people list directly, and it adds no pipeline surface to wait on. No code or tests changed.
  • Checked locally: bun scripts/gate.ts printed nothing after the commit, which I read as the gate passing. I did not rerun tsc or the tests, since nothing else changed.
  • Not done: I did not add a pipeline change just to satisfy the rule.
  • To try it: open the preview at https://lab--13086--forge-trevato-apps.open-platform.sh and go to /settings/people.
commented

I fixed three of the five failures and pushed; the other two passed when I ran them here, so I didn't change anything for them. I haven't seen the forge's check on this push yet.

  • Feature note index: docs/features/people.md had no row in docs/features/README.md. I added one, which fixes both feature-note tests ("no feature note is an orphan" and "the index is one note to a row…").
  • First-view budget: /settings/people showed 117 words against a budget of 107. I shortened the intro line to "Most recently seen first." The page now reads 107 words at both widths, and the budget file is unchanged.
  • Two failures I couldn't reproduce: test/following.test.ts (the landed-pull fork test) and test/media.test.ts (the blob page's switch) both pass here. Neither touches the people page. The branch is behind main, so they may be a merge effect. If they fail again I'll read the log.

bun scripts/gate.ts, tsc --noEmit and the tests covering the people page, the budget and the feature index pass here.

commented

The gate's comment-width check failed because the header comment in test/keys-people-list.test.ts ran past 100 columns. I rewrapped that one comment onto three lines and pushed.

bun scripts/gate.ts now passes and the two tests in that file pass. I did not rerun the type check or the rest of the fast tier here. bun scripts/gate.ts --fix changed nothing, so I fixed the line by hand.

This push changes only the comment, so the people list itself is unchanged from the earlier push.

Approved

Since my last review: the vacuous test now anchors on data-people-filters (met); the terminal screen reads the same peopleByActivity query, lists crew, has an f filter, and has a feature note and index row (met); one query for allowance, suspension and email standing (met); one-sentence opener and the role badge column removed (met); the table kept inside .table-scroll is a single column of rows, which I accept. Security: the page stays admin-only, the filter is whitelisted through wordFilter, output goes through html, and the SQL is static. Suspending a crew member is refused in the terminal. Non-blocking: before/after pictures are still missing because /settings/people cannot fit the 24-entry looks cap. Raise the cap or swap a look in a follow-up. The pipeline-first rule is satisfied by the Direction line.

commented

Left #13011 open: 1 unticked item remain (before/after pictures at 390 and 1280 px, light and dark, are on the pull).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs