Load session metadata before note content#5789
Merged
Merged
Conversation
✅ Deploy Preview for old-char canceled.
|
6e2705e to
055c347
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 055c347. Configure here.
Start the session persister with metadata-only scans and hydrate full session content lazily when a note opens.
055c347 to
0d5b805
Compare
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.

Summary
Note
Medium Risk
Changes session load/save timing and memo deletion rules; wrong hydration or
deleteEmptyMemoslogic could cause missing notes or stale content, though behavior is covered by new tests.Overview
Startup and persistence now load only session
_meta.jsoninto TinyBase; transcripts and markdown are no longer scanned on initialloadAll.Opening a session triggers
hydrateSessionContent, which loads that session’s files vialoadSingleSessionand merges them into the store without dropping other sessions. The note UI stays on a skeleton until hydration succeeds, with a 1s retry on failure and an in-memory cache so repeat opens skip reload.Saves only delete
_memo.mdwhenraw_mdactually changed (or on full saves), so metadata-only updates (e.g. folder moves) no longer wipe memo files whileraw_mdis still empty in the metadata-only store.Reviewed by Cursor Bugbot for commit 0d5b805. Bugbot is set up for automated code reviews on this repo. Configure here.