pcbjam/web/standalone
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári 8bbab863da
feat(standalone): Slot-model collab binding runtime (ysync 0008 Stage B)
The thin runtime over @pcbjam/shared's transport-unaware blocks — this module
owns exactly what shared must not: the observeDeep subscription, local-origin
echo policy, and seed-once authority.

- wasm/collab/kicad-binding.ts: KicadItemsBridge (the v2 per-item s-expr bridge
  contract: snapshotItems/applyItems/onItems), bindKicadCollab (DOWN: onItems →
  itemsWireToDelta → applyDeltaToY origin-tagged; UP: observeDeep → skip own
  origin → deltaFromYEvents → deltaToItemsWire → applyItems; seed-once with doc
  authority on join, mirroring the scalar reconciler §2), moduleItemsBridge
  adapter over the future Stage C Module exports.
- index.ts: startKicadCollab — the Slot-model counterpart of startCollab (same
  provider + whenSynced + seed flow); legacy scalar path untouched.
- debug.ts: clog/cwarn quiet + crash-free outside a DOM context (vitest node).
- kicad-binding.test.ts: fake editor bridge + two relayed Y.Docs — seed → adopt
  → edits propagate both ways → footprint removal cascades; no self-echo;
  divergent local root dropped on adopt (doc authority); destroy() detaches.

Verified: 19 standalone unit tests, collab bundle rebuilds, pl_editor two-tab
spec still green (legacy path unchanged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 14:05:40 +02:00
..
scripts refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
src feat(standalone): Slot-model collab binding runtime (ysync 0008 Stage B) 2026-06-12 14:05:40 +02:00
.env.example refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
index.html refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
package.json feat(standalone): sexprDiff structural comparator + vitest (0003/0004 §B) 2026-06-12 14:05:39 +02:00
postcss.config.js refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
tailwind.config.js refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
tsconfig.json refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
vite.config.ts refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
vitest.config.ts feat(standalone): sexprDiff structural comparator + vitest (0003/0004 §B) 2026-06-12 14:05:39 +02:00