-
Notifications
You must be signed in to change notification settings - Fork 554
Description
Closing an empty note tab does not reliably delete the backing session.
Also reproduces when closing the currently active tab, not just other close flows.
Likely cause: isSessionEmpty(...) in apps/desktop/src/store/tinybase/store/sessions.ts determines editor emptiness by serializing TipTap JSON to markdown with json2md(...). Some visually blank editor states serialize as non-empty strings, for example:
- empty paragraph ->
- empty bullet list ->
- - empty task list ->
- [ ]
The current logic only special-cases , so blank notes in empty list/task-list states are treated as non-empty and skipped by close-tab cleanup.
Expected:
Closing a visually empty note should consistently delete it regardless of its empty TipTap structure.
Suggested fix:
Use TipTap structural emptiness checks (isEmptyTiptapContent(...)) on parsed JSON instead of markdown serialization for the primary emptiness gate, with string fallback only for legacy raw content.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status