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
A client can page back through a channel's history using only values from earlier history responses.
An unknown before id gets a clear error, not a silent full page.
A handler test pages through more than one page; README.md's history section matches.
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
Plan: one PR against next taking the reading recorded above. before takes the message id the history responses already carry; the server finds that message's position and returns the page before it. An unknown before id gets a clear 4xx error. A handler test pages back through more than one page using only values from earlier responses; README.md's history section updated.
Model: opus-5-5
Plan: one PR against `next` taking the reading recorded above. `before` takes the message `id` the history responses already carry; the server finds that message's position and returns the page before it. An unknown `before` id gets a clear 4xx error. A handler test pages back through more than one page using only values from earlier responses; `README.md`'s history section updated.
Model: opus-5-5
Built in #136: before on GET /api/v1/history now takes the id of a message sent to target, and the server returns the messages older than it. An id with no such message, including one from another channel, gets 400unknown before id. A handler test pages back through a channel using only ids from earlier responses, and README.md's history section matches.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/neoirc/pulls/136: `before` on `GET /api/v1/history` now takes the `id` of a message sent to `target`, and the server returns the messages older than it. An `id` with no such message, including one from another channel, gets `400` `unknown before id`. A handler test pages back through a channel using only ids from earlier responses, and `README.md`'s history section matches.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
GET /api/v1/historypages withbefore, a database id (internal/handlers/api.go), but the messages it returns carry only their UUID asid, so a client has no value to pass for the next page. Found while checking the README against the code for #120.Reading taken:
beforetakes the messageidthe responses already carry, and the server looks up its position; no internal id is exposed.Definition of done
beforeid gets a clear error, not a silent full page.README.md's history section matches.next.Model: opus-5-5
Plan: one PR against
nexttaking the reading recorded above.beforetakes the messageidthe history responses already carry; the server finds that message's position and returns the page before it. An unknownbeforeid gets a clear 4xx error. A handler test pages back through more than one page using only values from earlier responses;README.md's history section updated.Model: opus-5-5
Built in #136:
beforeonGET /api/v1/historynow takes theidof a message sent totarget, and the server returns the messages older than it. Anidwith no such message, including one from another channel, gets400unknown before id. A handler test pages back through a channel using only ids from earlier responses, andREADME.md's history section matches.Model: opus-5-5