How Tabhaven protects your tabs
Four layers, so one failure never costs you your tabs
Each layer covers a different way things go wrong: a failed write, a wiped browser, a mistake, and code changes that would break any of the above.
1 Tabs close only after the save is confirmed
Every save is a durable IndexedDB transaction (IndexedDB is the database built into the browser). Tabhaven waits for the write to be committed, reads it back, and only then closes your tabs. If anything fails, your tabs stay open.
2 Backup files outside the browser
Tabhaven writes backups to Downloads/Tabhaven/: a JSON file and a readable HTML page of links, refreshed after every change, plus 7 daily rotating copies. They survive reinstalls, extension ID changes and browser resets, and Tabhaven can import them back.
3 Version history with undo
Before every delete, restore, import or edit, Tabhaven takes a snapshot. Undo the last change, or roll the whole shelf back to an earlier point.
4 Crash-tested on every commit
An automated test suite runs on every code change. It kills the browser in the middle of a 5,000-tab write, reloads the extension, restores from the backup files, and checks that nothing was lost.