collab: passive pull facade, sibling mirror without BoardRoom wake (load-path-rework 0004)
- GatewayDocFacade: passiveSync (Step1 on subscribe + on touched, answered by the gateway from at-rest state), onReset; activate() after a passive fill still sends act + a participant Step1. - sibling-restage subscribes passive+passiveSync; reset drops the watch (no flush) and re-dials while a peer still has the sheet open. - files-watch: upload/job hints on room-backed paths restage + announce onRoomBackedChanged; sheet-manager.invalidate() drops a parked room. - kicad-binding: normalize server-serialized bodies on the editorMatchesDoc path (runner-seeded ydocs carry kicad-cli's serialization). - pcbjam-shared -> 0f4d3a1 (reset control, kicadDocToYdocUpdate). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UQsdqaX57xzcCWUjqP7ctV
This commit is contained in:
parent
7a9aeb5181
commit
602f5c6fed
13 changed files with 332 additions and 13 deletions
|
|
@ -40,6 +40,12 @@ export interface YjsProvider {
|
|||
* subscription was passive (the sheet manager's parked-dirty flag).
|
||||
*/
|
||||
onTouched?(cb: () => void): void;
|
||||
/**
|
||||
* Gateway transport only (load-path-rework 0004 §2.3): the doc's server-side
|
||||
* history was replaced and this passive copy cannot be merged — the owner
|
||||
* must destroy doc + provider and connect afresh.
|
||||
*/
|
||||
onReset?(cb: () => void): void;
|
||||
}
|
||||
|
||||
export type ProviderKind =
|
||||
|
|
@ -175,7 +181,7 @@ async function hocuspocusProvider(
|
|||
export async function connectProvider(
|
||||
doc: Y.Doc,
|
||||
config: ProviderConfig,
|
||||
opts: { room: string; passive?: boolean },
|
||||
opts: { room: string; passive?: boolean; passiveSync?: boolean },
|
||||
): Promise<YjsProvider> {
|
||||
switch (config.kind) {
|
||||
case "broadcastchannel":
|
||||
|
|
@ -195,6 +201,7 @@ export async function connectProvider(
|
|||
docPath: parsed.docPath,
|
||||
token: config.params?.token,
|
||||
passive: opts.passive,
|
||||
passiveSync: opts.passiveSync,
|
||||
});
|
||||
}
|
||||
return partyKitProvider(doc, requireEndpoint(config), opts.room, config.params);
|
||||
|
|
|
|||
Loading…
Reference in a new issue