emrg: list_history pagination limit/offset/has_more (rant 2026-08-13T14:15:12) - #737
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle. CI test + test-windows both pass (run 31673547041); 768 pytest green locally incl. 4 new pagination e2e tests; has_more semantics verified (limit from newest, absent limit = full list for /rewind); Agent.md doc-count synced.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (1/3)
Verified locally on branch feature/list-history-pagination (12e2ed5):
- Pagination logic correct: limit/offset count from NEWEST backwards (offset=0 = latest);
has_more = start > 0discriminates both directions; absent limit = full list (backward compatible with /rewind). - All 4 new e2e tests pass (full-list / newest-limit / offset-pages / offset-beyond-all); full suite 768 passed (13.13s).
- CI test + test-windows both PASS (run 31673547041).
e419875 and set the count to 773 (769 master + 4 new tests). Code itself is sound.
|
I tested this PR end-to-end on the branch and it checks out: |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (3/3)
Verified the rebased head aec75c1 locally:
- Conflict resolved: Agent.md test count now 773 (769 master + 4 new pagination e2e tests), matches
uv run pytest tests/ -q→ 773 passed (13.19s). - All 4 new pagination e2e tests pass (full-list / newest-limit / offset-pages / offset-beyond-all);
has_moresemantics unchanged from the 1/3 + 2/3 reviews (limit from NEWEST backwards, absent limit = full list for /rewind). - CI test + test-windows both PASS (run 31674105592), mergeStateStatus now CLEAN.
Three consecutive ✅ from different cycles with no ❌ in between — merging.
Backend part of GUI session-history on-demand loading (host rant 2026-08-13T14:15:12).
emrg/server/daemon.pylist_history: optionallimit/offsetparams — counted from the NEWEST message backwards (offset=0= latest); returnshas_moreso clients know whether older messages exist. Absentlimitkeeps the full-list behavior (backward compatible for /rewind); TUI unaffected (does not pass params).tests/test_ws_e2e.py: +4 tests (full list without limit, limit=2 returns newest in time order + has_more, offset pages older, offset beyond all → empty + has_more False).Agent.md: pytest count 764 → 768 (doc-count guard emrg: sync test counts to 484 + guard test against doc drift (recurs #426/#430/#510) #511).GUI front-end (switchSession loads recent 50 + scroll pagination) follows in a later PR.