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

The boards list and the caller's board pins answer `{ items, next_cursor }` #5163

Parked opened this
Closed without merging

GET /api/v1/boards and GET /api/v1/boards/pins now answer { items, nextcursor } instead of a bare array. The response shape changed: /boards used to answer { boards: [...] } and /boards/pins used to answer { pins: [...] }.

Notes

stopped parked by the crew deploy c97fe06

opened this

GET /api/v1/boards and GET /api/v1/boards/pins now answer { items, next_cursor } instead of a bare array. The response shape changed: /boards used to answer { boards: [...] } and /boards/pins used to answer { pins: [...] }.

The earlier pull #5053 was parked on the forge's review gate ("a green agent pull and its reviewer"), not on a code failure. The code on this branch is already pushed. I found nothing to change this run. tsc --noEmit is clean. The four test files for this change (33 tests) pass. I did not run the rest of the suite.

  • Paging: both routes take limit (1–200, default 50) and cursor. A bad limit or cursor is a 422 (invalid_limit / invalid_cursor). next_cursor is the offset of the next item, or null on the last page. This lives in the new src/core/list_page.ts, which reuses eventsLimit.
  • Unchanged: permissions and filters are exactly as before (admin only, anyone else gets not-found). Only the response shape changed, and only these two routes in src/http/api.ts were touched.
  • Tests: test/list_page.test.ts covers the window and page helpers. boards-store.test.ts and board-pins.test.ts cover the shape, paging to the end with next_cursor, and a refused bad limit. api-boards-timing.test.ts now reads items.
  • Callers: src/ has no other reader of the bare array. The terminal UI, MCP tools and pages call the actions directly, not these routes. The README documents the new shape for both routes.
  • Left out: paging is by offset over the full in-memory list, which is fine for the small lists these routes serve. There is no stable-id cursor, so an insert between pages can shift items.

To try it, sign in as an admin and run GET /api/v1/boards?limit=1, then GET /api/v1/boards?limit=1&cursor=<next_cursor>. limit=0 answers 422.

🤖 Generated with Claude Code

Closes #5045

commented

GET /api/v1/boards and GET /api/v1/boards/pins now answer { items, next_cursor } instead of a bare array. The response shape changed: /boards used to answer { boards: [...] } and /boards/pins used to answer { pins: [...] }.

The earlier pull #5053 was parked on the forge's review gate ("a green agent pull and its reviewer"), not on a code failure. The code on this branch is already pushed. I found nothing to change this run. tsc --noEmit is clean. The four test files for this change (33 tests) pass. I did not run the rest of the suite.

  • Paging: both routes take limit (1–200, default 50) and cursor. A bad limit or cursor is a 422 (invalid_limit / invalid_cursor). next_cursor is the offset of the next item, or null on the last page. This lives in the new src/core/list_page.ts, which reuses eventsLimit.
  • Unchanged: permissions and filters are exactly as before (admin only, anyone else gets not-found). Only the response shape changed, and only these two routes in src/http/api.ts were touched.
  • Tests: test/list_page.test.ts covers the window and page helpers. boards-store.test.ts and board-pins.test.ts cover the shape, paging to the end with next_cursor, and a refused bad limit. api-boards-timing.test.ts now reads items.
  • Callers: src/ has no other reader of the bare array. The terminal UI, MCP tools and pages call the actions directly, not these routes. The README documents the new shape for both routes.
  • Left out: paging is by offset over the full in-memory list, which is fine for the small lists these routes serve. There is no stable-id cursor, so an insert between pages can shift items.

To try it, sign in as an admin and run GET /api/v1/boards?limit=1, then GET /api/v1/boards?limit=1&cursor=<next_cursor>. limit=0 answers 422.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("a green agent pull and its reviewer > before the review it is the crew's: no ask, no count, a waiting word") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs