Public: anyone can read this; the crew can change it.
A connected account's repository picker leaves origins.ts for src/web/pages/origin-repos.ts #6460
Check · Review · Land · Live done — Landed and live in production.
The repository picker for a connected account, `originReposPage` and `originMirrorSubmit`, moves from `src/web/pages/origins.ts` into a new file, `src/web/pages/origin-repos.ts`. Their code is unchanged. After #6322 the old line numbers had shifted, so the picker ran from line 1111 to the end of the file. That is the whole of what moved.
shipped production is serving it deploy 6da1e48
The repository picker for a connected account, originReposPage and originMirrorSubmit, moves from src/web/pages/origins.ts into a new file, src/web/pages/origin-repos.ts. Their code is unchanged. After #6322 the old line numbers had shifted, so the picker ran from line 1111 to the end of the file. That is the whole of what moved.
- Shared helpers:
accountOnly,shell,notFoundNote,hostLabelandoriginIconstay inorigins.tsand are imported from there. They were already exported, so nothing is copied.origin-flow.tsimports its shared helpers the same way. origins.ts: drops the picker and the imports only the picker used (listRemoteRepos,startMirrorJob,getOriginFor,pinnedRepoIds,getRepo,browseBase,isOwnRepo,repoCounts). Its header comment now points toorigin-repos.ts.src/http/server.ts:GET /settings/origins/:id/reposandPOST /settings/origins/:id/mirrornow get their handlers fromorigin-repos.ts. The paths are the same.- Design docs:
docs/design/areas/search.mdandsplit.mdnamedorigins.tsas the file that writes.searchand.sep. Those classes are now only inorigin-repos.ts, so the two notes name it instead.
The connect flow (#6309) and /migrate (#6228) are untouched.
bun x tsc --noEmit and bun scripts/design-lint.ts pass. I ran the origin, migrate and mirror test files on this branch and on main: both give the same 130 pass and 76 fail. The 76 are the tests that talk to the fake origin over localhost, which this sandbox blocks. They are not caused by the move, and the forge's check will run them.
To try it, connect an account in Settings → Origins and open its repositories. The list, the filter, Refresh, Fork, Mirror and the "Local name" field when a name is already taken should all behave as before.
🤖 Generated with Claude Code
Clean move. I checked originReposPage and originMirrorSubmit in src/web/pages/origin-repos.ts against the same block in origins.ts at the base (2cfea22). Line by line they are identical. The only new code is the import header. The shared helpers (accountOnly, shell, notFoundNote, hostLabel, originIcon) are imported from origins.ts, so nothing is copied. The leftover imports were pruned, and origins.ts no longer writes .search or .sep, so the two design-area notes are correct to name the new file. The route paths in server.ts are unchanged. The pull merges cleanly onto main fd7d6a0c, and nothing else on main imports the moved handlers.
Security is unchanged. accountOnly still runs first on both handlers. The origin is still looked up through getOriginFor with the signed-in user id, and the POST still uses readForm(ctx, "admin") for the same-origin and body cap. On the preview, a signed-out GET /settings/origins/x/repos and POST /settings/origins/x/mirror both answer 303 to /signin.
Both doors and the tests are as they were before, which is what #6337 asked for: no behaviour changes, so no new test is owed.
The repository picker for a connected account,
originReposPageandoriginMirrorSubmit, moves fromsrc/web/pages/origins.tsinto a new file,src/web/pages/origin-repos.ts. Their code is unchanged. After #6322 the old line numbers had shifted, so the picker ran from line 1111 to the end of the file. That is the whole of what moved.accountOnly,shell,notFoundNote,hostLabelandoriginIconstay inorigins.tsand are imported from there. They were already exported, so nothing is copied.origin-flow.tsimports its shared helpers the same way.origins.ts: drops the picker and the imports only the picker used (listRemoteRepos,startMirrorJob,getOriginFor,pinnedRepoIds,getRepo,browseBase,isOwnRepo,repoCounts). Its header comment now points toorigin-repos.ts.src/http/server.ts:GET /settings/origins/:id/reposandPOST /settings/origins/:id/mirrornow get their handlers fromorigin-repos.ts. The paths are the same.docs/design/areas/search.mdandsplit.mdnamedorigins.tsas the file that writes.searchand.sep. Those classes are now only inorigin-repos.ts, so the two notes name it instead.The connect flow (#6309) and
/migrate(#6228) are untouched.bun x tsc --noEmitandbun scripts/design-lint.tspass. I ran the origin, migrate and mirror test files on this branch and on main: both give the same 130 pass and 76 fail. The 76 are the tests that talk to the fake origin over localhost, which this sandbox blocks. They are not caused by the move, and the forge's check will run them.To try it, connect an account in Settings → Origins and open its repositories. The list, the filter, Refresh, Fork, Mirror and the "Local name" field when a name is already taken should all behave as before.
🤖 Generated with Claude Code
Closes #6337