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

GET /api/v1/admin/limits answers `{ items, next_cursor: null }` #5146

shipped production is serving it opened this has it
opened this

Intent: the admin's limits list reads like every other list. The other half of #5063, which was parked twice.

Done:

  • [ ] The GET /api/v1/admin/limits handler in src/http/api.ts answers json({ items: listed.value, next_cursor: null }). Change only the HTTP handler: listLimits in src/actions/limits.ts keeps its return value, because the MCP limits tool, the pages and the terminal call it directly. The first try changed the shared action and broke the forge over MCP > limits: admins only, dry by default, an admin-scope token to change in test/mcp.test.ts
  • [ ] Every caller of the HTTP route that reads its body reads items. Check the terminal screens (src/tui/screens/quotas.ts, src/tui/screens/invites.ts, src/tui/forge.ts) and each test from grep -rln 'admin/limits' test, and fix the ones that read the body
  • [ ] The OpenAPI row's summary for GET /api/v1/admin/limits says { items, next_cursor }
  • [ ] A test asserts the shape

Before pushing, run every file named above plus test/mcp.test.ts. A red test in a file this change does not touch: check whether main is red on it too and say so in the pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs