mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 09:42:53 +00:00
* perf(app): throttle workspace layout writes and skip no-op persists Zustand persist calls setItem after every set, even when the updater returns the same state. The layout store re-normalized every workspace tree, re-validated the envelope, stringified it, and wrote to AsyncStorage on each agent status change because reconcileTabs runs from an effect keyed on agent visibility. The draft store's throttled writer moves to storage/ as a generic throttled persist storage, gains a referential short-circuit for a value whose partialized state was already accepted, and now backs both the draft and layout stores. The layout store's partialize reuses its previous projection while every persisted slice is the same reference, and the store is flushed alongside drafts when the app leaves the foreground. Before: 50 no-op reconciles produced 50 writes. After: 0 writes; 50 real sets inside one interval produce 2 writes (leading and trailing). Fixes #4814 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test(app): build layout stores with options and flush before rehydrating Six call sites still passed the id factories positionally, which this branch replaced with an options object, so those stores silently used default ids. The once-only PR test also rehydrated a second store before the throttled write landed; flush the source first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(app): avoid shadowing layout options --------- Co-authored-by: Ivan Malison <IvanMalison@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>