pcbjam/tests/web
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári c30bcd4531
feat(collab): selection soft-locks — remote-selected items can't be dragged locally (collab-presence 0007)
While a peer has an item selected, local users can still select it for
inspection but move/drag/rotate/delete skip it with an infobar naming the
holder (native locked-item UX; enforced via the fork's PCBJAM_REMOTE_LOCK
query — kicad 81f9cd80fd, the epic's first fork-touching phase). Overlapping
holds (both grabbed inside the awareness propagation window) tie-break
deterministically: lowest (user.id, clientID) keeps the item, every losing
client auto-releases it.

- lock-tiebreak.ts: pure policy — beats(), remoteLocks() (union of ALL other
  clients' selections incl. own user's other tabs, minus own-held-and-winning
  uuids so the winner isn't blocked mid-release), contestedReleases()
- presence.ts: clients() (per-client view, no user dedupe) + self(); FIX for
  a pre-existing flaky stack overflow — resolveCollision re-entered itself
  synchronously via its own patch's awareness 'change' and could ping-pong on
  stale same-user states (~1-in-3 unit runs); re-entrancy guard defers
  re-resolution to the next genuine delivery
- presence-kicad.ts: locks ride the kicadCollabSetRemote snapshot
  (`locks:[{uuid,name}]`); losing overlaps call kicadCollabReleaseSelection
- wasm bindings (both TUs + merged dispatch): g_locks map + fork query
  install; kicadCollabReleaseSelection (cancelInteractive only when a tool
  stack is live — bare ESC would clear the whole selection — then selective
  RemoveItemFromSel + infobar + forced re-emit); kicadCollabTestGetLocked
- tests: lock-tiebreak unit suite; presence-locks e2e for both editors (real
  move veto — pcbnew click+M hotkey since its default left-drag is
  rubber-band select, eeschema real drag — each with an unlocked control);
  two-tab tests/web/locks.spec.ts (lock propagation + deterministic tiebreak
  release + unlock on clear, passing vs real partykit)

Spec: docs/features/collab-presence/0007 (closed repo).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lg5jwWuhFH5dL8hEcBDuP2
2026-07-07 21:09:24 +02:00
..
comments.spec.ts feat(collab): nth-in-room colors, comment toolbar + drag + global hide, luminance chip text 2026-07-07 21:09:23 +02:00
cross-probe.spec.ts feat(collab): cross-app selection — eeschema symbol ⇄ pcbnew footprint ghost highlight (collab-presence 0006) 2026-07-07 21:09:23 +02:00
eeschema-fp-selector.spec.ts feat(libs): eeschema symbol-chooser footprint selector + preview via publish-time fp-index 2026-07-07 21:09:21 +02:00
footprint-browse-remote.spec.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
footprint-write-remote.spec.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
footprint-write-spike.spec.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
global-setup-web.ts feat(scopes): migrate GPL open backend + web e2e to scope grammar 2026-06-30 09:54:50 +02:00
locks.spec.ts feat(collab): selection soft-locks — remote-selected items can't be dragged locally (collab-presence 0007) 2026-07-07 21:09:24 +02:00
presence-roster.spec.ts feat(collab): presence P1 — awareness transport + who's-here roster (collab-presence 0001) 2026-07-07 21:09:22 +02:00
symbol-write-remote.spec.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
symbol-write-spike.spec.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
tool-switch.spec.ts test(determinism): deterministic waits + stableShot screenshots; drop blind sleeps/ifs/retries 2026-07-07 10:50:24 +02:00
tools-open.spec.ts feat(tests): screenshot regression + Discord review, perf-tracked 2026-07-01 18:17:20 +02:00