mirror of
https://github.com/getpaseo/paseo.git
synced 2026-12-01 04:36:26 +00:00
Each browser tab runs its own replica cache over one shared IndexedDB database. When one tab ran over the 32 MiB budget it deleted a host's rows, but only that tab knew. Another open tab kept writing workspace and agent updates with its old checkpoint, so the database ended up with a projects cursor and no project rows. A new tab trusted that cursor, the daemon answered "no changes", and the sidebar showed no projects or workspaces for the host. The IndexedDB store now keeps a revision on each host's checkpoint. A tab may write directory rows only while the stored revision matches the one it last read or wrote, checked in the same transaction as the write. Each write rotates the revision. A tab whose host was evicted or rewritten by another tab has its directory writes dropped until a full refresh replaces the baseline. Timeline writes are not affected. Malformed-row repairs go through the same check. Version 2 checkpoints could have been written by the cross-tab path, so the checkpoint version moves to 3 and existing caches re-sync their directory once. Fixes #10206 Co-authored-by: Gtio <gtoxlili@outlook.com>