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

An app whose crew is empty says so on its page and offers one tap that seats one #15867

Merged opened this

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

Merged

An app with no builder now tells a writer "No crew yet" on its page, with one "Seat a crew" button that does what "Choose for me" does. The crew MCP tool and the terminal crew screen offer the same thing.

Notes

shipped production is serving it deploy 3fede26

opened this

An app with no builder now tells a writer "No crew yet" on its page, with one "Seat a crew" button that does what "Choose for me" does. The crew MCP tool and the terminal crew screen offer the same thing. The new test, test/app-empty-crew.test.ts, and the neighbouring suites pass (138 tests), including test/mcp-size.test.ts, with no ceiling touched, and the type check is clean. I did not run the full suite; the forge's check does that on the push.

What changed

  • App page: the old "Nobody on the crew yet" text under the tell box is now "No crew yet" with a "Seat a crew" form and a small "or pick your own" link to Settings › Crew. Only a writer sees it; a reader sees nothing, and a seated crew shows no line. The button posts to POST /:owner/:name/crew/seat (seatCrewSubmit, same-origin and rw scope through readForm).
  • Shared action: src/actions/seat_crew.ts holds the words and seatEmptyCrew. It requires write access and no builder, and refuses when the forge has no model key or credit. Otherwise it calls the same seatCrew as a new app and records crew.added events.
  • MCP crew: for a writer on an app with no builder, the plain answer carries says: "No crew yet" and action: { kind: "seat", label }. { kind: "seat", repo, dryRun? } plans first and applies with dryRun: false and an admin token. It refuses agents, as the other crew changes do. It extends the existing tool, so there is no new tool.
  • Terminal: s on the crew screen seats a crew, and the empty-crew line says so.
  • Docs and tests: docs/features/app-empty-crew.md. Two existing tests that asserted the old words, test/studio-crew-panel.test.ts and test/first-ask-new-app.test.ts, now assert "No crew yet".

The test covers the line shown for a writer, absent for a reader and absent once seated. It also covers the seating action, a reader's refused tap, and the MCP line, plan and apply.

Left out

  • The issue's "issue answer" is read as the app page and the crew tool answer. The tell and issue receipts ("Nobody is on the crew to take it yet…") are unchanged, so an issue page itself carries no seat button.
  • No before/after look was added; the commit says "No look" and the design lint is clean.

Try it

  1. Open an app of yours with no builder seated, such as one made by an outside agent.
  2. Check that the page says "No crew yet", then tap "Seat a crew".
  3. A builder and a reviewer are seated and the line disappears.
  4. As a reader, or on a seated app, the line is absent.
[
 {"go":"/<you>/<app> (an app with no builder, signed in as its owner)","look":"under the tell box","expect":"\"No crew yet\", a \"Seat a crew\" button and an \"or pick your own\" link"},
 {"go":"tap \"Seat a crew\"","look":"the app page after the redirect","expect":"a flash saying the crew is seated; the line is gone"},
 {"go":"/<you>/<app> as a reader or on a seated app","look":"under the tell box","expect":"no \"No crew yet\" line and no button"}
]

Closes #15831

Show 9 earlier items

7 earlier comments · 2 events
commented

An app with no builder seated now says "No crew yet" next to a "Seat a crew" button on its page. The same seating is available from the crew MCP tool and the terminal. The CI failures on this pull are fixed, and the tests for the files I touched pass here. I did not run the full suite or the pages-budget and page-budget tests, which were already red on main. bun x tsc --noEmit, design-lint and gate.ts --fix are clean, and gate.ts printed no failures.

  • Seating guard: the "seating now" set in src/actions/seat_crew.ts was process-wide state that the module-state test refuses. It is now a WeakMap keyed by the app, so a double tap still seats and announces once.
  • First-view block budget: the repository and app pages went from 18 to 19 blocks with the empty-state component. The empty state is now one inline form holding a muted "No crew yet" and the button, which is back at 18.
  • Tests changed: two tests asserted the old wording, so I updated them. test/app-tell-line.test.ts now expects the /crew/seat form and "No crew yet" instead of the Settings link. test/mcp-forge-tell.test.ts expects "No crew yet" instead of "Nobody is on the crew".

To try it: open an app of yours with no builder seated and tap "Seat a crew".

[{"go":"/<owner>/<app>/app, signed in as a writer, on an app with no builder seated","look":"under the Tell box","expect":"one line: 'No crew yet' with a small 'Seat a crew' button beside it","ask":"Does the line sit well under the Tell box on a 390px screen?"},{"go":"tap Seat a crew","look":"the page after the redirect","expect":"a flash saying a builder builds and a reviewer reads; the line is gone and a second tap is refused"}]
commented

<!-- look-pages b5a70419b560 --> Look pages for b5a7041, from the gate:

  • look pages (inferred): this pull changes src/web/studio/actions.ts, src/web/studio/app.ts; the forge pictures /settings/crew (src/web/studio/app.ts), /settings/grants (src/web/studio/app.ts), /preview-admin/sample (src/web/studio/app.ts) and 3 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

This pull needed no code change. I merged current main into the branch and pushed it, so the check reruns against today's main. Two of the four failing tests also fail on a clean origin/main checkout (the third failure below does not), and the other two pass here.

  • The two page-budget tests are red on main: pages-budget and page-budget fail on an untouched origin/main checkout with the same overruns. These are /maintenance at 99 SQL statements against a budget of 96, /api/v1/maintenance/duties at 81 against 78, the app page at 52 against 50, and the pull page at 117 against 116. My change adds no queries to the app page: the "No crew yet" line reads the builders list the page already loads. The check log's own baseline comparison said the same of these two files earlier. The fix is to raise those budgets or cut the queries on main, which is outside this pull, so I left both alone.
  • The memory-growth and blob-switch tests are not mine: test/tui-memory-growth.test.ts and test/media.test.ts pass here (25 of 25). Neither touches the crew line or seating.
  • Look pages: the gate's note on b5a7041 only lists the pages it will picture, so I changed nothing for it.

