[Mac] Initial sync does not run when a new binding is created #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When a new binding is saved in the configuration panel on macOS, the initial sync (SP→MD or MD→SP depending on file state) does not execute.
The binding is eventually picked up via the 5-second polling fallback, but `performInitialSync` does not appear to run. Likely a timing issue with the `persistedDataUpdate` hook on the macOS build of SP. Needs developer console diagnostic to confirm root cause.
Steps to reproduce:
Expected behaviour: saving the binding should trigger the initial sync immediately.
Fixed in v0.1.1 (pre-release).
Root cause (confirmed via console log, not just timing as originally suspected): the plugin registered the plugin-data hook as
persistedDataUpdate, but SP 18.9.1D's valid hook name ispersistedDataChanged. SP rejects the unknown name via typia validation, so the hook never fired — and the 5-second poll fallback wasn't compensating because it was wired up after a non-criticalawait refreshProjectsCache()in the startup IIFE.Fix:
persistedDataUpdate→persistedDataChanged(background, iframe, manifest).Verified on macOS 18.9.1D: adding (3→4) and deleting (4→3) a binding both trigger the initial sync immediately, with no app restart and no typia errors in the console.
Released in pre-release v0.1.1.
Closing as fixed.