The bare `mcables` pattern in .gitignore (line 11) and .dockerignore
(line 18) was intended to ignore the built binary at the repo root, but
without a leading slash it also matched the cmd/mcables/ directory. The
result: cmd/mcables/main.go was never tracked in git, and fresh worktrees
had to copy it from a sibling to build.
- Change `mcables` → `/mcables` in both files (still ignores the root
binary; no longer matches the cmd subdirectory).
- Add cmd/mcables/main.go (copied from picasso's worktree, verified
identical to head's main checkout).
Verified: `git check-ignore cmd/mcables/main.go` returns not-ignored;
a touched `./mcables` at the repo root is still ignored via `/mcables`.
`go build ./...` clean.
Adds armTool('cable') so the cursor shows crosshair during the
in-progress draw — matches m's literal 'cursor crosshair' request.
(Picasso shipped a similar fix in parallel due to a head dispatch
race; dropping picasso's variant in favour of this one.)
Double-click a port → enter cable-draw mode from that port without
having to arm the cable tool first. armTool("cable") is called so
the crosshair cursor is active during the draw; the next port-click
hits the existing cable-draw-in-progress branch in onPortPointerDown
and commits the cable. Esc / clicking the source port cancels.
Single-click behaviour (select + open port inspector) is unchanged
because pointerdown still hits onPortPointerDown first; dblclick
upgrades the selection to a cable-draw source.
m's bundling primitive: a clamp is a physical anchor on the canvas;
cables route through clamps in order; cables that share a consecutive
clamp pair are visibly bundled on that segment. Overlap is the bundle —
no detection pass.
Section covers:
- 11.1 Schema: clamps table + cable_clamps join, migration 007. Clamps
carry frame_id so frame-drag carries them.
- 11.2 Cable rendering: <polyline> through [from, clamp₁..n, to];
endpoint-replug handles stay on first/last vertices.
- 11.3 Bundle visualisation: shared segments rendered as a 2+N px
striped line; clamp icon shows ×N count when shared. Computed live
on every renderCanvas — O(C·N̄), trivial at v0 scale.
- 11.4 UI: +Clamp tool (C shortcut), mid-segment drag-to-snap (snap
radius ~16 px / zoom), clamp inspector, right-click remove-from-cable.
- 11.5 Existing bundles table: keep, repurpose. Implicit bundles are
derived from shared clamp segments; explicit named bundles still live
in the table.
- 11.6 Solver coupling: v0 solver still emits straight cables; m
hand-routes after. v5.1 future work for solver-suggested clamps.
- 11.7 Export: clamps export as small grey diamonds; cable arrows use
Excalidraw's points array for mid-vertices. Bundle stripes are
viewer-only (Excalidraw can't represent them losslessly).
- 11.8 API additions: clamp CRUD, attach/detach/reorder cable clamps.
Snapshot grows clamps + cable_clamps arrays.
- 11.9 Five open questions for m (icon shape, snap radius scaling,
cascade-on-delete confirm, stripe order, solver respect for manual
clamp routing).
- 11.10 6-step slice plan post-approval.
DESIGN v5 READY FOR REVIEW
2026-05-16 13:19:55 +02:00
5 changed files with 303 additions and 3 deletions
// Double-click activates cable-draw mode from this port without arming
// the cable tool first. armTool("cable") gives the crosshair cursor;
// the next port-click is then caught by onPortPointerDown's
// cable-draw-in-progress branch and commits the cable.
c.addEventListener("dblclick",(e)=>{
e.stopPropagation();
e.preventDefault();
if(state.tool!=="cable")armTool("cable");
state.cableDrawFromPortID=prt.id;
state.selection=null;
render();
});
g.append(c);
}
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.