fix(collab): filenames with spaces — canonical room DO name, injective ydoc keys + lazy open-triggered migration

The partykit provider splices the room into the WS URL verbatim, so it now
travels as ONE percent-encoded path segment (the sync worker decodes it at
its edge); bumps pcbjam-shared for the injective key scheme.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfEPcy9dStnSfm1hmaiTe4
This commit is contained in:
Gergő Törcsvári 2026-07-29 20:44:58 +02:00
commit 74e822134f
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
2 changed files with 7 additions and 2 deletions

@ -1 +1 @@
Subproject commit 6189307bf50a3fc1d477f0616434e8c9e2f980b9 Subproject commit f8feab8f8ac66a6a0bf5fa7dd1e83bf0d24b7d8d

View file

@ -91,7 +91,12 @@ async function partyKitProvider(
params: ProviderConfig["params"], params: ProviderConfig["params"],
): Promise<YjsProvider> { ): Promise<YjsProvider> {
const { default: YProvider } = await import("y-partyserver/provider"); 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, party: PARTYKIT_PARTY,
connect: true, connect: true,
params, params,