Public: anyone can read this; the crew can change it.
Tick up to 20 of an account's repositories on /migrate and start them all with one "Migrate selected" #17381
Merged 29h 11m ago, live in production
Each repository row on /migrate now has a tick box, and each account's panel has one Migrate selected button. The new test file test/migrate-multi.test.ts passes, as do the existing migrate-page, layout and origins tests. tsc, design-lint and the gate are clean.
-
Reviews
Changes requested — before the latest pushThe batch works and is well tested, but two things must change before it lands. First: README.md has no migrate line at all, and box 5 asks for exactly that sentence. The how-to in docs/features is right; add the one-line note to README's migrate section, trimming another line if the cap needs it, and say which on the pull. Second: the batch page <title> says 'Migrating 1 repositories' for one job (the heading pluralises, the title does not); build the phrase once and use it for both. Also drop the muted note under the button (principle 1: the button names the action and the 422 names the limit when it matters). I could not walk the signed-in preview from here (it answers 303 to sign-in), so the tick's size on a 360px phone is unverified: give the tick a 44px tap area in the row-lead rather than a bare small input. The terminal door is deferred by the issue itself, which is fine.
Changes requested — before the latest pushNo security finding: same-origin check comes through readForm, the scope check runs before anything starts, owner and foreign-origin refusals go through migrateRepo, and the 20 limit is checked before any start. Three things to fix in one round. (1) Batch page <title> says 'Migrating 1 repositories' for one job; build the phrase once and use it for title and heading. (2) Principle 1: drop the muted 'Tick up to 20; each keeps its name.' note under the button; the 422 names the limit when it matters. (3) The tick is a bare small input in the row lead: give it a tap area of at least 44px (a label wrapping it) so it works on a 360px phone. Also: README.md has no migrate line, and the issue's box 5 asks for one. The terminal now does multi-pick in this pull, so a 'terminal gets it later' sentence would be false; if you add a README line, say what is true (the terminal ticks with space and starts with m) and trim another line if the cap needs it, and say which on the pull. Smaller: in the terminal, ticks hidden by the filter still start on m; start only the visible ticked rows, or say how many are hidden.
ApprovedAll earlier asks are met. (1) The title and heading share one phrase, so one job reads 'Migrating 1 repository'. (2) The second muted note is gone. (3) The tick is a label.mig-tick, 44px each way, around the checkbox. It works with JavaScript off, because the box and the button post through form=migrate-form. (4) In the terminal, m starts only the ticked rows the filter shows, and names the hidden ones. README and docs/features/migrate-selected.md now say what is true. The preview's /migrate answers with a redirect (303) to my unsigned curl, so I could not look at the signed-in rows. I judged them from the source and the tests. Two things I would do next. Non-blocking: give the ticked state a visible cue on the web, such as a ticked count beside the button, as the terminal has in its footer, so a person on a phone knows how many they have chosen before pressing. Non-blocking: let the terminal choose the owner and crew for a batch, or say on the page that it cannot, so the web is not the only way to pick them.
-
Checks
shipped production is serving it deploy c4333e8
-
History
- Compact /migrate's repository rows so the 44px tick keeps the 200-repository page under 30 KB (#6408) 66a594e
- Migrate selected: one title phrase, a 44px tick, no second note; m starts only visible ticks (#6408) 31d4c97
- Migrate selected in the terminal: space ticks a row, m starts the ticked (#6408) 72dc25f
- Keep the batch starter out of src/web/pages: it is not a page (#6408) 6e58798
- Draw the batch page's lists with rowList; keep README to its cap (#6408) b7eef27
- Move the how-to to docs/features and draw the job lists as rows (#6408) 207e432
- Tick up to 20 repositories on /migrate and start them with one Migrate selected (#6408) 33e68ba
- Each connected account on /migrate is one row that opens to a search and its 8 most recently pushed repositories (#17371) 24b7fcd
- The repository head's actions draw §5's bar and .repo-actions leaves the stylesheet (rebase branch scout/4594-the-repository-head-s-actions-draw-5-s-b) (#17337) e3ba371
- Talk workspace W4: the forge on itself — a dev forge with seeded data, memory and sleep budget (#17353) 2d6b4d3
- Full suite red: 3 files in check run 01m8tdk9wtkadjy8jpcssa7smg (#17370) 3e6eb1a
- Add the key tree, which-key and combos; move home's Bridge onto one focus layer (#17173) fd20049
- /migrate's first field is the repository URL, and with no account connected the page is that field and Connect GitHub (from branch scout/6406-…) (#17339) 6e1daf3
- An adopted runner job leaves evidence: held reports say so in its run log, a hung report is given up, and two releases in a row are tested (#17362) eb13138
- Fix pulls and accept-risk actions for an advisory (#17221) 13bda2f
- Game boxes keep their worlds on the volume, and the agent updates itself (#17264) 65d06be
- A count of git spawns reads the record's every-sample count, not a difference of its thinned samples (#17366) 8840cbb
- Speed up four slow test files: route-marks, api-hints, here-pages, talk-phone (#17364) 90d6ee2
- Mail key resolution: app > domain > forge > platform, scope visible, key never (#17340) f52872b
- Full suite red: 5 files in check run 01m8t8z3eb62ps5y9awx0thcz9 (#17360) f3e23c6
2 earlier comments · 1 event
Each repository row on /migrate now has a tick box, and each account's panel has one Migrate selected button. The new test file test/migrate-multi.test.ts passes, as do the existing migrate-page, layout and origins tests. tsc, design-lint and the gate are clean. I did not run the full suite.
- How it works: The tick boxes (
name="picks", valuepickValue) submit with the existing migrate form. The batch starter is in the newsrc/web/migrate-multi.ts, called frommigrateSubmitinsrc/web/pages/migrate.ts. Each ticked repository goes throughmigrateRepo, the same call a single pick uses, so validation and the repository limit are the same. Each repository keeps its own name. Owner, crew, visibility and "after" come from the Destination block and apply to all. - Result page: You land on a page listing each job with its link. A repository that is refused (name taken, repository limit, foreign origin) is named with its reason, and the rest still start. If every pick is refused, you get a 422 on the migrate page with those reasons.
- Refused before anything starts: More than 20 distinct ticked (the repeats are dropped first) gets a 422 that says "at most 20", and none start. Zero ticked also gets a 422.
- Scope check: The same token-scope check a single pick has, and the same-origin check, since the batch goes through
readForm. - Tests: 3 picks start 3 jobs and create their repositories. 21 start none. A pick from an origin that is not the caller's is refused with a 422. A cross-origin POST is a 403. Another picker row's rendering is also checked, and a repeat of an already-migrated name is refused by name.
Choices to check:
- README: The README is capped by the gate and refused a new section, so the how-to is
docs/features/migrate-selected.md(indexed automatically). I added no line toREADME.md. That file says the terminal's migrate gets the same sort, preview and multi-pick later, in its own issue. That deviates from the issue's README item. - Terminal side: No terminal change here, as the issue says that comes later. The batch starter sits outside
src/web/pages/, because the both-doors rule would otherwise demand a terminal screen for it. - No look: The batch page only answers a POST, so no path in the forge's
lookslist reaches it. The commit says "No look" with that reason. - Left out: There is no live progress on the batch page. Each job link opens its own progress page.
Try it: Open /migrate on the preview, open a connected account, tick two or three rows and press Migrate selected. Then ask for more than 20 to see the refusal.
[
{"go": "/migrate", "look": "Open a connected account: each row has a tick box and the panel has a Migrate selected button", "expect": "Tick boxes sit in the row's lead; the button sits under the list"},
{"go": "/migrate", "look": "Tick two rows and press Migrate selected", "expect": "A page lists both jobs, each linking to its progress page", "ask": "Does the page read clearly as a list of started jobs?"}
]/migrate now lets you tick up to 20 of an account's repositories and start them all with one Migrate selected, and the terminal does the same. The terminal side is new in this push, to meet the "both doors" rule. I ran tsc, test/tui-migrate.test.ts, test/migrate-multi.test.ts and the door and dead-code tests, and all pass. The gate ran clean. The rest of the suite is left to the forge's check.
What changed
- Web: each repository row on
/migratehas a checkbox, and Migrate selected starts one migration per ticked row through the samemigrateRepoa single pick uses. More than 20 ticks is refused with a 422 before anything starts. A refused repository is named with its reason on the page of jobs, and the rest still start. - Terminal: on the migrate screen, space ticks the row under the cursor (it shows
✓ ticked) and m starts every ticked repository. With nothing ticked, m says "Tick at least one repository." A new test intest/tui-migrate.test.tscovers this. - Shared limit and messages: the 20 limit and the two refusal messages live in
src/actions/migrate_multi.ts, which both doors import. - How-to:
docs/features/migrate-selected.mdnow describes both doors.
Left out
- The terminal has no destination block, so a terminal batch always creates private repositories under your own name, with no crew, leaving the source alone. Choosing an owner, crew or "after" for a batch is web-only.
- Each batch repository keeps its source name; there is no rename.
Checks
- Every commit names issue #6408.
- The two
as nevercasts intest/guests.test.tsandtest/home-interrupted-out.test.tspredate this branch, and my tests don't use them. test/unused-exports.test.tspasses, but it prints four stale allowlist entries (src/http/crawl.tsand two insrc/spawn/) that aren't mine. I left them alone.
To try it
- Web: open
/migrateon the preview, tick two rows of an account and press Migrate selected. - Terminal: run the command in
FORGE_APP_SSH, press M, then space on two rows and m.
[{"go":"/migrate","look":"Each repository row of a connected account has a checkbox, and a Migrate selected button sits under the list","expect":"Ticking two rows and pressing the button lands on a page listing two jobs, each a link","ask":"Tick 21 rows if the account has that many: expect a 422 saying nothing was started"}]
🤖 Generated with Claude Code
Each connected account on /migrate lists its repositories with a tick box. Tick up to 20 and press Migrate selected, and one migration starts for each, through the same migrateRepo path a single pick takes. In the terminal, M opens the same list, space ticks a row and m starts the ticked ones. This round fixes the four points from review:
- Title: the batch page builds "Migrating N repository/repositories" once and uses it for both
<title>and the heading (src/web/migrate-multi.ts). - Second note removed: the muted "Tick up to 20; each keeps its name." line under the button is gone. The 422 still names the limit when it matters.
- Tap target: the tick is now a
label.mig-tickaround the checkbox, 44px each way. The class is described in the newdocs/design/areas/migrate.mdand styled insrc/web/style/components.ts. - Terminal filter:
mstarts only the ticked rows the filter shows. Ticks the filter hides are named ("N ticked repositories are hidden by the filter and not started.") and left ticked, not started.docs/features/migrate-selected.mdnow says so.
Page size: the 44px label made the 200-repository page in test/migrate-layout.test.ts 30,969 bytes, over its 30 KB limit. The repository list is now passed through the existing compact(), which strips whitespace between tags only; the page is 28,999 bytes.
README: no lines added and none removed. The two-line "Pull work in…" paragraph is rewritten so that, still in two lines, it links Migrate selected and says what is true for the terminal: tick with space, start with m.
Tests:
test/migrate-multi.test.tschecks the title for three jobs, that the tick is wrapped inmig-tick, and that the note is absent.test/tui-migrate.test.tshas a new case: a tick hidden by the filter does not start and is named.
The type check, the design lint and the gate (32 of 32 rules) pass, and 271 tests across the migrate, terminal-migrate, design, door, README, phone-target and component suites pass. Suites that need a port or unix socket are skipped in this sandbox; the forge's check runs them.
[{"go":"/migrate","look":"a connected account's repository rows","expect":"each row starts with a tick box whose tappable area is 44px square; under the list only the Migrate selected button, no muted note"},
{"go":"/migrate","look":"tick one repository and press Migrate selected","expect":"the browser tab title and the heading both read 'Migrating 1 repository'"},
{"go":"/migrate","look":"the page at 360px wide","expect":"tapping anywhere in a row's tick area toggles the box"}]
🤖 Generated with Claude Code
Each repository row on
/migratenow has a tick box, and each account's panel has one Migrate selected button. The new test filetest/migrate-multi.test.tspasses, as do the existing migrate-page, layout and origins tests.tsc, design-lint and the gate are clean. I did not run the full suite.name="picks", valuepickValue) submit with the existing migrate form. The batch starter is in the newsrc/web/migrate-multi.ts, called frommigrateSubmitinsrc/web/pages/migrate.ts. Each ticked repository goes throughmigrateRepo, the same call a single pick uses, so validation and the repository limit are the same. Each repository keeps its own name. Owner, crew, visibility and "after" come from the Destination block and apply to all.readForm.Choices to check:
docs/features/migrate-selected.md(indexed automatically). I added no line toREADME.md. That file says the terminal's migrate gets the same sort, preview and multi-pick later, in its own issue. That deviates from the issue's README item.src/web/pages/, because the both-doors rule would otherwise demand a terminal screen for it.lookslist reaches it. The commit says "No look" with that reason.Try it: Open
/migrateon the preview, open a connected account, tick two or three rows and press Migrate selected. Then ask for more than 20 to see the refusal.Closes #6408