Skip to content

Raise the recent-session cap so the unlinked lookback window isn't truncated - #4

Open
nicw wants to merge 1 commit into
dloomis:mainfrom
nicw:pr/lookback-session-cap
Open

Raise the recent-session cap so the unlinked lookback window isn't truncated#4
nicw wants to merge 1 commit into
dloomis:mainfrom
nicw:pr/lookback-session-cap

Conversation

@nicw

@nicw nicw commented Jul 30, 2026

Copy link
Copy Markdown

RECENT_SESSION_LIMIT caps the MacWhisper session query at 200 rows, and the cap is applied in SQL before the lookback age filter — so once more than 200 sessions exist inside the "Unlinked lookback" window, in-window recordings silently vanish from the unlinked list. Raising it to 1000 keeps the query cheap while comfortably covering the 30-day default for heavy recorders.

Alternative considered: a SQL-side date cutoff (WHERE dateCreated >= cutoff) would remove the cap/window interaction entirely — I went with the minimal bump, but happy to do the cutoff instead if you'd prefer. Per-row cost beyond parsing is only the statSync birthtime fallback for rows lacking recordingStartUtc, which recent rows have.

Tested on this branch against v0.8.7: npm run build, npm run lint.

🤖 Generated with Claude Code

…uncated

fetchSessionRows(RECENT_SESSION_LIMIT) applies the row cap in SQL before
findRecentSessions() filters by lookbackDays, so once more sessions than
the cap exist, older-but-in-window unlinked recordings are silently
dropped before the age check ever runs. Raise the cap from 200 to 1000
so the lookback window (default 30 days, user-configurable) isn't
truncated by session volume, and document the cap-before-filter ordering
at the constant.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant