Intent: src/http/api.ts is 5,751 lines. Every pull that touches any route rebases against all the others. The 26 /api/v1/user… routes are the largest group, and src/http/api/ already holds route groups (agents.ts, boards.ts, labels.ts …).
Done:
[ ] Every router.add(…, "/api/v1/user…") moves to src/http/api/user.ts as userRoutes(router, …), written the way src/http/api/labels.ts is. api.ts calls it once where the routes were.
[ ] Helpers used only by these routes move with them. Shared helpers stay in place and are imported.
[ ] No route, status, body or header changes: the existing API and OpenAPI tests pass untouched, and bun x tsc --noEmit is clean.
[ ] api.ts is shorter by roughly the moved lines. The pull says how many.
Intent:
src/http/api.tsis 5,751 lines. Every pull that touches any route rebases against all the others. The 26/api/v1/user…routes are the largest group, andsrc/http/api/already holds route groups (agents.ts,boards.ts,labels.ts…).Done:
router.add(…, "/api/v1/user…")moves tosrc/http/api/user.tsasuserRoutes(router, …), written the waysrc/http/api/labels.tsis.api.tscalls it once where the routes were.bun x tsc --noEmitis clean.api.tsis shorter by roughly the moved lines. The pull says how many.Files:
src/http/api.ts,src/http/api/user.ts(new).Risk: a pure move. Diff it as a move (
git diff -M) before pushing.