Untitled tabs silently lost on update; legacy savedTabsData session never migrated
Markpad version
2.7.6 (updated via the in-app updater today; previous version unknown, installed around May 2026)
How did you install it?
Windows, installer (Markpad_..._setup.exe, lives in Program Files)
OS and version
Windows 10 Home Single Language, 2009, build 26200 (as reported by the OS)
What happens, and what you expected instead
I had two unsaved untitled notes open with "restore state on reopen" enabled. They survived every restart for months. I updated through the in-app updater, Markpad relaunched, and both notes were gone. Only my one file-backed tab came back.
Expected: an update preserves my open tabs, or at minimum warns that untitled buffers will not survive it. What stings is that the data was right there. The previous build kept full tab buffers in WebView2 Local Storage under the savedTabsData key, and that record still exists on disk after the update. The new build just never reads it.
From reading the current source, the chain looks like this:
- The old session lived in localStorage as
savedTabsData, including untitled tabs with their fullrawContent. - The new session lives in
%APPDATA%\com.alecdotdev.markpad\window-state-v2.json, andserializeStateintabs.svelte.tskeeps paths only: it filters onhasRealFilePath(untitled tabs excluded) and never storesrawContentby design. restore()inwindowSession.svelte.tsreads the Rust file plus thewindowStateKey/legacyStateKeylocalStorage keys. Nothing readssavedTabsData, so on first launch after the update the untitled tabs have no path back into the UI.
So this is one user-facing loss with two halves: no migration of the legacy session on upgrade, and untitled buffers being RAM-only going forward (any updater restart kills them the same way).
I recovered my own notes by hand from the LevelDB files, so I need nothing back. Filing because the next person will not go spelunking through EBWebView\Default\Local Storage\leveldb to get their notes back.
Possible directions, for whatever they are worth: on first launch with no window-state-v2.json, fall back to savedTabsData if present and rehydrate untitled tabs from it (maybe flagged, so the user saves them somewhere real); longer term, persist untitled buffers the way the old build did, or warn before an updater restart when dirty untitled tabs exist.
Steps to reproduce
- On the older build with the localStorage session, open two untitled tabs, type something in each, leave "restore state on reopen" on.
- Update to 2.7.6 through the in-app updater.
- Relaunch: only file-backed tabs return. The untitled tabs are gone from the UI while
savedTabsDatastill sits in LevelDB.
(I have not bisected which release moved the session to Rust; the from-version on my machine is unknown.)
Screenshots, and anything else
No screenshots, nothing visual. Technical details that may save triage time:
- Legacy key:
_http://tauri.localhost\x00\x01savedTabsDatain%LOCALAPPDATA%\com.alecdotdev.markpad\EBWebView\Default\Local Storage\leveldb. Value is JSON shaped like{activeTabId, tabs: [{id, path, title, rawContent, ...}]}. Untitled tabs havepath: "". - Encoding quirks I hit decoding it by hand: newlines stored as literal
\ntwo-char sequences, quotes as\\", plus\xHHJS-style escapes (e.g.\xb7for·), so strictJSON.parsechokes on it. If you write the migrator, parse leniently. - The snapshot after the update (
window-state-v2.json) contained only the single file-backed tab, confirming the untitled tabs were dropped at restore, not deleted: the LevelDB record was untouched by the new build.
Thanks for the careful write-up, it saved a lot of digging.
One correction: 2.6.13 and later do read savedTabsData, once, on the first launch. They skip untitled entries on purpose and then remove the key. The bytes you found are most likely LevelDB not having compacted the deletion yet. Anyone who has already launched a newer build has been through that migration, so bringing it back now would not return their notes.
The part that keeps happening is fixed in #763: updating from inside the app skipped the unsaved-changes prompt and the session save that closing the window runs. With that change, the update asks about unsaved tabs first, and Cancel keeps the update waiting.
#763 is merged and will ship in the next release. From then on, updating from inside the app asks about unsaved tabs first, the same way closing the window does, and Cancel keeps the update waiting.
The old savedTabsData migration is unchanged, for the reason above. I'm leaving this open in case the maintainer wants to handle that part differently.