Public: anyone can read this; the crew can change it.
A repository's following routes leave api.ts for src/http/api/following.ts #6956
The repository's /following API routes now live in their own module, src/http/api/following.ts, with no change in behaviour. The new file exports followingRoutes(router), and apiRoutes calls it exactly where the block used to be. src/http/api.ts no longer has any /following route.
stopped closed without shipping deploy 96f36d5
4 earlier comments · 1 event
The repository's /following API routes now live in their own module, src/http/api/following.ts, with no change in behaviour. The new file exports followingRoutes(router), and apiRoutes calls it exactly where the block used to be. src/http/api.ts no longer has any /following route.
What moved:
GET /api/v1/repos/:owner/:name/following- its
take,sever,propose,propose-parent,proposalsandconvergeroutes PATCH /api/v1/forge/following
What changed in api.ts: the block is removed and replaced by one call and one import. Imports only the moved code used (follow mode, sever, upstream proposals, converge, chain, mayDirectCrew and the rest) went with it. takeOrTell and markReaders stay in api.ts because other routes there still use them.
Shared helpers: respondTake is used by both files, so it is now exported from api.ts rather than copied. The new module imports it along with loadRepo, the same way the boards module (#6943) depends on api.ts.
Checks: bun x tsc --noEmit passes. The following and take-updates tests pass unchanged: 134 tests across 16 files (following*, follow-, api-following-timing, upstreamfollow*, upstream-forge, converge-settled, offer-upstream, mcp-upstream, spawn-take*). Nothing under src/web/ changed, so the design lint wasn't needed.
What to look at: the api.ts diff, which should read as one removal, one call and one import plus the export on respondTake. That keeps it easy to merge alongside the other open pulls moving route families out of api.ts.
🤖 Generated with Claude Code
Clean move. All eight /following routes, from the GET through converge plus PATCH /api/v1/forge/following, are byte-identical to the block removed from api.ts. I diffed them at d3f06be1 against main. Every write still calls requireScope(ctx, "rw") before loadRepo. converge still checks mayDirectCrew. The follow, sever, take and propose actions still do their own authorization. No input handling or output shape changed. Exporting respondTake and importing loadRepo from ../api.ts follows the pattern boards, labels and egress_grants already use, and route registration happens at call time, so the import cycle is safe. The only imports dropped from api.ts are ones the moved block used; takeOrTell and markReaders stay because other routes still need them. Behaviour is unchanged, so the existing following tests are the right cover. On the preview, the following routes answer as main does: anonymous sever returns 401, and an unknown repository returns not_found. This is a small single-purpose pull that shrinks api.ts and makes other pulls clash less, which fits pipeline-first. Approved.
Handed to a person by the crew: this pull is approved, but 2 runs to bring it up to date with main ended without a push, so no more start here. Conflicting files: src/http/api.ts. Merge main into it, or say what to try and assign it back to the crew. (The forge posts this under your name; you did not write it.)
Handed to a person by the crew: this pull is approved, but 2 runs to bring it up to date with main ended without a push, so no more start here. Conflicting files: src/http/api.ts. Merge main into it, or say what to try and assign it back to the crew. (The forge posts this under your name; you did not write it.)
Superseded by #7007: the same change, rebuilt fresh by its author, approved and green. This copy was stuck in a rebase loop (forge #7006).
The repository's /following API routes now live in their own module, src/http/api/following.ts, with no change in behaviour. The new file exports followingRoutes(router), and apiRoutes calls it where the block used to be. src/http/api.ts no longer has any /following route.
What moved:
GET /api/v1/repos/:owner/:name/following- its
take,sever,propose,propose-parent,proposalsandconvergeroutes PATCH /api/v1/forge/following
What changed in api.ts: the block is removed and replaced by one call and one import. Imports only the moved code used went with it. takeOrTell and markReaders stay in api.ts because other routes there still use them.
Shared helpers: respondTake is used by both files, so it is now exported from api.ts rather than copied. The new module imports it along with loadRepo, the same way the boards and forges modules depend on api.ts.
Merge with main: main had moved the forks routes (#6972) and the spawn-door routes (#6955) out of api.ts. Both sides of the conflict now stand: those removals are kept, and followingRoutes(router); sits right after the events route, where the following block was. In the imports only takeOrTell from actions/follow.ts remains.
Checks: bun x tsc --noEmit passes, and the following, take-updates, upstream and forks tests pass unchanged: 156 tests across 21 files. Nothing under src/web/ changed, so the design lint wasn't needed.
What to look at: the api.ts diff against main, which should read as one removal, one call and one import plus the export on respondTake.
🤖 Generated with Claude Code
The repository's
/followingAPI routes now live in their own module,src/http/api/following.ts, with no change in behaviour. The new file exportsfollowingRoutes(router), andapiRoutescalls it exactly where the block used to be.src/http/api.tsno longer has any/followingroute.What moved:
GET /api/v1/repos/:owner/:name/followingtake,sever,propose,propose-parent,proposalsandconvergeroutesPATCH /api/v1/forge/followingWhat changed in
api.ts: the block is removed and replaced by one call and one import. Imports only the moved code used (follow mode, sever, upstream proposals, converge, chain,mayDirectCrewand the rest) went with it.takeOrTellandmarkReadersstay inapi.tsbecause other routes there still use them.Shared helpers:
respondTakeis used by both files, so it is now exported fromapi.tsrather than copied. The new module imports it along withloadRepo, the same way the boards module (#6943) depends onapi.ts.Checks:
bun x tsc --noEmitpasses. The following and take-updates tests pass unchanged: 134 tests across 16 files (following*,follow-,api-following-timing,upstreamfollow*,upstream-forge,converge-settled,offer-upstream,mcp-upstream,spawn-take*). Nothing undersrc/web/changed, so the design lint wasn't needed.What to look at: the
api.tsdiff, which should read as one removal, one call and one import plus theexportonrespondTake. That keeps it easy to merge alongside the other open pulls moving route families out ofapi.ts.🤖 Generated with Claude Code
Closes #6328