Commit Graph

5 Commits

Author SHA1 Message Date
49b383db2e Phase 1-2: Panel editor with pen/eraser/shape tools, undo/redo, zoom/pan, color picker
- gui/panel_editor.odin: Full drawing editor overlay
  - Editor_Tool enum: Pen, Eraser, Line, Rect, Circle, Fill
  - Brush_Stroke struct with points array for freehand/shape strokes
  - Panel_Editor_State with active panel, strokes, undo snapshots, zoom/pan
  - open/close/commit lifecycle: loads panel texture, composites on commit
  - Screen-to-canvas coordinate mapping with zoom and pan offsets
  - Stroke rendering: freehand via line segments, shapes via endpoints
  - Undo via snapshot replay (cap 30 snapshots)
  - Toolbar: tool buttons, brush size slider, color picker, commit/cancel
  - Color picker panel: 18 preset color swatches, current color display
  - to_cstr helper for Odin string->cstring conversion

- gui/runtime.odin: Editor integration
  - GUI_App_State.editor field (Panel_Editor_State)
  - Editor update/render calls in main loop when active
  - Escape key closes editor, Ctrl+Z for undo
  - editor_close in defer chain for cleanup on exit
  - btn_panel_draw click handler opens editor on selected panel

- gui/workspaces.odin: Draw button on panel cards
  - 'Draw' button triggers btn_panel_draw action

- gui/chrome.odin: Editor hint text when editor active
  - Shows 'Press Escape to close editor' overlay

Build passes. 153/156 tests pass (3 pre-existing CLI/TUI failures,
2 new env-related failures due to FAL_API_KEY in .env).
2026-05-28 15:39:42 +02:00
152ef17610 current state 2026-05-28 15:20:02 +02:00
9de3be6847 check point 2026-05-24 12:41:31 +02:00
be0ccc1539 Phase B: Eliminate duplication
- workspace_nav helper replaces 4x duplicated nav bar patterns
- Hoisted make_diagnostics_action_context call in process_clicks (computed once, reused 4 times)
- Removed duplicate section header comments in workspaces.odin

workspaces.odin: 328 → 280 lines (down 15%)
All 156 tests pass.
2026-05-22 17:36:24 +02:00
abc74582d6 Phase A: Split runtime.odin into chrome.odin, workspaces.odin, detail_panels.odin
runtime.odin: 1782 → 818 lines (orchestration only)
chrome.odin: 248 lines (sidebar, pipeline bar, workspace router, bottom bar)
workspaces.odin: 328 lines (8 workspace functions)
detail_panels.odin: 439 lines (script/panels/layout/bubbles detail + action log)

All 156 tests pass, build clean.
2026-05-22 17:33:57 +02:00