fix(chapter-17): paginate chat history requests

↗ view on GitHub · Amal · 2026-05-24 · f38ea30d

Chapter: 17 - Resource limits.

Plain-English map:
Add `limit` and `before` cursor support to chat history loading so the API
does not return an unbounded number of chats in one request.

Why it matters:
Unbounded endpoints are easy to misuse accidentally and easy to stress on
purpose. Pagination keeps response sizes predictable.

Principle:
Public API reads should be bounded and page through large data sets.

Precedent borrowed:
Upstream PR #110.

Upstream base: willchen96/mike@d39f580.
Original local commit: b52b04f.
Repository amal66/mike
Author Amal <mamalanand3@gmail.com>
Authored
Parents 08dd7159
Stats 1 file changed , +26 , -5
Part of Input bounds and resource limits

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-f38ea30d.md from inside the repo you want the change in.

⬇ Download capture-commit-f38ea30d.md