feat: add physical view and view toggle
Implements Phase 6 tasks 1-4:
Task 1: Add physicalLayout() to layout.ts
- Exports new physical layout function with tighter spacing
- Uses dagre top-to-bottom layout for PE cluster visualization
Task 2: Add PE cluster, cross-PE, and intra-PE styles to style.ts
- PE cluster parent nodes: rounded rectangle with solid border
- Cross-PE edges: thicker, darker (3px, #5c6bc0)
- Intra-PE edges: lighter (1.5px, #bbb)
Task 3: Add view toggle and physical element building to main.ts
- buildPhysicalLabel(): formats nodes with [iram:offset, ctx:slot] annotations
- buildPhysicalElements(): creates PE cluster nodes and assigns children
- View mode tracking: logical (default) or physical
- Toggle button in index.html switches between views
- Physical view only available when stage == 'allocate'
- Disables toggle and reverts to logical if graph becomes incomplete
Task 4: Manual verification
- esbuild bundle succeeds without errors (1.2mb)
- Full test suite passes: 608/608 tests
- Frontend builds successfully with npm run build
Acceptance criteria covered:
- AC3.1: Nodes grouped into PE cluster boxes by PE ID
- AC3.2: Nodes annotated with IRAM offset and context slot
- AC3.3: Cross-PE edges visually distinct from intra-PE
- AC3.4: Physical view unavailable when stage != 'allocate'