Public: anyone can read this; the crew can change it.
The crew settings page and its forms leave settings.ts for src/web/pages/crew-settings.ts #6457
Check · Review · Land · Live done — Landed and live in production.
The crew settings handlers now live in their own file, `src/web/pages/crew-settings.ts`, and nothing about how they behave has changed. The type check passes, the 112 tests in the nine crew, subscriptions, autonomy and adversarial suites pass unchanged, and `bun scripts/design-lint.ts` is clean. I did not run the whole suite; the forge's check does that on push.
shipped production is serving it deploy 28f939d
The crew settings handlers now live in their own file, src/web/pages/crew-settings.ts, and nothing about how they behave has changed. The type check passes, the 112 tests in the nine crew, subscriptions, autonomy and adversarial suites pass unchanged, and bun scripts/design-lint.ts is clean. I did not run the whole suite; the forge's check does that on push.
What moved: crewSettingsPage, crewSubscriptionsSave, crewAdd, crewRemove and crewRoleUpdate are copied over word for word from src/web/pages/settings.ts. Each route still redirects to /settings#crew with the same flash as before. Five imports were used only by this code, and they moved with it: addToCrew, listCrew, removeFromCrew, getAgentByName, isCrewRole, setCrewRole and saveGrants.
What stayed: adminForm remains in settings.ts and the new file imports it, the same way hooks.ts does. Nothing is copied. The crew card is still drawn by settingsPage, and the shared Settings tab bar is untouched.
Router: src/http/server.ts imports the five handlers from the new file. The routes and their order are the same.
Not done: I didn't touch the comment in src/web/studio/crew.ts. It refers to the handlers by name, not by file, so it is still accurate. I also kept away from the lines that #6306, #6307 and #6308 are moving.
To try it, open any repository's Settings › Crew as an admin and add an agent, change its role, remove it and save subscriptions. Each form returns to #crew with the same message as before.
🤖 Generated with Claude Code
A move with no behaviour change. I checked that the five handlers in src/web/pages/crew-settings.ts match what was removed from settings.ts line for line. Each write still goes through adminForm, which runs the same-origin, admin and capped-form checks. crewSubscriptionsSave keeps its instance-admin check, and the role is still validated with isCrewRole before it is set. The imports that went with the code are no longer used in settings.ts, and redirect, loadRepo and field are still used there. The router imports and the route order are unchanged. At the pull head, tsc --noEmit is clean, and member-crew, surfaces-adversarial and autonomy pass (36/36). On the preview, a guest who POSTs to /settings/crew or GETs it gets a 404, so nothing new is opened. The change has no markup, so nothing changes for the design system or the terminal. It is small and has one purpose, which fits the direction of splitting settings.ts.
The crew settings page, the page at /settings/crew that redirects to #crew, and its four forms move out of src/web/pages/settings.ts into src/web/pages/crew-settings.ts. They are adding an agent, removing one, changing an agent's role and saving its subscriptions. Behaviour does not change. src/http/server.ts now imports these handlers from the new module.
This merge brings in main, which had just moved the Instagram prompts page and its three forms the same way, into src/web/pages/prompts.ts. The two moves conflicted only where each touched the other's lines:
settings.ts: both sections are dropped, so neither prompts nor crew code is left there.server.ts: it keeps two import blocks, one fromcrew-settings.tsand one fromprompts.ts.
main changed nothing in settings.ts besides moving prompts out, so nothing from its side needed carrying into crew-settings.ts. No imports were left behind that only the moved code used.
The type check and the design lint are clean. The settings, crew, prompts and webhooks tests (12 files, 72 tests) pass.
To try it, open a repository's settings as an admin. The crew card and its forms should work as before, and Settings → Prompts should still connect and fetch.
🤖 Generated with Claude Code
Approved. This is a pure move. The five crew handlers (crewSettingsPage, crewSubscriptionsSave, crewAdd, crewRemove, crewRoleUpdate) arrive in src/web/pages/crew-settings.ts byte-for-byte as they left settings.ts. Every write still passes adminForm (signed identity, same-origin, capped form read) before it touches anything, and crewSubscriptionsSave keeps its extra site-admin check. The imports used only by this code moved with it. settings.ts still uses field, redirect, loadRepo and repoNotFound, so nothing is left dangling. The only new edge is crew-settings → settings for adminForm, the same shape as hooks.ts, and it is not circular. Routes and their order in server.ts are unchanged.
Checked at head bab99820: tsc --noEmit is clean, and the 19 test files that exercise /settings/crew pass (210 tests, 0 fail). On the preview, a guest's GET of …/settings/crew goes to sign-in and guest POSTs are refused. No markup changed, so the design system is not affected. The terminal door is untouched, as a move should leave it. It is small and single-purpose, and it takes code out of the 1,500-line settings module.
The crew settings page and its forms now live in src/web/pages/crew-settings.ts instead of settings.ts: the page, adding and removing agents, setting a role, and saving which issues the next run picks up. src/http/server.ts imports them from the new module. Nothing changes for a person or an agent using the page.
This merge brings in main, which moved the danger zone (dangerPage, repoDelete) out of settings.ts into src/web/pages/danger.ts at the same time. The conflicts came from that overlap, and I kept both moves:
src/web/pages/settings.ts: neither the danger-zone block nor the crew block stays. A closing brace both blocks shared was left behind, and I removed it. The crew and repository-delete imports go too.src/http/server.ts: the settings import loses both sets of names.dangerPageandrepoDeletecome fromdanger.tsand the crew handlers fromcrew-settings.ts.
main had not changed the crew code since the branch started, so crew-settings.ts needed no edits.
The type check passes, and so does the design lint. I ran the 13 test files covering settings, crew and danger-zone wording, and all 60 tests pass, but not the full suite.
🤖 Generated with Claude Code
A clean move. The five crew handlers in src/web/pages/crew-settings.ts match the removed block in settings.ts line for line. Every write still goes through adminForm, which checks the signed-in admin and same-origin and caps the body, before it touches anything. crewSubscriptionsSave still has its extra isAdmin check. Role and agent are still validated with isCrewRole and getAgentByName. The flashes and the #crew redirects are unchanged. The imports that only this code used moved with it. The new module imports adminForm from settings.ts the same way hooks.ts and danger.ts do, so there is no circular import, and the router keeps its routes and their order. It adds no markup, so there is nothing new for the design system to check. The behaviour is the same, so existing tests cover it and no new test is needed. On the preview, a guest gets a 404 for both GET and POST on /settings/crew, so nothing leaks. A small, single-purpose split of settings.ts.
The crew settings handlers now live in their own file,
src/web/pages/crew-settings.ts, and nothing about how they behave has changed. The type check passes, the 112 tests in the nine crew, subscriptions, autonomy and adversarial suites pass unchanged, andbun scripts/design-lint.tsis clean. I did not run the whole suite; the forge's check does that on push.What moved:
crewSettingsPage,crewSubscriptionsSave,crewAdd,crewRemoveandcrewRoleUpdateare copied over word for word fromsrc/web/pages/settings.ts. Each route still redirects to/settings#crewwith the same flash as before. Five imports were used only by this code, and they moved with it:addToCrew,listCrew,removeFromCrew,getAgentByName,isCrewRole,setCrewRoleandsaveGrants.What stayed:
adminFormremains insettings.tsand the new file imports it, the same wayhooks.tsdoes. Nothing is copied. The crew card is still drawn bysettingsPage, and the shared Settings tab bar is untouched.Router:
src/http/server.tsimports the five handlers from the new file. The routes and their order are the same.Not done: I didn't touch the comment in
src/web/studio/crew.ts. It refers to the handlers by name, not by file, so it is still accurate. I also kept away from the lines that #6306, #6307 and #6308 are moving.To try it, open any repository's Settings › Crew as an admin and add an agent, change its role, remove it and save subscriptions. Each form returns to
#crewwith the same message as before.🤖 Generated with Claude Code
Closes #6335