Library & Vault
Save, recall, and restore rooms, panes, and full-app snapshots.
The Library is atrium's recall surface — a popover that holds saved layouts and a history of recently-closed rooms and panes, plus the Vault: a tab listing every full-app snapshot the system has committed. Open it with Cmd+Shift+L or the toolbar button.
The popover has three tabs:
| Tab | What's there |
| Saved | Rooms and panes you explicitly saved with Save to Library or Cmd+Shift+S. |
| History | Automatically captured when you close a room or pane — a few minutes of "undo close" so you can pull recently-closed work back. |
| Snapshots | The Vault: every full-app snapshot committed by the snapshot scheduler. |
Saving
A library entry captures everything the regular workspace snapshot captures — the same TabSnapshot / PaneSnapshot payload journaled by the workspace persister. For panes that means the pane type, scalar fields, the state:* projections (editor scroll/cursor, adapter session id, terminal runtime, browser nav state, idle-screenshot), and a fresh scrollback capture. For rooms it adds the mosaic tree and subtab grouping.
- Save current room — Library popover footer, or assign a keybinding to
save-current-room. - Save current pane — pane header menu, or
save-current-pane. - Save on close — closing a room or pane that has a saved Library entry prompts Save / Discard / Cancel: overwrite the saved version with current state, close without updating, or bail out. When a room contains multiple saved panes, the prompt fires once per saved pane so partial changes never get silently dropped.
- Pin — a saved entry can be pinned so it stays at the top of the list and gets a 📌 marker.
Materializing
Click any entry to materialize it into the active workspace. The Library decides what to do based on entry kind and what's currently focused:
- Room → opens as a new room.
- Pane → opens beside the focused pane (or as a new room if no pane is focused).
- Drag an entry out of the popover onto a split zone or another pane's header to materialize directly into that drop target — same drop semantics as a file from Finder.
Snapshots tab — the Vault
The Snapshots tab shows the full-app snapshot history committed by the snapshot scheduler. Each row shows the trigger (Interval, Shutdown, Pre-update, Manual, Pre-restore, or an Event(*) cause), timestamp, and a per-snapshot summary.
- Take snapshot now commits a
Manualsnapshot of current state. - Inspect opens a snapshot diff viewer that semantically diffs the snapshot against current state — JSON for workspaces, row-by-row for
tasks.db, byte-by-byte for opaque blobs — so you can preview exactly what restoring would change. - Restore triggers the restore dialog. atrium commits a
Pre-restoresafety-net snapshot first, then swaps state and re-launches the relevant panes through the same restore engine that runs on a clean app start. The shutdown gate prevents the app from exiting mid-restore.
Retention and dedup
The retention engine keeps the Library bounded:
- History is FIFO. The most recent N close-events stick; older ones are pruned. Saved entries are unaffected.
- Snapshots are tier-pruned — recent commits dense, older commits sparse — so the Vault stays useful without growing unbounded.
- The snapshot store is content-addressed, so re-snapshotting unchanged state is essentially free.
Constraints
- The Library is workspace-scoped: saved rooms and panes only show up when the workspace they were saved in is active. (Snapshots are global because they capture the whole app.)
- The old per-pane Resume / Template matrix from the previous Library design is not present in this build; "open with custom settings" is on the roadmap.
- Bulk-deleting Library entries fires an
Event(LibraryBulkDelete)snapshot first, so you can undo the bulk delete by restoring from that snapshot.
