mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
* feat(snapshot): add session snapshot persistence and restoration - Add snapshot middleware to persist UI state (tabs, workspaces, environments) - Add SnapshotManager service in electron for atomic snapshot storage - Add accessor-based tab serialization using pathname for reliable restoration - Add loading states for tabs while collections are mounting - Add hydrateTabs to restore tabs from snapshots on app load - Add devTools state persistence (console open/height/tab) * fix(snapshot): preserve unloaded collections and fix async serialization Make serializeSnapshot async to fetch existing snapshot before saving, ensuring collections not currently loaded in Redux are preserved. Fix activeTab serialization to pass collection object instead of just UID. * refactor(snapshot): rewrite storage to map-based schema with granular IPC Replace array-based snapshot storage with key-value maps keyed by pathname for O(1) lookups. Separate tabs into their own top-level map, decoupled from collections. - Rewrite SnapshotManager with map-based schema and granular read/write methods (getWorkspace, getTabs, setCollection, removeWorkspace, etc.) - Add 12 granular IPC handlers (renderer:snapshot:*) replacing 4 coarse ones - Update middleware serialization to produce maps; remove activeCollectionUidCache in favor of lastActiveCollectionPathname on workspace objects - Fix mountCollection passing collectionUid instead of collection to restoreTabs - Preserve non-active workspace state from existing snapshot on save * wip * refactor: allow migration of old snapshot * refactor: trim down redundancy * fix: for workspace state * feat: fix for finalised schema * fix: schema cleanup * chore: simplify * chore: wait on hydration to finish * chore: snapshot changes to schema * chore: fix typo * fix: switch schema for saving and restoring extras * chore: correctness changes * chore: add active in the schema check * chore: fix lint * chore: comments * chore: make writes async * fix: sorting and cross workspace shared collection fixes * chore: add version * fix: wait on hydration * chore: fix backward compat for ui-snapshots * chore: dead code removal * Fix optional chaining in snapshot lookup --------- Co-authored-by: Chirag Chandrashekhar <cchirag85@gmail.com>