Skip to content

Load session metadata before note content#5789

Merged
ComputelessComputer merged 1 commit into
mainfrom
fix/session-sidebar-startup-hydration
Jun 26, 2026
Merged

Load session metadata before note content#5789
ComputelessComputer merged 1 commit into
mainfrom
fix/session-sidebar-startup-hydration

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Start session persistence with metadata-only scans.
  • Hydrate full session content lazily when a note opens.
  • Add focused hydration and load coverage.

Note

Medium Risk
Changes session load/save timing and memo deletion rules; wrong hydration or deleteEmptyMemos logic could cause missing notes or stale content, though behavior is covered by new tests.

Overview
Startup and persistence now load only session _meta.json into TinyBase; transcripts and markdown are no longer scanned on initial loadAll.

Opening a session triggers hydrateSessionContent, which loads that session’s files via loadSingleSession and 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.md when raw_md actually changed (or on full saves), so metadata-only updates (e.g. folder moves) no longer wipe memo files while raw_md is 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.

@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit 0d5b805
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a3eb11f00e7820008e0bd0d

Comment thread apps/desktop/src/store/tinybase/persister/session/persister.ts
Comment thread apps/desktop/src/session/index.tsx
@ComputelessComputer ComputelessComputer force-pushed the fix/session-sidebar-startup-hydration branch from 6e2705e to 055c347 Compare June 26, 2026 16:59

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread apps/desktop/src/session/index.tsx
Start the session persister with metadata-only scans and hydrate full session content lazily when a note opens.
@ComputelessComputer ComputelessComputer force-pushed the fix/session-sidebar-startup-hydration branch from 055c347 to 0d5b805 Compare June 26, 2026 17:04
@ComputelessComputer ComputelessComputer merged commit 5738b3c into main Jun 26, 2026
17 checks passed
@ComputelessComputer ComputelessComputer deleted the fix/session-sidebar-startup-hydration branch June 26, 2026 18:23
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