fix: make the full activity history queryable (server-side pagination) - #82
Merged
Conversation
The activity UI could only ever see the most recent events because GET /api/v1/events had no way to page beyond the limit window and reported the page length as total. Add limit/offset pagination with a stable (received_at, id) ordering, a matching event count, and server-side status/agent filters next to the existing connector filter, so the full event history becomes queryable.
The activity page fetched only the 100 most recent events and paginated them client-side, so anything older was unreachable. Request one page at a time via limit/offset instead, drive the pager from the server-reported total, and move the status/connector/agent filters to the API so they apply across the whole history (outcome and free-text search stay page-local, as they depend on invocation state and resolved names). Also collapse the pager into a window around the current page for long page ranges instead of rendering one button per page.
DominikPinsel
added a commit
that referenced
this pull request
Aug 12, 2026
Resolve merge conflicts by integrating the PR's SubjectFilter feature into main's new EventFilter/QueryEvents/CountEvents architecture (PR #82): - store.go: keep SubjectFilter/ParseSubjectFilter/Matches from the PR; add Subject field to EventFilter; apply subject filter in conditions() so both QueryEvents and RecentEvents honor it; RecentEvents keeps its 5-param signature and delegates to QueryEvents with the Subject set. - handlers_events.go: use main's QueryEvents with EventFilter (the listEvents endpoint does not use subject filtering). - handlers_eventqueue.go: auto-merged, calls the 5-param RecentEvents.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Activity page (
/activity) fetched only the 100 most recent events and paginated/fitered them client-side. Anything older than the newest 100 events was unreachable —?page=5etc. only scrolled within the same 100-row window, and the API'stotalwas just the page length.Changes
Hub (
GET /api/v1/events)offsetparameter alongsidelimit(capped at 500 per page), with stable(received_at DESC, id DESC)ordering so pages don't shift on timestamp ties.totalnow reports the number of all events matching the filters.status(matched/unmatched/error, derived fromagent_tasks) andagent; existingconnector/sinceunchanged.QueryEvents/CountEventswith a sharedEventFilter;RecentEventskept as a thin wrapper (other callers unchanged).Frontend (Activity page)
limit/offset; the pager is driven by the server total, so the entire history is reachable.Testing
offset/status→ 400. Fullinternal/api+internal/eventqueuesuites pass.listEventsPage. All 585 frontend tests pass;tsc -bandeslint --max-warnings=0clean.Note
The deployment at
/ainsel-devneeds the hub-backend and frontend images rebuilt frommainafter merge to take effect.