Skip to content

Conversation

@tommybananas
Copy link
Contributor

What

Fix imsg history (and RPC messages.history) so --start/--end/--participants are applied in SQL before LIMIT.

Why

Previously the tool would fetch the newest N messages, then filter in-memory, so older time windows could return no results unless --limit was inflated.

How to verify

  • make test
  • Example: imsg history --chat-id <id> --start <older-window> --end <older-window-end> --limit 50 now returns results even when the window is outside the newest 50 messages.

steipete and others added 3 commits January 16, 2026 21:18
Apply --start/--end/--participants in SQL so LIMIT applies after filtering (CLI history + RPC messages.history). Add regressions proving filtered windows work with small limits.
@steipete steipete force-pushed the fix/history-filters-before-limit branch from 3285fbc to 0fb6e59 Compare January 16, 2026 21:21
@steipete steipete merged commit 40e2084 into steipete:main Jan 16, 2026
@steipete
Copy link
Owner

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test (fails: no package.json); make lint && make build && make test\n- Land commit: 0fb6e59\n- Merge commit: 40e2084\n\nThanks @tommybananas!

micahbrich pushed a commit to micahbrich/imsg-plus that referenced this pull request Jan 30, 2026
micahbrich pushed a commit to micahbrich/imsg-plus that referenced this pull request Jan 30, 2026
…before-limit

fix: apply history filters before limit
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.

2 participants