-
-
Notifications
You must be signed in to change notification settings - Fork 316
Honeycrisp: notes reset to "Untitled / No content" after logout + browser restart #1590
Description
Bug Description
Bug:
Notes in honeycrisp reset to “Untitled / No content” after logout and browser restart. The first auto-selected note resets immediately; other notes reset when clicked. Body content is not permanently lost on the server—it merges back if you type into the empty editor—but the table row metadata (title, preview, word count) is overwritten with empty values permanently.
Expected behavior:
All notes retain their title, preview, and body content after logout + re-login.
Steps to reproduce:
- Log in to Honeycrisp, create 3 notes with distinct titles and body content
- Log out
- Quit the browser
- Reopen the browser, log in
- First note shows “Untitled / No content”; clicking the others resets them too
Additional context:
Editor.svelte:127-130 fires extractTitleAndPreview(ed) immediately on mount, before the content doc’s WebSocket sync has delivered data. The sync extension’s whenReady resolves after provider.connect() is called, not after the handshake completes—so the editor sees an empty Y.XmlFragment and writes { title: '', preview: '', wordCount: 0 } to the table row. LWW semantics make the empty write permanent.
Fix: remove lines 127-130. The onUpdate handler at line 104-106 already fires when content arrives from sync.
Open question: content doc IndexedDBs survive clearLocalData(), so y-indexeddb should load cached body content before the editor mounts. The bug was reproduced on a repeat login in the same browser, suggesting either the IDB write debounce (1s) didn’t flush before quit, or something in the logout sequence affects content doc persistence. This doesn’t change the fix—the initial extraction is wrong regardless.
After edit blank notes from above (simply edited each note to "A", "B", "C")

Platform
Web
Affected Component
Sync (sync server/client)
Epicenter Version
n/a
Severity
Critical (application unusable or data loss)
Discord Link
https://discord.com/channels/1391098486178582549/1403145437434745044/1489585248814633122
Checklist
- I have searched existing issues to ensure this hasn't been reported


