diff --git a/web/pcbjam-shared b/web/pcbjam-shared index 6189307..f8feab8 160000 --- a/web/pcbjam-shared +++ b/web/pcbjam-shared @@ -1 +1 @@ -Subproject commit 6189307bf50a3fc1d477f0616434e8c9e2f980b9 +Subproject commit f8feab8f8ac66a6a0bf5fa7dd1e83bf0d24b7d8d diff --git a/web/standalone/src/wasm/collab/provider.ts b/web/standalone/src/wasm/collab/provider.ts index 42b6f45..a87869d 100644 --- a/web/standalone/src/wasm/collab/provider.ts +++ b/web/standalone/src/wasm/collab/provider.ts @@ -91,7 +91,12 @@ async function partyKitProvider( params: ProviderConfig["params"], ): Promise { const { default: YProvider } = await import("y-partyserver/provider"); - const provider = new YProvider(endpoint, room, doc, { + // The provider splices the room into the WS URL verbatim, so it must travel + // as ONE percent-encoded path segment — otherwise a docPath containing + // `/`, ` `, `#`, `%` or `?` truncates or corrupts the room name. The sync + // worker decodes it once at its edge; the decoded string is the canonical + // room/DO name everywhere. + const provider = new YProvider(endpoint, encodeURIComponent(room), doc, { party: PARTYKIT_PARTY, connect: true, params,