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:
parent
da556f6202
commit
74e822134f
2 changed files with 7 additions and 2 deletions
|
|
@ -91,7 +91,12 @@ async function partyKitProvider(
|
|||
params: ProviderConfig["params"],
|
||||
): Promise<YjsProvider> {
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue