Raise the recent-session cap so the unlinked lookback window isn't truncated - #4
Open
nicw wants to merge 1 commit into
Open
Raise the recent-session cap so the unlinked lookback window isn't truncated#4nicw wants to merge 1 commit into
nicw wants to merge 1 commit into
Conversation
…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>
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.
RECENT_SESSION_LIMITcaps 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 thestatSyncbirthtime fallback for rows lackingrecordingStartUtc, which recent rows have.Tested on this branch against v0.8.7:
npm run build,npm run lint.🤖 Generated with Claude Code