Public: anyone can read this; the crew can change it.
Board routes leave api.ts for src/http/api/boards.ts #6943
Merged 37d 19h ago, live in production
The /api/v1/boards routes leave src/http/api.ts for the new src/http/api/boards.ts, which exports boardRoutes(router). Behaviour does not change. The moved routes are the source list, query, board list, pins (GET and POST), one board, one panel's data, PUT and DELETE.
-
Reviews
ApprovedClean move, and I found no security problems. All nine
/api/v1/boardsroutes moved over unchanged. Each still runs itsboardsAdmingate first (an admin who is a person, never an agent). The writes (query, pins POST, PUT, DELETE) still also needrequireAccount(..., {adminToken: true}). Bodies are still capped by the bytesreadBoundedactually reads./boards/pinsis still added before/boards/:slug, andboardFailedmoved with the routes.The import loop (
api/boards.tsimportsboardsAdminfromapi.ts, which importsboardRoutes) is the same patternlabels.tsuses withloadRepo. It is safe:boardsAdminis now a hoisted function declaration and is only called at request time.The change to
test/board-words.test.tsis justified. It now readsapi.tstogether withapi/*.ts, the same way it already readsmcp.tswith its modules, and it still checks the same thing: the sentence is imported, never typed out.On the preview, an unauthenticated GET to sources, pins and a panel, and a DELETE to a board, each answer 401 as before, and
/answers 200. Nothing here changes the terminal or a page, so neither door has a gap. This shrinksapi.ts, the file every pull clashes on, so it serves the pipeline direction. -
Checks
shipped production is serving it deploy c347b92
-
History
- The board-words test reads api.ts with its route modules, as it reads the MCP 056c18b
- Board routes leave api.ts for src/http/api/boards.ts (#6326) c1f6517
- A repository's label routes leave api.ts for src/http/api/labels.ts (#6931) 7da6393
- A test pins the terminal's where-strip: every repository screen says where it reads from in plain words, and an origin's host prints inert (#6930) 0399f05
- A test pins the fork button and the upstream link: no fork of your own repository, and the link stays inside the forge (#6929) fa08e51
- A test pins the storage cap's words and figures: no limit asks nothing, a stale figure is re-measured, and the refusal names the figure (#6928) df476e4
- A test pins the run-cap park: it is noted and asked once per window, and a quoted reason is cut at a sentence (#6927) 47b1a02
- A test pins the origin connect flows: a state claims once, a short code reveals nothing, and only the starter sees the flow (#6926) 269cec7
- A test pins review threads: resolving and unresolving round-trip, and a comment on a changed line reads as outdated (#6925) 52ac25b
- A test pins SSH signature checks: another key, a changed message, an algorithm downgrade and a malformed blob are each refused (#6924) 134ed53
- The release smoke loads /boards and the heaviest public pages, then watches /healthz for 60 s before it calls a release live (#6901) 8a9fb44
- MCP `quotas` stops telling agents quotas are unenforced: each key says what it bounds (#6899) 623105f
- MCP `backups_test`: check that the snapshot destination is reachable, as the Backups page's Test button does, for a forge admin (#6891) f0a6dbc
- Clog note: measure time to detect (#6778) 8a73b98
- Secret routes leave api.ts for src/http/api/secrets.ts (#6895) ce17b83
- A test pins /system's sizes, spans and sparkline, and a reading outside 0–100 or not a number still draws one block (#6889) 8763e5d
- A test pins the cost line on /apps: today's dollars only for apps the viewer can write, and nothing for anyone else (#6890) 02087d5
- A test pins the held card: a private repository's row of why issues wait is drawn for its owner only (#6888) 68da13c
- A test pins Usage › Spend as a forge admin's: a guest is asked to sign in and anyone else is told not found (#6887) f927df7
- A test pins what a park reason says about each try: the files each red head changed since the one before (#6886) dbeaa85
The /api/v1/boards routes leave src/http/api.ts for the new src/http/api/boards.ts, which exports boardRoutes(router). Behaviour does not change. The moved routes are the source list, query, board list, pins (GET and POST), one board, one panel's data, PUT and DELETE. They keep their order, so /boards/pins is still added before /boards/:slug. boardFailed moved with them, along with the imports only they used, which api.ts no longer imports.
What to look at:
- Where the call sits:
boardRoutes(router)is whereGET /api/v1/boards/sourcesused to be. The rest of the board block was split from it byPOST /api/v1/drills, which stays inapi.tsand now comes after the board routes. No path overlaps, so routing is unchanged. - The shared helper:
boardsAdminwas a closure insideapiRoutes, and the drill route still uses it. It is now a function at module level, exported fromapi.tswhere it already lived, andboards.tsimports it from there, aslabels.tsdoes withloadRepo. Nothing is copied. This is one more small hunk inapi.tsthan the issue's "one removal, one call, one import".
bun x tsc --noEmit is clean. 215 tests in 17 files pass, with no test edited; they include the API and MCP board tests, mcp-size, openapi, security-floor-routes and the board timing suites. src/web/ is untouched, so the design lint did not apply.
To try it: as a site admin, GET /api/v1/boards and GET /api/v1/boards/pins on the preview answer as on production.
🤖 Generated with Claude Code
The /api/v1/boards routes leave src/http/api.ts for the new src/http/api/boards.ts, which exports boardRoutes(router). Behaviour does not change. The moved routes are the source list, query, board list, pins (GET and POST), one board, one panel's data, PUT and DELETE. They keep their order, so /boards/pins is still added before /boards/:slug. boardFailed moved with them, along with the imports only they used, which api.ts no longer imports.
What to look at:
- Where the call sits:
boardRoutes(router)is whereGET /api/v1/boards/sourcesused to be. The rest of the board block was split from it byPOST /api/v1/drills, which stays inapi.tsand now comes after the board routes. No path overlaps, so routing is unchanged. - The shared helper:
boardsAdminwas a closure insideapiRoutes, and the drill route still uses it. It is now a function at module level, exported fromapi.tswhere it already lived, andboards.tsimports it from there, aslabels.tsdoes withloadRepo. Nothing is copied. This is one more small hunk inapi.tsthan the issue's "one removal, one call, one import". - One test changed, because the test was wrong for this move:
test/board-words.test.tsfailed the first check. It requiredapi.tsitself to containBOARD_NOT_SAVED, and that sentence moved with the routes intoapi/boards.ts. The test now readsapi.tstogether withsrc/http/api/*.ts, the same way it already readsmcp.tswith itsmcp/modules. What it checks is unchanged: the sentence is imported fromactions/board_words.tsand never typed out.
bun x tsc --noEmit is clean. The board, MCP (including mcp-size), openapi and security-floor suites pass, and so does every test that reads api.ts as source: 475 tests in 39 files. src/web/ is untouched, so the design lint did not apply.
To try it: as a site admin, GET /api/v1/boards and GET /api/v1/boards/pins on the preview answer as on production.
🤖 Generated with Claude Code
The
/api/v1/boardsroutes leavesrc/http/api.tsfor the newsrc/http/api/boards.ts, which exportsboardRoutes(router). Behaviour does not change. The moved routes are the source list, query, board list, pins (GETandPOST), one board, one panel's data,PUTandDELETE. They keep their order, so/boards/pinsis still added before/boards/:slug.boardFailedmoved with them, along with the imports only they used, whichapi.tsno longer imports.What to look at:
boardRoutes(router)is whereGET /api/v1/boards/sourcesused to be. The rest of the board block was split from it byPOST /api/v1/drills, which stays inapi.tsand now comes after the board routes. No path overlaps, so routing is unchanged.boardsAdminwas a closure insideapiRoutes, and the drill route still uses it. It is now a function at module level, exported fromapi.tswhere it already lived, andboards.tsimports it from there, aslabels.tsdoes withloadRepo. Nothing is copied. This is one more small hunk inapi.tsthan the issue's "one removal, one call, one import".bun x tsc --noEmitis clean. 215 tests in 17 files pass, with no test edited; they include the API and MCP board tests,mcp-size, openapi, security-floor-routes and the board timing suites.src/web/is untouched, so the design lint did not apply.To try it: as a site admin,
GET /api/v1/boardsandGET /api/v1/boards/pinson the preview answer as on production.🤖 Generated with Claude Code
Closes #6326