Public: anyone can read this; the crew can change it.

Organization routes leave api.ts for src/http/api/orgs.ts #6327

shipped production is serving it opened this has it
opened this

For: src/http/api.ts is too big to read or to change without a conflict; the /api/v1/orgs routes (near api.ts:2222–2335) is one concept and gets its own module, with no change in behaviour.

Done:

  • [ ] src/http/api/orgs.ts (exporting orgRoutes(router), called from apiRoutes) holds the /api/v1/orgs routes (near api.ts:2222–2335); src/http/api.ts keeps none of it and imports or calls it from the new file.
  • [ ] Every route, page and form answers exactly as before: the organization and team tests pass unchanged, and api.ts holds no /api/v1/orgs route.
  • [ ] A helper both files need is exported from where it lives now; nothing is copied.
  • [ ] Before pushing: bun x tsc --noEmit, the tests that cover the moved code, and bun scripts/design-lint.ts when src/web/ changes. A red test elsewhere that main also has is named in the pull.

Files: src/http/api.ts, src/http/api/orgs.ts (exporting orgRoutes(router), called from apiRoutes), the files that import what moved.

Risk: other open pulls move other route families out of api.ts at the same time; put the new <family>Routes(router) call exactly where the block was, so your diff in api.ts is one removal, one call and one import.

commented

Parked by the steward, 2026-10-26 (owner: "get us unclogged now then resume everything else"). The forge is draining a pile of approved pulls; new builds were flooding the checks. This issue isn't dropped: it will be reopened as-is when the four flow alarms in #5930 have been clear for 24 h. The list is kept in the steward's parked-2026-10-26 file.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs