Skip to content

Return exact stable MCP timeline totals - #92

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
agent/mcp-timeline-total-fix
Aug 12, 2026
Merged

Return exact stable MCP timeline totals#92
sarthakagrawal927 merged 1 commit into
mainfrom
agent/mcp-timeline-total-fix

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

What changed

  • count PUBLIC timelines with the same optional search filter as the page query
  • return one exact total on every page
  • use a deterministic updated-time plus ID ordering
  • cover first, middle, and terminal pages with a regression test

Root cause

The route exposed a lower-bound estimate (offset + items.length + 1) as total, so the value grew as clients paginated.

Impact

MCP clients can calculate terminal offsets and follow continuation metadata without contradictory totals.

Validation

  • pnpm test — 483 passed
  • pnpm typecheck
  • pnpm lint (push hook)

Closes #91

@sarthakagrawal927
sarthakagrawal927 marked this pull request as ready for review August 12, 2026 08:01
@sarthakagrawal927
sarthakagrawal927 merged commit 223919b into main Aug 12, 2026
2 checks passed
@sarthakagrawal927
sarthakagrawal927 deleted the agent/mcp-timeline-total-fix branch August 12, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return stable exact totals from public MCP timelines

1 participant