feat: React Flow migration for flow editor canvas #82

Merged
chihlasm merged 19 commits from feat/react-flow-canvas into main 2026-02-19 05:43:34 +00:00

19 Commits

Author SHA1 Message Date
chihlasm
086e959bad feat: collapse sidebar categories with show more/less toggle
Show only the first 4 categories by default with a "N more" button
to expand the full list. Reduces sidebar clutter when many categories
exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 00:31:18 -05:00
chihlasm
c05e22dc6d style: fix canvas controls visibility and enhance dot grid background
- Add !important to all React Flow dark theme overrides to ensure they
  win over library default styles (fixes white controls rectangle)
- Add SVG fill inheritance for control button icons
- Use slightly lighter canvas background (bg-accent/30) so dot grid
  is more visible
- Increase dot size and use muted-foreground color for better contrast

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 00:23:47 -05:00
chihlasm
699bf59251 fix: use viewport-based height for node editor panel
Replace h-full with calc(100vh - 105px) to bypass the CSS height chain
that fails to constrain the panel across browsers. The 105px accounts
for the topbar (56px) and editor toolbar (49px).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 00:11:18 -05:00
chihlasm
c0699381f6 fix: resolve lint errors in NodeEditorPanel and useTreeLayout
- Fix unused 'children' destructuring with _children prefix
- Move handleClose declaration above the useEffect that references it
- Use handleClose as proper dependency instead of eslint-disable
- Fix unused _parentId parameter type in useTreeLayout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 00:06:16 -05:00
chihlasm
ed2c5a6c16 fix: constrain tree editor page height to prevent panel overflow
Add overflow-hidden to TreeEditorPage root and NodeEditorPanel container
so the flex height chain is properly constrained by the CSS Grid cell,
preventing the node editor sidebar from growing beyond the viewport.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 23:55:50 -05:00
chihlasm
9bb7feaa0c fix: enable scrolling in node editor panel sidebar
Add min-h-0 to flex containers in the ancestor chain so overflow-y-auto
actually triggers instead of content overflowing off-screen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 23:46:05 -05:00
chihlasm
33427cbcce chore: export new React Flow canvas components from barrel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:34:39 -05:00
chihlasm
9413c8bfe8 style: add React Flow dark theme overrides for canvas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:33:46 -05:00
chihlasm
4cfeb2eefe feat: add panel state management for node editor in TreeEditorPage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:21:29 -05:00
chihlasm
cf4849a7c4 feat: wire FlowCanvas and NodeEditorPanel into TreeEditorLayout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:20:05 -05:00
chihlasm
586c06be48 feat: add FlowCanvas main React Flow component with zoom/pan/minimap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:19:22 -05:00
chihlasm
df44ba2857 feat: add NodeEditorPanel side panel for React Flow canvas editing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:11:37 -05:00
chihlasm
c85c6368f3 feat: add useTreeLayout hook for tree-to-ReactFlow conversion with dagre
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:10:05 -05:00
chihlasm
e94171fb18 feat: add FlowCanvasAnswerNode stub card for React Flow canvas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:08:28 -05:00
chihlasm
821939744a feat: add FlowCanvasNode compact card for React Flow canvas
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:02:00 -05:00
chihlasm
c53acfc62d feat: add dagre layout utility for React Flow node positioning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 21:00:35 -05:00
chihlasm
2d73bb861f chore: install @xyflow/react and @dagrejs/dagre
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:59:31 -05:00
chihlasm
6efbdda688 docs: add React Flow migration implementation plan
12 tasks across 8 phases covering dagre layout, custom nodes,
side panel editor, and full canvas integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:50:00 -05:00
chihlasm
af9e44d633 docs: add React Flow migration design for flow editor canvas
Replaces hand-built CSS flexbox canvas with @xyflow/react for zoom/pan,
dagre auto-layout, collapsible minimap, and side-panel editing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 20:41:34 -05:00