Skip to content

Delay Subduction sync until local storage is loaded - #430

Draft
chee with Copilot wants to merge 3 commits into
mainfrom
copilot/create-option-for-lazy-loading
Draft

Delay Subduction sync until local storage is loaded#430
chee with Copilot wants to merge 3 commits into
mainfrom
copilot/create-option-for-lazy-loading

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Patchwork can compete with Subduction network sync while restoring documents already persisted locally, delaying startup on slow connections.

  • Deferred sync startup

    • Gates the shared-worker Subduction WebSocket until persisted sedimentrees finish loading.
    • Releases the connection gate if storage loading fails, preserving sync availability.
  • Site configuration

    • Adds syncServers.connectSubductionAfterStorageLoad, defaulting to true.
    • Allows sites to opt out with false.
    • Omits the primary sync-server preconnect hint while deferred startup is active.
syncServers: {
  connectSubductionAfterStorageLoad: false,
}

Co-authored-by: chee <178266+chee@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to delay connecting to subduction network Delay Subduction sync until local storage is loaded Sep 8, 2026
Copilot AI requested a review from chee September 8, 2026 15:35
@chee

chee commented Sep 8, 2026

Copy link
Copy Markdown
Member

@copilot make the book defer

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ Patchwork glance ready

https://patchwork-preview-430.patchwork.inkandswitch.com

A peek at inkandswitch/patchwork.inkandswitch.com, built with the @inkandswitch/patchwork- packages as of this PR at 6034eb8.

Co-authored-by: chee <178266+chee@users.noreply.github.com>

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot make the book defer

Renamed the option to syncServers.defer in 6034eb8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patchwork takes a long time to load on slow internet connections

2 participants