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

On a repository's crew page, adding a member to a slot redraws in place without losing the scroll, and a member is one line with its description on demand #18542

opened this

Merged 2h 9m ago, live in production

Most of #18541 was already on main from #18474, so this pull finishes the one repository crew-card form that still did a full-page POST. That form moves a member to another slot. It now submits in place, and test/in-place-offenders.json loses its entry.

Notes

opened this

Most of #18541 was already on main from #18474, so this pull finishes the one repository crew-card form that still did a full-page POST. That form moves a member to another slot. It now submits in place, and test/in-place-offenders.json loses its entry.

I didn't run the full suite. The tests I ran for this change (crew-in-place, in-place-rule, crew-settings-doors, review-gate, pages-budget, crew-roles, studio-crew-panel, crew-no-reviewer), tsc, design-lint and gate.ts --explain pass, except the failure below. I did not boot the app or open the page in a browser.

One test fails and I left it. in-place-rule.test.ts ("no new form that answers a full page") fails on src/web/pages/invite-link.ts POST /signup/invite?invite=:. That file isn't in this diff; it came in with #18520. I haven't checked whether main fails it too. The forge's check may flag it on this pull.

  • Already on main (#18474): adding and removing a member redraws only the changed slot, keeps scroll, and falls back to a redirect without script. Each member is already a one-line row with its model and brief in a closed <details>.
  • The role change: crewRoleUpdate now answers a JSON ask with the two slots to redraw, the one the member left and the one it took. Without script it still redirects, and a bad role gets a 422. The same-origin check is unchanged.
  • The no-reviewer line: the "no reviewer" note and its "Make X the reviewer" buttons used to sit outside the slots, so an in-place change would have left them stale. They now live inside the Reviewers slot, and the buttons are in place too. I did not rebuild the whole card to avoid this.
  • Tests (test/crew-in-place.test.ts): one covers the role move (both slots named, 422 on a bad role, redirect without script, cross-origin refused). Another shows a member's description is escaped and closed on first paint. I did not confirm that these fail on the old code.
  • Not touched: the offenders entries for the global agents page (src/web/pages/crew.ts) and the /settings and autonomy forms. They belong to other pages, not the repository crew card. I didn't check whether #18523 is open, so I can't say its entries don't overlap with mine.
  • Reuse: I reused memberRow, seatRows, redraw and flashOrJson. I did not run scripts/similar.ts.

No door change: the terminal and its how-to already show and set the same role.

To try it, open a repository's Settings → Your team, and move a member to another list or press "Make X the reviewer". Only the affected lists redraw and the scroll position stays.

[
  {"go":"/alice/yard/settings#crew","look":"Your team card, a member in the Builders list that can also review","expect":"the page shows one line per member; a member with a brief opens on demand"},
  {"go":"/alice/yard/settings#crew","look":"add the member to Reviewers from the Reviewers list picker","expect":"only the Builders and Reviewers lists redraw, the scroll position is kept, a flash says it was added"},
  {"go":"/alice/yard/settings#crew","look":"with a pull waiting and no reviewer, press Make X the reviewer","expect":"the no-reviewer line disappears inside the Reviewers list without a page reload"}
]

🤖 Generated with Claude Code

Closes #18541

5 earlier comments
commented

Most of #18541 was already on main from #18474, so this pull finishes the one repository crew-card form that still did a full-page POST. That form moves a member to another slot. It now submits in place, and test/in-place-offenders.json loses its entry.

I didn't run the full suite. The tests I ran for this change (crew-in-place, in-place-rule, crew-settings-doors, review-gate, pages-budget, crew-roles, studio-crew-panel, crew-no-reviewer), tsc, design-lint and gate.ts --explain pass, except the failure below. I did not boot the app or open the page in a browser.

One test fails and I left it. in-place-rule.test.ts ("no new form that answers a full page") fails on src/web/pages/invite-link.ts POST /signup/invite?invite=:. That file isn't in this diff; it came in with #18520. I haven't checked whether main fails it too. The forge's check may flag it on this pull.

  • Already on main (#18474): adding and removing a member redraws only the changed slot, keeps scroll, and falls back to a redirect without script. Each member is already a one-line row with its model and brief in a closed <details>.
  • The role change: crewRoleUpdate now answers a JSON ask with the two slots to redraw, the one the member left and the one it took. Without script it still redirects, and a bad role gets a 422. The same-origin check is unchanged.
  • The no-reviewer line: the "no reviewer" note and its "Make X the reviewer" buttons used to sit outside the slots, so an in-place change would have left them stale. They now live inside the Reviewers slot, and the buttons are in place too. I did not rebuild the whole card to avoid this.
  • Tests (test/crew-in-place.test.ts): one covers the role move (both slots named, 422 on a bad role, redirect without script, cross-origin refused). Another shows a member's description is escaped and closed on first paint. I did not confirm that these fail on the old code.
  • Not touched: the offenders entries for the global agents page (src/web/pages/crew.ts) and the /settings and autonomy forms. They belong to other pages, not the repository crew card. I didn't check whether #18523 is open, so I can't say its entries don't overlap with mine.
  • Reuse: I reused memberRow, seatRows, redraw and flashOrJson. I did not run scripts/similar.ts.

No door change: the terminal and its how-to already show and set the same role.

To try it, open a repository's Settings → Your team, and move a member to another list or press "Make X the reviewer". Only the affected lists redraw and the scroll position stays.

[
  {"go":"/alice/yard/settings#crew","look":"Your team card, a member in the Builders list that can also review","expect":"the page shows one line per member; a member with a brief opens on demand"},
  {"go":"/alice/yard/settings#crew","look":"add the member to Reviewers from the Reviewers list picker","expect":"only the Builders and Reviewers lists redraw, the scroll position is kept, a flash says it was added"},
  {"go":"/alice/yard/settings#crew","look":"with a pull waiting and no reviewer, press Make X the reviewer","expect":"the no-reviewer line disappears inside the Reviewers list without a page reload"}
]

🤖 Generated with Claude Code

commented

<!-- look-pages 46433fc41659 --> Look pages for 46433fc, from the gate:

  • look pages (none): "Looks: /alice/yard/settings" is not a page of app.looks in forge.json; this pull changes src/web/pages/crew-settings.ts, src/web/studio/crew.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

This push only fixes the look-pages gate. The crew-card code is unchanged since 46433fc.

  • Look pages: the earlier commit named /alice/yard/settings, which isn't a page in app.looks. The new empty commit names /settings/crew with a Looks: line, and gate.ts now reports "look pages (named)".
  • Comment width: the gate's note about a comment over 100 columns in src/web/studio/crew.ts needs no change. gate.ts --fix rewrapped nothing, and the gate says the nightly rewrap handles it on main.
  • Both doors: this was already satisfied. The commit line says No door:, and the gate's both-doors rule passes. The change only alters how the page submits a role change. The terminal and the how-to already show and set the same role.
  • Duplicate-import, first-view budget and cascade/COVERED tests: these failures were from the earlier run. They now pass, and I changed no schema or imports. I ran test/dup-imports.test.ts, test/page-budget.test.ts and test/account-purge.test.ts, and found no test titled "each page stays inside its first-view budget". I did not run the full suite: fast.ts named everything, so I ran only the files that cover this change. test/crew-in-place.test.ts, test/web-budget.test.ts, test/doorless.test.ts and bun x tsc --noEmit also pass.

What to look at: on a repository's /settings, open the Your team card and move a member to another list. Only the lists should redraw, and the no-reviewer line and its "Make X the reviewer" buttons should move with the Reviewers seat.

🤖 Generated with Claude Code

commented

<!-- look-pages f9244c346995 --> Look pages for f9244c3, from the gate:

  • look pages (named): this pull changes src/web/pages/crew-settings.ts, src/web/studio/crew.ts; a commit names /settings/crew
commented

Nothing is left to change. The latest look-pages comment on f9244c3 reports "look pages (named)", which is the gate passing. The other three items are the check's list of what it refuses most often, and I met each one before the last push:

  • Both doors: the commit line says No door: and the gate's both-doors rule passes. This change only alters how the page submits a role change. The terminal and the how-to already show and set the same role.
  • Duplicate imports, first-view budget, cascade/COVERED: test/dup-imports.test.ts, test/page-budget.test.ts and test/account-purge.test.ts pass. I touched no schema and added no imports.
  • Other checks: test/crew-in-place.test.ts, test/web-budget.test.ts, test/doorless.test.ts and bun x tsc --noEmit also pass.

I did not run the full suite. The forge's check runs it on every push.

The background task from the last session was my own over-broad fast.ts test run, which I stopped on purpose, so nothing was lost.

I pushed nothing further. The code on the branch is unchanged since f9244c3, and the earlier description still stands.

🤖 Generated with Claude Code

commented

Left #18541 open: 1 unticked item remain (the crew page's entries leave test/in-place-offenders.json in the same pull).

Sign in to join this conversation.

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

Keyboard shortcuts

Docs