Commit 7daff76
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
File tree
- app
- drizzle
- meta
- e2e/mut
- src
- components/factory/board
- db
- routes
- server
- docs
- development
- guide
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments