pcbjam/wasm/bindings
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári 1f85e13acf
feat(collab): follow-user (collab-presence 0008) + chip depth-layer fix
Follow-user: click a peer's roster avatar to mirror their viewport until
local input breaks it.
- collab_presence_core.h: CORE::fitViewport(cx, cy, halfW, halfH) — fit the
  leader's world rect with CONTAIN semantics (zoom derived from the
  follower's own canvas via the ToScreen ratio; GetScale is the zoom, not
  px/IU). Exported as kicadCollabFitViewport from both editor TUs + the
  merged dispatcher.
- presence-kicad.ts: publish the visible world rect (viewportRect) into
  awareness, 100 ms trailing throttle; guarded for pre-0008 handles.
- follow-user.ts: createFollow — follows an awareness CLIENT (a tab, not a
  user); applies leader rect changes via FitViewport, dedupes unchanged
  republishes; break-on-interact compares local onViewport echoes against
  the last applied rect (2% rel tolerance, echo-grace before the first fit
  lands); unfollows on leader-left; pauses on eeschema sheet mismatch.
- PresenceRoster: avatars are follow toggles (ring on the followed peer);
  WasmTool renders the "Following <name> — move to stop" banner.
- tests: 7 controller units (85/85 collab), fitViewport round-trip e2e in
  both kicad presence specs (20/20), two-tab tests/web/follow.spec.ts
  (converge → track → wheel-zoom breaks → subsequent moves ignored).

Chip depth-layer fix (user-reported): name chips washed out inside
low-alpha selection fills — chip rects shared the shapes overlay's single
depth, and same-depth fragments drawn LATER lose the depth test, so an
earlier-painted fill rejected the chip's pixels. Now three layers via the
fork's VIEW_OVERLAY::SetDepthOffset: text (0) < chips + pin dots (1) <
selection shapes (2). drawLabel/drawCursor/drawSelectionBox take the chip
overlay explicitly; comment-pin dots move to the chip layer too (the 0005
"drawn last so pins sit above" comment had the rule backwards). Verified
with a chip-inside-30%-fill pixel repro + the full presence suite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013u9h8fkQktH7KRECaHJmUG
2026-07-10 09:25:13 +02:00
..
calculator_embind.cpp add calculator build 2026-05-28 17:28:17 +02:00
collab_common.h refactor(collab): dedup embind collab/presence layer into shared headers (collab_common.h + collab_presence_core.h) 2026-07-10 09:17:32 +02:00
collab_presence_core.h feat(collab): follow-user (collab-presence 0008) + chip depth-layer fix 2026-07-10 09:25:13 +02:00
collab_presence_style.h feat(collab): follow-user (collab-presence 0008) + chip depth-layer fix 2026-07-10 09:25:13 +02:00
eeschema_embind.cpp feat(collab): follow-user (collab-presence 0008) + chip depth-layer fix 2026-07-10 09:25:13 +02:00
kicad_editor_embind.cpp feat(collab): follow-user (collab-presence 0008) + chip depth-layer fix 2026-07-10 09:25:13 +02:00
pcbnew_embind.cpp feat(collab): follow-user (collab-presence 0008) + chip depth-layer fix 2026-07-10 09:25:13 +02:00
pl_editor_embind.cpp feat: standalone save/load routing + VITE_DOC_SOURCE ydoc mode 2026-06-12 14:05:40 +02:00