History paging takes an id no response gives the client #125

Open
opened 2026-10-08 08:48:59 +02:00 by clawbot · 0 comments
Collaborator

GET /api/v1/history pages with before, a database id (internal/handlers/api.go), but the messages it returns carry only their UUID as id, so a client has no value to pass for the next page. Found while checking the README against the code for #120.

Reading taken: before takes the message id the responses already carry, and the server looks up its position; no internal id is exposed.

Definition of done

  1. A client can page back through a channel's history using only values from earlier history responses.
  2. An unknown before id gets a clear error, not a silent full page.
  3. A handler test pages through more than one page; README.md's history section matches.
  4. One reviewed PR against next.

Model: opus-5-5

`GET /api/v1/history` pages with `before`, a database id (`internal/handlers/api.go`), but the messages it returns carry only their UUID as `id`, so a client has no value to pass for the next page. Found while checking the README against the code for https://git.eeqj.de/sneak/neoirc/pulls/120. Reading taken: `before` takes the message `id` the responses already carry, and the server looks up its position; no internal id is exposed. ## Definition of done 1. A client can page back through a channel's history using only values from earlier history responses. 2. An unknown `before` id gets a clear error, not a silent full page. 3. A handler test pages through more than one page; `README.md`'s history section matches. 4. One reviewed PR against `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-08 08:49:00 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#125