Add formboard harness layout designer

Separate read-only canvas for physically laying out wire harnesses.
Syncs connectors from the main diagram (one-way), no changes flow back.

Backend:
- FormboardLayout, FormboardNode, FormboardSegment models
- /api/formboard/ router: get/create layout, sync connectors from diagram,
  full CRUD for nodes and segments

Frontend (formboard.js):
- Konva canvas: drag nodes, click-to-connect segments, zoom/pan
- Node types: Connector (blue rect, synced from diagram), Branch (green
  circle, manual), Splice/joint (orange diamond, manual)
- Segments scale thickness by wire count; fitting overlays for open,
  split loom, conduit, heat shrink, tape wrap
- Right-click context menu for delete on nodes/segments

App integration:
- "⊞ Formboard" tab in view-tab-bar (distinct color, independent of views)
- Sub-toolbar: Select / Branch / Splice / Connect / Sync / Fit / Delete
- Right panel swaps to formboard props when active:
  - Node: label, notes, linked device info
  - Segment: fitting type, fitting color, label, length, wire checklist
    (checkboxes for every wire in the main diagram)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 07:18:43 -04:00
parent 0bbcaa8ee5
commit 82d8570767
8 changed files with 985 additions and 1 deletions
+20
View File
@@ -101,6 +101,26 @@ body { background: #12121c; color: #c8ccee; }
border-radius: 3px;
}
.view-tab-close:hover { opacity: 1; background: rgba(255,80,80,0.25); color: #ff8888; }
.view-tab-sep { width: 1px; background: #2a2a44; height: 18px; margin: 0 4px; }
.fb-tab { color: #6688aa; border-color: #1e3355; }
.fb-tab.active { background: #0d2235; border-color: #336699; color: #88bbdd; }
.fb-tab:hover:not(.active) { background: #0d1a28; color: #aaccee; }
#fb-toolbar {
display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
padding: 4px 8px; background: #090914; border-bottom: 1px solid #1e3355;
flex-shrink: 0;
}
.fb-mode-btn {
padding: 3px 10px; font-size: 11px; border-radius: 4px;
background: #0d1a28; border: 1px solid #1e3355; color: #5577aa; cursor: pointer;
}
.fb-mode-btn.active { background: #0d2235; border-color: #336699; color: #88bbdd; }
.fb-mode-btn:hover:not(.active) { background: #111e30; color: #aaccee; }
#fb-container { flex: 1; overflow: hidden; }
#fb-canvas { width: 100%; height: 100%; }
#btn-add-view {
padding: 2px 8px; font-size: 14px; background: transparent;
border: 1px dashed #333355; border-radius: 4px; color: #556; cursor: pointer;