Skip to content

Commit 7daff76

Browse files
committed
feat(factory): add a draggable board view to Connections
The factory as a spatial map, rendered with React Flow: every enabled block is a draggable node (icon, name, power draw), every good flowing between two blocks rides an aggregated edge whose width tracks the log-scaled flow and whose tint carries the diagnosis — red where a good runs short, with the short good's producer block outlined red as the thing to scale up. Energy pseudo-goods draw no edges (each node shows its power draw instead of wiring the grid to every block). Auto-layout is a cycle-tolerant layered layout (longest-path layering, barycenter ordering, neighbor-relaxed y-assignment) shared with an Auto-arrange control; hand-dragged positions persist per block in new board_x/board_y columns, written outside the undo system — undoing a planning edit must not teleport blocks around the board. Hovering or selecting a block fades the rest of the web and lights its edges; hovering an edge shows a cursor-anchored goods breakdown (a midpoint label on a board-spanning edge is routinely off screen). Double-click opens the block editor; a minimap and fit control round out navigation.
1 parent 4255e8a commit 7daff76

20 files changed

Lines changed: 4268 additions & 83 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE `blocks` ADD `board_x` real;--> statement-breakpoint
2+
ALTER TABLE `blocks` ADD `board_y` real;

0 commit comments

Comments
 (0)