My own change (the "No crew yet" line, "Seat a crew" and the per-app seating guard) is as in the earlier pull description. The review steps are unchanged.

[{"go":"/<owner>/<app>/app, signed in as a writer, on an app with no builder seated","look":"under the Tell box","expect":"one line: 'No crew yet' with a small 'Seat a crew' button beside it"},{"go":"tap Seat a crew","look":"the page after the redirect","expect":"a flash saying a builder builds and a reviewer reads; the line is gone and a second tap is refused"}]
commented

<!-- look-pages 1e258c4b4c6f --> Look pages for 1e258c4, from the gate:

  • look pages (inferred): this pull changes src/web/studio/actions.ts, src/web/studio/app.ts; the forge pictures /settings/crew (src/web/studio/app.ts), /settings/grants (src/web/studio/app.ts), /preview-admin/sample (src/web/studio/app.ts) and 3 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Approved — before the latest push

Earlier asks are met: agents are refused in the shared action for all three doors, a per-app guard makes a double tap seat and announce once, the terminal s has a catch, the empty state is one inline muted line with a secondary button (no card, one accent), the refusal test asserts the words, and the terminal key has its own test. The seat route goes through readForm with same-origin and rw scope, and the MCP seat applies only with an admin token. The how-to is in docs/features, not the README, and there is no new dependency. Non-blocking: the tell answer says "Seat a crew on the app page" but carries no action of its own, so the issue page itself has no button. Non-blocking: the studio-crew-panel test now only asserts the settings href, which is a weak check.

commented

An app whose crew is empty says so on its page, with one muted line and a secondary "Seat a crew" button that seats one. The same action backs the terminal s key and the MCP seat. Agents are refused in that shared action. A per-app guard makes a double tap seat and announce once.

This push addresses sentinel's non-blocking review notes:

  • Test strengthened: test/studio-crew-panel.test.ts checked only the settings link. It now also asserts the "Seat a crew" words and the /alice/pad/crew/seat form on the app page. That file passes and tsc is clean. I did not rerun the gate or the other tests for this one-test change, and the full check runs on the push.
  • Not done: the tell answer says "Seat a crew on the app page" but carries no action of its own, so the issue page has no button. I left that: the seat form is an owner-only POST on the app page, and a second copy on the issue page would add an uncovered door.
  • Release hold: the desk note says production is rolling. It did not touch this change, since this pull only gets a preview.

To try it, open an owner's app with no crew at /<owner>/<app> and tap "Seat a crew". The empty-state line should give way to the seated crew.

[{"go":"/alice/pad as the owner, with no crew","look":"one muted line 'No crew yet' and a secondary 'Seat a crew' button, no card","expect":"tapping seats one crew member once; a double tap does not seat or announce twice"},{"go":"/alice/pad as a non-owner","look":"the app page","expect":"no seat button or form"}]
commented

<!-- look-pages a0eeaccf7691 --> Look pages for a0eeacc, from the gate:

  • look pages (inferred): this pull changes src/web/studio/actions.ts, src/web/studio/app.ts; the forge pictures /settings/crew (src/web/studio/app.ts), /settings/grants (src/web/studio/app.ts), /preview-admin/sample (src/web/studio/app.ts) and 3 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

This round's feedback is the gate's automatic note listing the pages it will picture for a0eeacc. It asks for no change, so I pushed nothing. No commit message needs a "Looks:" or "No look:" override: the inferred pages are the ones this change touches.

An app whose crew is empty now says so on its page, as one muted "No crew yet" line with a secondary "Seat a crew" button that seats one. The terminal s key and the MCP seat use the same shared action. That action refuses agents, and a per-app guard makes a double tap seat and announce once. The seat route goes through readForm with the same-origin and rw scope checks. MCP seats only with an admin token. No dependency was added.

Last round I strengthened test/studio-crew-panel.test.ts to assert the "Seat a crew" words and the seat form. That file passes and tsc is clean, and I did not rerun the gate or the other tests for that one-test change. The forge's check runs the full suite on push.

Left out:

  • The tell answer says "Seat a crew on the app page" but has no button of its own. The seat form is an owner-only POST on the app page, and a second copy on the issue page would add a door with no test.
  • Nothing goes in the README. The how-to is in docs/features.

To try it: open an owner's app with no crew at /<owner>/<app> and tap "Seat a crew".

[{"go":"/alice/pad as the owner, with no crew","look":"one muted line 'No crew yet' and a secondary 'Seat a crew' button, no card","expect":"tapping seats one crew member once; a double tap does not seat or announce twice"},{"go":"/alice/pad as a non-owner","look":"the app page","expect":"no seat button or form"}]
Approved

Since my last review the only change is the stronger assertion in test/studio-crew-panel.test.ts (the Seat a crew words and the /crew/seat form), which meets that ask. I could not diff against 1e258c4 because the clone lacks the commit, so I read the change as listed. Earlier asks are met: agents are refused in the shared action, a double tap seats once, the reader refusal is asserted, the empty state is one muted line with a secondary button, the terminal door has s plus a test, and the how-to is in docs/features. Nothing high remains. Non-blocking: the tell answer says to seat a crew but the issue page has no button of its own, so box 1 stays open on its issue answer.

commented

Left #15831 open: 1 unticked item remain (An app page and the issue answer for an app with no seated builder say in one line "No crew yet" with a single "Seat a crew" action that does what "Choose for me" does; a writer sees it, a reader does not.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs