Skip to content

Keep Journal entry history responsive in large collections - #203

Merged
callumalpass merged 3 commits into
mainfrom
sprint-w4-journal-history
Nov 28, 2026
Merged

callumalpass merged 3 commits into
mainfrom
sprint-w4-journal-history

Conversation

@callumalpass

@callumalpass callumalpass commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Refs #168

Journal now shows up to 50 entries at a time with newer and older page controls. The date filter searches the sorted saved entries by local-day bounds. Local drafts still take precedence over their saved records, including at midnight. The picker reuses its date formatter, parses each saved entry timestamp once, and reuses an in-flight refresh when browsing.

Reproduce with npm ci and TZ=Australia/Melbourne npm run bench:history. These Vitest fixtures drive the actual picker in JSDOM with synthetic paginated SDK records. They measure app processing and DOM creation. Both sides of this comparison used SDK 0.2.58.

Daily entries Mounted buttons Mean unfiltered render Mean date-filter change Mean SDK page processing
1,000 1,000 → 50 487 → 25.6 ms 6.10 → 0.61 ms 0.93 → 0.84 ms
5,000 5,000 → 50 5,861 → 12.6 ms 12.17 → 0.38 ms 9.64 → 4.08 ms

On the current SDK 0.2.59 head, both fixtures still mount 50 buttons. For 5,000 entries, the optimized rerun measured 2.74 ms to render the unfiltered picker and 0.074 ms to change the date. Typecheck, the authenticated production build rehearsal, and all 12 navigation tests passed on that head.

@callumalpass
callumalpass merged commit 56432a1 into main Nov 28, 2026
1 check passed
@callumalpass
callumalpass deleted the sprint-w4-journal-history branch November 28, 2026 08:41
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