comic/odin/docs/PORT_BACKLOG.md
2026-05-22 03:51:50 +02:00

1188 lines
77 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Odin Port Backlog
## Milestone 1: Core parity
- [x] Port all TS domain enums + structs (baseline)
- [x] Port script normalization (validation is minimal)
- [x] Port layout pattern selection and page packing
- [x] Port bubble placement + sizing
- [x] Port deterministic seed generation (TS-style hash/parity logic)
## Milestone 2: Service integration
- [x] DeepSeek adapter with retry/backoff (transport-injected)
- [x] fal.ai adapter with queue and concurrency caps (transport-injected)
- [x] Error taxonomy + retry classification
- [x] Real HTTP integrations via curl transport (DeepSeek + fal)
- [x] Full DeepSeek envelope/content JSON decoding into typed domain script
- [x] Replace fal response string extraction with typed JSON decoding
## Milestone 3: Persistence + export
- [x] Project save/load format (`.comic.json`) with schema wrapper
- [x] Asset cache folder strategy (`<project_dir>/assets`)
- [x] Exporters (PNG/CBZ/PDF) baseline implementation
- [x] PNG/CBZ hardening: staged image files + zip packaging (+ ComicInfo.xml for CBZ)
- [x] Migration scaffold (`schemaVersion` + migration switch)
## Milestone 4: Desktop UI
- [x] Story/script/character/panel/layout/bubble/export screen routing scaffold (`src/ui/screens.odin`)
- [x] Workflow navigation guards (`src/ui/navigation.odin`)
- [x] Background jobs + cancellation scaffold (`src/ui/jobs.odin`, `src/ui/controller.odin`)
- [x] Rendering/runtime layer scaffold (`src/ui/views.odin`, `src/ui/runtime.odin`)
## Milestone 5: Hardening
- [x] Lifecycle cleanup scaffold for state/controller (`src/core/dispose.odin`, `src/ui/dispose.odin`)
- [x] Hardening tests for dispose/cleanup behavior (`tests/hardening_phase5.odin`)
- [x] Initial ownership cleanup pass in tests/controllers (defer dispose on controllers, scripts, fixtures)
- [x] Reduce remaining allocator leak warnings across adapters/views/tests via deeper allocation policy + explicit string/slice ownership rules
## Milestone 6: CLI Runtime
- [x] Command parser + executor (`src/app/cli.odin`)
- [x] CLI-integrated app boot path (`src/app/main.odin`)
- [x] CLI tests for parse/save/load workflow (`tests/app_cli_phase6.odin`)
## Milestone 7: Packaging + CI
- [x] Packaging script for release artifacts (`scripts/package.sh`)
- [x] CI workflow for build/test/package (`.github/workflows/odin-ci.yml`)
- [x] Artifact upload in CI (tarball + sha256)
## Milestone 8: Interactive TUI
- [x] Added `tui` CLI mode with interactive command loop (`src/app/cli.odin`)
- [x] TUI commands for navigation/workflow/jobs/save/load/status
- [x] Parser coverage update for `tui` command (`tests/app_cli_phase6.odin`)
- [x] TUI polish: ANSI full-screen redraw + single-key aliases (`h/s/d/c/q`, `1..8` screens)
## Milestone 9: TUI Story Editing
- [x] Added `new` command to reset project state
- [x] Added `set idea <text>`, `set genre <text>`, `set audience <text>` commands
- [x] Verified interactive behavior with scripted TUI smoke run
## Milestone 10: TUI Generation Commands
- [x] Added `generate script` command wired to DeepSeek adapter path
- [x] Added `generate panels` command wired to fal batch adapter path
- [x] Added `generate script <pages>` override parsing
- [x] Added `generate panels page <n>` scoped generation parsing
- [x] Added regression tests for missing-key/empty-script generation paths (`tests/app_cli_phase6.odin`)
## Milestone 11: TUI Layout + Export Commands
- [x] Added `layout auto` command to generate `page_layouts` from script panels
- [x] Added `export <pdf|png|cbz> <path>` command wired to export adapter
- [x] Added parser/test coverage for export command and layout/export precondition failures (`tests/app_cli_phase6.odin`)
## Milestone 12: Offline TUI Script Mode
- [x] Added `generate script local [pages]` for keyless local script generation
- [x] Added parser/test coverage for local script command and new command forms (`tests/app_cli_phase6.odin`)
- [x] Fixed `set_workflow_step` historical-steps reallocation leak in `src/core/state.odin`
## Milestone 13: Offline TUI Panels + Export Flow
- [x] Added `generate panels local [page <n>]` for keyless local panel image generation
- [x] Added parser/test coverage for local panel command and offline local flow (`tests/app_cli_phase6.odin`)
- [x] Synced export UI state format after export command execution
## Milestone 14: One-Command Offline Pipeline
- [x] Added `quick local <pdf|png|cbz> <path>` TUI command (local script + local panels + layout + export)
- [x] Added parser/test coverage for quick-local command (`tests/app_cli_phase6.odin`)
- [x] Validated end-to-end quick-local PDF export in TUI smoke run
## Milestone 15: Quick-Local Parameterization
- [x] Added optional page-count argument: `quick local <pdf|png|cbz> <path> [pages]`
- [x] Added parser/test coverage for quick-local page-count parsing and resulting script page count (`tests/app_cli_phase6.odin`)
- [x] Validated quick-local CBZ export with page-count override in TUI smoke run
## Milestone 16: One-Command Save+Export Pipeline
- [x] Added `quick local all <project_path> <pdf|png|cbz> <export_path> [pages]`
- [x] Refactored quick-local flow into reusable `run_quick_local_pipeline` helper
- [x] Added parser/integration tests for quick-local-all save+export behavior (`tests/app_cli_phase6.odin`)
## Milestone 17: TUI Doctor Diagnostics
- [x] Added `doctor` command for environment/tool diagnostics (DeepSeek key, fal key, curl, python3)
- [x] Added alias `?` -> `doctor`
- [x] Added parser/command tests and TUI smoke validation (`tests/app_cli_phase6.odin`)
## Milestone 18: TUI Alias & Flow Ergonomics
- [x] Added `saveas <path>` alias for `save <path>` and `open <path>` alias for `load <path>`
- [x] Added tests for `open`/`saveas` alias workflow (`tests/app_cli_phase6.odin`)
- [x] Hardened owned cleanup in alias load/save test path to avoid unmarshal-token leak leftovers
## Milestone 19: TUI Readiness Diagnostics
- [x] Added `ready` command for workflow readiness checks (script/panels/layout/export)
- [x] Added alias `r` -> `ready`
- [x] Added parser/command tests and TUI smoke validation (`tests/app_cli_phase6.odin`)
## Milestone 20: TUI Guided Next-Step Hints
- [x] Added `next` command to recommend the next actionable workflow command
- [x] Added alias `n` -> `next`
- [x] Added parser/command tests and TUI smoke validation for hint progression (`tests/app_cli_phase6.odin`)
## Milestone 21: TUI Plan/Checklist View
- [x] Added `plan` command showing stage completion checklist + current next hint
- [x] Added alias `p` -> `plan`
- [x] Added parser/command tests and TUI smoke validation for checklist progression (`tests/app_cli_phase6.odin`)
## Milestone 22: TUI Auto-Advance Command
- [x] Added `auto` command to execute the current `next` recommended action
- [x] Added alias `x` -> `auto`
- [x] Added parser/command tests and TUI smoke validation for auto progression (`tests/app_cli_phase6.odin`)
## Milestone 23: TUI Auto-All Pipeline
- [x] Added `auto all <pdf|png|cbz> <path>` command to auto-run next steps until export
- [x] Added parser/command tests for `auto all` parsing and export completion (`tests/app_cli_phase6.odin`)
- [x] Validated end-to-end `auto all` TUI smoke export run
## Milestone 24: Forced-Local Auto-All Mode
- [x] Added `auto all local <pdf|png|cbz> <path> [pages]` command to force fully-local auto pipeline
- [x] Added parser/command tests for `auto all local` parsing and export completion (`tests/app_cli_phase6.odin`)
- [x] Validated end-to-end `auto all local` TUI smoke export run
## Milestone 25A: Native GUI Bring-up
- [x] Added Raylib GUI runtime scaffold (`src/gui/runtime.odin`)
- [x] Added CLI entrypoint `gui` and command parsing support (`src/app/cli.odin`)
- [x] Implemented native window + screen router hotkeys + Story field editing + local action hotkeys (F5/F6/F7/F8)
- [x] Added parse coverage for `gui` command (`tests/app_cli_phase6.odin`)
## Milestone 25B: GUI Interaction Pass
- [x] Added clickable GUI action buttons (New, Generate Script Local, Generate Panels Local, Layout, Export PDF)
- [x] Added editable export path field in GUI and wired export button to field value
- [x] Added on-screen command panel/checklist copy and retained hotkey fallbacks
## Milestone 25C: GUI Navigation + Activity Visibility
- [x] Added clickable screen navigation tiles in sidebar (in addition to 1..8 hotkeys)
- [x] Added right-side action log panel with recent GUI actions/status messages
- [x] Preserved workflow-guard behavior for blocked screen transitions with explicit status feedback
## Milestone 25D: GUI Guided Controls
- [x] Added GUI `Next` action (button + F9) based on current guided workflow hint
- [x] Added GUI `Auto-All` action (button + F10) to run local flow through export
- [x] Added on-screen current `Next:` hint display and integrated action-log updates
## Milestone 25E: GUI Export/Script Controls
- [x] Added GUI export format selector (PDF/PNG/CBZ) used by export and guided actions
- [x] Added GUI local-script pages input field, used by script generation/Next/Auto-All
- [x] Kept hotkey parity and updated on-screen hints for new controls
## Milestone 25F: GUI Project Path & File Actions
- [x] Added editable GUI project path field (`./gui_project.comic.json` default)
- [x] Added clickable GUI Save/Open project buttons wired to storage adapter
- [x] Integrated selected export format into GUI export action and refreshed command panel/status layout
## Milestone 25G: GUI One-Click Session Workflow
- [x] Added `Auto-All + Save` GUI button to run local full flow then persist project
- [x] Wired button to reuse guided local pipeline + storage adapter save path
- [x] Updated command panel copy and action-log integration for one-click workflow
## Milestone 25H: GUI Productivity Hotkeys
- [x] Added GUI productivity shortcuts: `Ctrl+S` (save), `Ctrl+O` (open), `Ctrl+E` (export)
- [x] Reused existing adapter actions for consistent behavior with button-driven flows
- [x] Updated on-screen hotkey hints to expose productivity shortcuts
## Milestone 25I: GUI Session Management UX
- [x] Added GUI project path editing focus (`F12`) + Save/Open button flow integration
- [x] Added GUI dirty-state indicator (`Dirty: yes/no`) driven by edits/actions/save-open reset
- [x] Expanded command panel/action area to include Save/Open/Auto-All+Save session workflow
## Milestone 25J: GUI Destructive-Action Safeguards
- [x] Added unsaved-change guard for `New` and `Open` button actions
- [x] Require `Shift` modifier to confirm destructive New/Open when dirty
- [x] Added inline UI tip/status feedback and action-log entries for guarded actions
## Milestone 25K: GUI Keyboard Safety Parity
- [x] Added guarded keyboard reset shortcut `Ctrl+N` with `Ctrl+Shift+N` confirm when dirty
- [x] Added guarded keyboard open shortcut `Ctrl+O` with `Ctrl+Shift+O` confirm when dirty
- [x] Updated GUI hotkey hints/tooltips to document destructive keyboard confirmations
## Milestone 25L: GUI Autosave Controls
- [x] Added GUI autosave toggle button/state with interval-based autosave attempts
- [x] Added autosave status visibility in HUD and action log entries for autosave outcomes
- [x] Added keyboard toggle `Ctrl+Shift+A` and updated hotkey hints
## Milestone 25M: GUI Visual Polish Pass
- [x] Upgraded visual theme to modern card-based layout (header bar, rounded controls, soft borders)
- [x] Added selected-state input styling and modernized nav/button hover/active visuals
- [x] Reworked status/command/action-log sections into clear dashboard surfaces
## Milestone 26A: GUI Screen-Specific Summaries
- [x] Added dedicated screen summary card that changes content by active screen
- [x] Surfaced screen-relevant state details (Story/Script/Panels/Layout/Export/Community)
- [x] Replaced static command-only card with dynamic per-screen contextual summary
## Milestone 26B: GUI Per-Screen Mini-Lists
- [x] Added script-page mini-list in Script summary (first pages + overflow hint)
- [x] Added layout-page mini-list in Layout summary (page/pattern/panel count)
- [x] Added richer export summary details (last layout pattern + action hint)
## Milestone 26C: GUI Mini-List View Toggles
- [x] Added summary controls for Script/Layout mini-lists: show `Top` vs `All`
- [x] Added summary controls for Script/Layout ordering: `Asc` vs `Desc`
- [x] Wired toggle actions to status + action-log feedback
## Milestone 26D: GUI Summary Clarity + Empty States
- [x] Added compact KPI chips in summary header (pages/panels/layout counts)
- [x] Added explicit empty-state guidance for Script/Panels/Layout screens
- [x] Added export precondition messaging in summary when panels/layout are missing
## Milestone 26E: GUI Summary Controls Ergonomics
- [x] Added reusable summary-toggle helpers to unify Script/Layout show/sort behavior
- [x] Added keyboard shortcuts for summary controls (`Ctrl+H` show, `Ctrl+J` sort)
- [x] Updated summary control labels + sidebar hotkey hints for discoverability
## Milestone 26F: GUI Status Telemetry
- [x] Added status-card telemetry for last save time and last export time
- [x] Wired telemetry updates across save/export/manual-auto flows and autosave success
- [x] Expanded status card layout to surface action recency at-a-glance
## Milestone 26G: GUI Toast Feedback
- [x] Added transient toast notifications sourced from latest action-log event
- [x] Added basic severity coloring for failure/blocked vs success/info messages
- [x] Positioned toast in main workspace for immediate action feedback
## Milestone 26H: GUI Readiness Chips
- [x] Added compact readiness chips in status card (Script/Panels/Layout/Export)
- [x] Wired readiness states to live project data for at-a-glance pipeline progress
- [x] Integrated readiness row into status layout without regressing existing telemetry
## Milestone 26I: GUI Shortcuts Help Overlay
- [x] Added in-app keyboard shortcuts overlay (modal-style surface) with grouped guidance
- [x] Added help toggle via `/` key and Help button, plus `Esc` close behavior
- [x] Prevented text-field edits while help overlay is open to reduce accidental input
## Milestone 26J: GUI Destructive Confirmation Modal
- [x] Added explicit dirty-state confirmation modal for New/Open destructive flows
- [x] Added confirm/cancel interactions (buttons + Enter/Y confirm, Esc/N cancel)
- [x] Gated action handlers while confirm modal is open to avoid accidental overlap
## Milestone 26K: GUI Modal Input Isolation
- [x] Added unified interaction lock when help/confirm overlays are visible
- [x] Prevented background navigation/field-focus/action hotkeys while overlays are active
- [x] Forced help overlay closed when opening destructive confirm modal to avoid stacked modals
## Milestone 26L: GUI Pipeline Progress Meter
- [x] Added readiness stage counting helper for Script/Panels/Layout/Export pipeline
- [x] Added visual pipeline progress bar to status card (`ready/total` stages)
- [x] Integrated progress summary alongside next-step hint and existing status telemetry
## Milestone 26M: GUI Action Readiness Gating
- [x] Added visual disabled-state styling for dependent actions (Panels/Layout/Export)
- [x] Added explicit precondition messages for blocked action attempts (button + hotkey paths)
- [x] Added export precondition guards for `Ctrl+E`/`F8` parity with button behavior
## Milestone 26N: GUI Hover Guidance for Disabled Actions
- [x] Added contextual hover hints explaining why Panels/Layout/Export are disabled
- [x] Surfaced readiness guidance inline near action controls for faster recovery
- [x] Kept guidance aligned with existing readiness guards and status messaging
## Milestone 26O: GUI Recommended Action Highlighting
- [x] Added recommended-action resolver from workflow next-hint to primary action labels
- [x] Added visual emphasis styling for the currently recommended action button
- [x] Added inline `Recommended:` guidance when no blocking hover hint is active
## Milestone 26P: GUI Export Format Path Sync
- [x] Added format-to-suffix mapping and export-path normalization helpers
- [x] Auto-updated export path extension on format toggle (PDF/PNG/CBZ)
- [x] Added inline UI cue that format selection auto-fixes export extension
## Milestone 26Q: GUI Status Severity Styling
- [x] Added reusable message severity helpers (error/warning/info)
- [x] Applied severity-aware status text coloring in status card
- [x] Unified toast background coloring with shared severity classification
## Milestone 26R: GUI Action-Log Utilities
- [x] Added action-log utility controls in GUI (Clear + Copy status)
- [x] Added keyboard shortcuts `Ctrl+L` (clear log) and `Ctrl+Shift+C` (copy status)
- [x] Updated sidebar/help-overlay shortcut documentation for new utilities
## Milestone 26S: GUI Export Path Normalize Utility
- [x] Added `Fix Ext` action button beside export path input to normalize extension
- [x] Added keyboard shortcut `Ctrl+Shift+F` for extension normalization
- [x] Updated sidebar/help-overlay shortcut hints for export-path normalization
## Milestone 26T: GUI Export Path Presets
- [x] Added format-aware default export path helper (`./comic_export.<ext>`)
- [x] Added `Preset` action button beside export path input
- [x] Added keyboard shortcut `Ctrl+Shift+P` and updated in-app shortcut docs
## Milestone 26U: GUI Format-Specific Preset Filenames
- [x] Updated export presets to format-specific filenames (`comic.pdf`, `comic_png.zip`, `comic.cbz`)
- [x] Kept preset hotkey/button flows aligned with existing format selection state
- [x] Added inline export-path helper text documenting preset naming conventions
## Milestone 26V: GUI Export Summary Detail Pass
- [x] Extended Export screen summary with explicit target export path
- [x] Added shared export-block reason helper for concise precondition messaging
- [x] Upgraded Export summary guidance to show exact missing prerequisite(s)
## Milestone 26W: GUI Export Path Copy Utility
- [x] Added `Copy` action button beside export path controls
- [x] Added keyboard shortcut `Ctrl+Shift+X` to copy export path quickly
- [x] Updated sidebar/help shortcut docs to include export-path copy action
## Milestone 26X: GUI Export Path from Project Directory
- [x] Added helper to derive export output path from current project directory + format filename
- [x] Added `Use Dir` action button to set export path relative to project location
- [x] Added keyboard shortcut `Ctrl+Shift+D` and updated shortcut docs
## Milestone 26Y: GUI Field Clipboard Ergonomics
- [x] Added `Ctrl+V` paste into currently selected input field
- [x] Added `Ctrl+Shift+I` copy currently selected field content to clipboard
- [x] Updated sidebar/help overlay shortcut references for field clipboard actions
## Milestone 26Z: GUI Selected-Field Clear Actions
- [x] Added `Clear Field` action button to clear currently focused input quickly
- [x] Added keyboard shortcut `Ctrl+Backspace` for selected-field clearing
- [x] Added clear-action status feedback + updated shortcut docs
## Milestone 27A: GUI Autosave Interval Controls
- [x] Added editable autosave-interval field in GUI controls (`seconds`)
- [x] Added keyboard adjustments for autosave interval (`Ctrl+-` / `Ctrl+=`) with bounds
- [x] Integrated interval value into status telemetry and shortcut/help copy
## Milestone 27B: Autosave Interval Presets + Input Guardrails
- [x] Added autosave preset buttons (`15/30/60`) beside interval input
- [x] Added keyboard presets (`Ctrl+7/8/9`) for fast interval switching
- [x] Added numeric-only typing guard for interval field and bounded parse normalization
## Milestone 27C: GUI Quick Helper Reset
- [x] Added `Reset Helpers` action button for export/pages/autosave helper fields
- [x] Added keyboard shortcut `Ctrl+0` for one-shot helper-field reset
- [x] Updated sidebar/help shortcut docs for helper reset workflow
## Milestone 27D: Project-Aware Export Path Sync on Open
- [x] Added helper to sync export target to project directory after successful project open
- [x] Applied sync behavior across modal-confirm, button, and keyboard open flows
- [x] Updated open status feedback to include resolved export target path
## Milestone 27E: Project Path from Export Directory Utility
- [x] Added helper to derive project path from current export directory
- [x] Added `From Exp` project-path button and `Ctrl+Shift+G` shortcut
- [x] Updated shortcut docs in sidebar/help overlay for path sync utilities
## Milestone 27F: Project Path Extension Normalization
- [x] Added project-path normalization helper to enforce `.comic.json` suffix
- [x] Added `Fix Ext` button for project path and `Ctrl+Shift+J` shortcut
- [x] Updated sidebar/help shortcut docs for project-path normalization
## Milestone 27G: Path Normalization on I/O Actions
- [x] Added export/project path field normalization helpers for runtime actions
- [x] Applied normalization before save/open/export and guided export hotkeys/actions
- [x] Applied normalization in autosave + modal-confirm open flow to reduce path-related failures
## Milestone 27H: Path Health Indicators
- [x] Added helpers to validate project-path suffix and export-path/format consistency
- [x] Surfaced live path-health status (`P/E`) in status telemetry line
- [x] Kept indicators aligned with existing normalization + save/export workflows
## Milestone 27I: Path Health Quick-Fix Controls
- [x] Added compact status-card quick-fix buttons for invalid path indicators (`P`/`E`)
- [x] Added keyboard quick-fix shortcuts (`Ctrl+Shift+K` project, `Ctrl+Shift+M` export)
- [x] Updated sidebar/help shortcut docs for path quick-fix workflow
## Milestone 27J: One-Shot Path Health Repair
- [x] Added combined path-fix action to normalize both project and export paths in one step
- [x] Added compact status control (`PE`) for one-click all-path repair
- [x] Added keyboard shortcut `Ctrl+Shift+U` + updated shortcut docs for all-path fix
## Milestone 27K: Path Health Guidance Copy
- [x] Added path-health hint helper for invalid project/export path states
- [x] Surfaced actionable inline guidance with specific quick-fix shortcuts/buttons
- [x] Kept guidance synchronized with `P/E/PE` status controls and path checks
## Milestone 27L: Diagnostics Snapshot Utility
- [x] Added diagnostics snapshot builder for clipboard-friendly runtime state summary
- [x] Added GUI diagnostics copy actions (`Diag` button, `Ctrl+Shift+Y`)
- [x] Updated sidebar/help shortcut docs for diagnostics export workflow
## Milestone 27M: Diagnostics File + Help Overlay Compaction
- [x] Added diagnostics file export action (`DiagFile` button, `Ctrl+Shift+R`) using project-directory target
- [x] Added diagnostics-path helper and write-status feedback for file generation
- [x] Refactored help overlay into compact grouped sections to prevent overflow and keep shortcuts readable
## Milestone 27N: Action Log Snapshot Copy
- [x] Added action-log snapshot serializer for clipboard export
- [x] Added `LogCp` control and keyboard shortcut `Ctrl+Shift+L` to copy recent log lines
- [x] Updated help/sidebar shortcut guidance to document log snapshot workflow
## Milestone 27O: Session Report Export
- [x] Added combined session-report builder (diagnostics + action-log snapshot)
- [x] Added `Report` action button and `Ctrl+Shift+W` shortcut to write report file
- [x] Updated help/sidebar shortcut guidance for session-report export
## Milestone 27P: Enriched Diagnostics Payload
- [x] Expanded diagnostics snapshot with next-step hint and content counts (pages/panels/layouts/chars)
- [x] Added runtime uptime field to diagnostics for temporal context
- [x] Added report metadata section (`generated_uptime`) in session-report output
## Milestone 27Q: Time-Aware Action Log Entries
- [x] Added per-entry timestamp tracking in circular action-log state
- [x] Rendered action-log rows with relative age markers (`[Xs]`)
- [x] Included age-prefixed entries in action-log snapshot exports
## Milestone 27R: Action Log View Controls
- [x] Added runtime controls for action-log line count (4/6) and order (newest/oldest)
- [x] Added keyboard toggles (`Ctrl+Shift+T` lines, `Ctrl+Shift+B` order)
- [x] Added log-view HUD label and updated help/sidebar shortcut guidance
## Milestone 27S: Log View Reset + Diagnostics Context
- [x] Added `LogDef` control and `Ctrl+Shift+Z` shortcut to reset log view defaults
- [x] Included current log-view settings in diagnostics/session-report payloads
- [x] Updated help/sidebar guidance for expanded log tooling shortcuts
## Milestone 28A: GUI Diagnostics/Report Write Helper Extraction
- [x] Added shared helpers for diagnostics/report file writing status handling
- [x] Replaced duplicated button/hotkey write blocks with helper calls
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28B: GUI Clipboard Helper Extraction
- [x] Added shared clipboard helper for text-copy status flows
- [x] Replaced duplicated clipboard button/hotkey handlers with helper calls
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28C: GUI Status/Log Push Helper Extraction
- [x] Added shared `push_status` helper for status assignment + action-log append
- [x] Replaced repeated status/log blocks across diagnostics, log-view, and clipboard hotkeys/actions
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28D: Autosave Interval Update Helper Extraction
- [x] Added shared autosave-interval setter helper with bounds enforcement + status message formatting
- [x] Replaced duplicated button/hotkey autosave-interval update blocks with helper calls
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28E: Path Action Helper Extraction
- [x] Added shared path-action helpers returning status messages (preset/sync/fix/all-fix)
- [x] Replaced duplicated button/hotkey path-update blocks with helper + `push_status` usage
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28F: Project Reset/Open Action Helper Extraction
- [x] Added shared helpers for reset/open project session flows (state replace, screen sync, dirty/autosave updates)
- [x] Replaced duplicated confirm/button/hotkey reset-open blocks with helper calls
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28G: Project Save Action Helper Extraction
- [x] Added shared helper for project save flows (path normalization, save call, dirty/autosave/save timestamps)
- [x] Replaced duplicated Save button and `Ctrl+S` save blocks with helper calls
- [x] Reused save helper in Auto-All+Save success path while preserving status semantics
## Milestone 28H: Workflow Action Helper Extraction
- [x] Added shared helpers for script/panels/layout/export/next/auto action execution with consistent dirty/export-timestamp updates
- [x] Replaced duplicated button and F5F10/`Ctrl+E` action blocks with helper + `push_status` calls
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28I: Navigation Status Helper Extraction
- [x] Added shared screen-navigation status helpers for button-driven sidebar navigation
- [x] Replaced duplicated per-screen button navigation blocks with helper + `push_status` calls
- [x] Preserved navigation guard/error behavior while reducing runtime event-loop duplication
## Milestone 28J: Confirmation/Autosave/Helper-Reset Action Extraction
- [x] Added shared helpers for destructive-action confirmation requests, autosave toggle messaging, and helper-field resets
- [x] Replaced duplicated button/hotkey blocks (`New`/`Open` dirty prompts, autosave toggles, helper reset) with helper + `push_status` calls
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28K: Summary/Paste/Clear Interaction Helper Extraction
- [x] Added shared helpers for summary toggles (supported-screen guard), selected-field clear status, and clipboard paste-to-selected-field
- [x] Replaced duplicated button/hotkey blocks (`summary show/sort`, `clear field`, `Ctrl+V`, `Ctrl+Backspace`) with helper + `push_status` calls
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28L: Export-Format + Autosave-Tick Helper Extraction
- [x] Added shared helper for export-format switching (format update + path sync + dirty/status handling)
- [x] Added shared autosave-tick helper (interval gating, path normalization, save attempt, dirty/save timestamp updates)
- [x] Replaced duplicated export-format button and autosave-loop blocks with helper + `push_status` usage
## Milestone 28M: Confirm-Resolve + Auto-All-Save Helper Extraction
- [x] Added shared helper to resolve pending destructive confirm actions (`Reset/Open/None`) into a single status path
- [x] Added shared helper for `Auto-All + Save` flow (auto pipeline + export timestamp + save)
- [x] Replaced duplicated confirm-yes switch and auto-save button block with helper + `push_status` usage
## Milestone 28N: Help/Log-Clear Micro-Helper Extraction
- [x] Added shared helpers for help-overlay toggle/close and action-log clear messaging
- [x] Replaced duplicated help toggle/close and log-clear button/hotkey blocks with helper usage
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28O: Optional-Status Push Helper Extraction
- [x] Added shared `push_status_if_nonempty` helper for optional-message action paths
- [x] Replaced duplicated non-empty checks in summary toggles, clipboard paste, and autosave-tick status flow
- [x] Standardized initial GUI status-log seed via shared status push helper
## Milestone 28P: Log-View Toggle Helper Extraction
- [x] Added shared helpers for log-view reset/toggle messaging (reset lines/order)
- [x] Replaced duplicated log-view button/hotkey blocks (`LogDef`, `Ctrl+Shift+Z/T/B`) with helper + `push_status` usage
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28Q: Diagnostics/Report Action Helper Consolidation
- [x] Added shared helpers for diagnostics/report write/copy actions and action-log snapshot copy
- [x] Replaced duplicated button/hotkey diagnostics/report/log-copy blocks with helper + `push_status` usage
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28R: Diagnostics Action Context Struct Introduction
- [x] Added `Diagnostics_Action_Context` + builder helper to consolidate wide diagnostics/report argument sets
- [x] Refactored diagnostics/report/log-copy button and hotkey handlers to pass context objects into helpers
- [x] Preserved behavior while improving readability and reducing call-site parameter noise
## Milestone 28S: Dirty+Status Push Helper Extraction
- [x] Added shared `push_dirty_status` helper for common "mark dirty + push status" action paths
- [x] Replaced duplicated dirty/status blocks across autosave interval presets/hotkeys and path-fix hotkeys/buttons
- [x] Preserved behavior while reducing runtime event-loop duplication
## Milestone 28T: GUI Helper Test Coverage Expansion
- [x] Added focused tests for extracted non-render GUI helpers (`parse_autosave_interval`, autosave text setter, log-view toggles, export-format switch helper)
- [x] Added focused test for diagnostics action-context builder mapping
- [x] Kept test allocator hygiene by explicitly deleting helper-produced strings in tests
## Milestone 28U: GUI Helper Test Coverage Expansion II
- [x] Added focused tests for path normalization/fix helpers (`normalize_project_path`, `fix_all_paths`)
- [x] Added focused tests for summary-toggle supported-screen guards and dirty+status push helper behavior
- [x] Resolved test ownership edge case (constant-string bad free) and kept allocator hygiene clean
## Milestone 28V: GUI Helper Test Coverage Expansion III
- [x] Added focused tests for optional-status push behavior (`push_status_if_nonempty`) and confirmation-request state updates
- [x] Added focused autosave no-op test coverage for disabled/clean-state guard paths (`autosave_tick_with_message`)
- [x] Expanded helper coverage without introducing render/runtime coupling
## Milestone 28W: GUI Helper Test Coverage Expansion IV
- [x] Added focused tests for log maintenance helpers (`clear_action_log_with_message`, `reset_log_view_with_message`)
- [x] Added focused test for confirm-action resolver `.None` branch behavior
- [x] Increased non-render GUI helper confidence while keeping tests isolated from rendering loop
## Milestone 28X: GUI Helper Test Coverage Expansion V
- [x] Added focused tests for help-overlay toggle/close helpers and export-path preset/derivation helper flows
- [x] Added focused test for project reset-session helper state effects (dirty reset + screen sync)
- [x] Maintained allocator hygiene in new helper tests (including overwrite/delete ownership handling)
## Milestone 28Y: GUI Helper Test Coverage Expansion VI
- [x] Added focused tests for autosave toggle messaging and helper-field reset defaults
- [x] Added focused tests for selected-field clear helper behavior (changed vs already-empty paths)
- [x] Expanded non-render helper coverage while keeping full build/test gate green
## Milestone 28Z: GUI Helper Test Coverage Expansion VII
- [x] Added focused tests for path-health hints/predicates and screen-label helper mapping
- [x] Added focused test for navigation-status helper successful path
- [x] Continued non-render helper coverage growth with allocator-safe test cleanup
## Milestone 29A: Action-Log Snapshot Memory Hardening + Tests
- [x] Added focused action-log behavior tests (ring-buffer retention and clear/snapshot behavior)
- [x] Fixed `build_action_log_snapshot` temporary-string cleanup to eliminate builder leaks under repeated concatenation
- [x] Kept full build/test gate green with expanded suite
## Milestone 29B: Diagnostics/Report String Lifecycle Hardening
- [x] Made empty action-log snapshots consistently heap-owned strings for predictable cleanup
- [x] Added explicit cleanup for intermediate diagnostics/report/log-snapshot strings in write/copy helper flows
- [x] Updated helper tests for new snapshot ownership semantics and kept full suite green
## Milestone 29C: Status Message Ownership Hardening
- [x] Added `set_status` helper and routed `push_status` through owned string replacement semantics
- [x] Standardized GUI runtime status initialization/disposal and converted remaining direct status assignments to owned-status updates
- [x] Updated helper tests to use owned status strings under new lifecycle semantics and kept full suite green
## Milestone 29D: Action-Log Timestamp Reset Hardening
- [x] Hardened `action_log_dispose` to reset `last_push_at` alongside entries/count state
- [x] Added focused tests for status replacement helper and action-log clear timestamp-reset behavior
- [x] Kept full build/test gate green with expanded helper suite
## Milestone 29E: Confirm/Open Helper Branch Test Expansion
- [x] Added focused test for `open_project_session` missing-file branch (error propagation + state/timestamp/dirty preservation)
- [x] Added focused test for `resolve_confirm_action_with_message` reset branch dispatch behavior
- [x] Expanded non-render helper branch coverage while keeping full build/test gate green
## Milestone 29F: Open/Confirm Success-Path Test Expansion
- [x] Added focused success-path tests for `open_project_session` and confirm resolver open-branch dispatch
- [x] Verified loaded-state replacement, dirty reset, export-path sync, and autosave timestamp refresh behavior
- [x] Applied owned-controller disposal in new load-path tests to keep allocator hygiene clean
## Milestone 29G: Diagnostics/Report Write-Path Test + Leak Hardening
- [x] Added focused tests for diagnostics/report write helpers creating expected output files in temp project dirs
- [x] Hardened diagnostics/report path helper call-sites with explicit path-string cleanup after writes
- [x] Aligned diagnostics write-status assertion to current runtime wording and kept full suite green
## Milestone 29H: Diagnostics/Open Failure-Path Test Expansion
- [x] Added focused failure-path tests for diagnostics/report write helpers when project directory is missing
- [x] Extended missing-file open-session test to assert project-path normalization side effect
- [x] Kept full build/test gate green with expanded non-render helper branch coverage
## Milestone 29I: Confirm/Open Path-Behavior Test Tightening
- [x] Strengthened open-session success-path assertions to verify export-path project-directory sync (not just suffix)
- [x] Strengthened confirm-resolver open-branch success assertions with project-directory sync checks
- [x] Added focused confirm-resolver open-branch missing-file test for state/dirty/timestamp preservation
## Milestone 29J: Autosave Success-Path Helper Test Expansion
- [x] Added focused autosave-tick success-path test validating project write, dirty-clear behavior, and save timestamp update
- [x] Verified autosave project-path normalization behavior under successful save flow
- [x] Kept full build/test gate green with expanded non-render helper coverage
## Milestone 30A: GUI Aesthetic Foundation Refresh
- [x] Added reusable `draw_card` surface helper with subtle shadow + consistent border treatment
- [x] Applied refreshed scene styling (soft gradient background, tuned sidebar/header separation, unified card surfaces)
- [x] Switched key dashboard/summary/log surfaces to shared card rendering for more consistent visual hierarchy
## Milestone 30B: GUI Aesthetic Hierarchy Pass
- [x] Added `draw_button_primary` and applied primary styling to high-priority actions (`Next`, `Auto-All`, `Auto-All + Save`)
- [x] Refined base component theming (button/nav/input color tuning, selected input fill treatment)
- [x] Tuned sidebar/headline/recommendation hint color hierarchy for clearer visual emphasis
## Milestone 30C: GUI Spacing + Sidebar Information Architecture Pass
- [x] Replaced dense sidebar hotkey wall with grouped shortcut cards via `draw_sidebar_shortcuts`
- [x] Improved shortcut readability through sectioned labels (`Workflow`, `Tools`) and tighter typography rhythm
- [x] Preserved full help-overlay detail while reducing main-view visual noise
## Milestone 30D: Main-Canvas Spacing + Section Framing Pass
- [x] Added framed card surfaces for `Project Inputs` and `Actions` zones to improve visual grouping on the main canvas
- [x] Tuned field-label typography scale and hierarchy (18px labels, section headings, less noisy tip/editing treatments)
- [x] Repositioned inline editing indicator and tightened supporting copy emphasis for cleaner rhythm
## Milestone 30E: Overlay + Log/Status Readability Polish
- [x] Refined help and confirm overlays with stronger contrast layering, shared card surfaces, and calmer section typography
- [x] Improved action-log readability with subtle alternating row backgrounds and tuned log text colors
- [x] Tuned status/log metadata typography sizing and color balance for cleaner dashboard scanning
## Milestone 30F: Action-Zone Micro-Hierarchy Polish
- [x] Added reusable `draw_hint_pill` helper for compact contextual guidance chips
- [x] Replaced noisy inline editing text with structured hint pills (`field focus`, safety hint, next/auto hint)
- [x] Added subtle status-header divider line to improve status card scan rhythm
## Milestone 30G: Confirm/Toast Emphasis Polish
- [x] Added `draw_button_danger` style and applied it to destructive confirm CTA in modal overlay
- [x] Enhanced toast visual treatment with subtle shadow and border for clearer transient message legibility
- [x] Preserved behavior while improving visual emphasis on high-risk actions and transient feedback
## Milestone 30H: Status Card Badge + Micro-Readability Pass
- [x] Added reusable `draw_status_badge` helper for compact status chips
- [x] Replaced plain dirty/autosave status text with badge-style indicators for faster visual parsing
- [x] Fine-tuned status-card spacing/metadata alignment to maintain clean scan rhythm
## Milestone 30I: Utility Control Density + Visual Weight Pass
- [x] Added reusable `draw_small_button` helper for compact utility controls
- [x] Shifted low-priority utility controls (path tools, autosave presets, summary toggles, log toolbar) to compact button treatment
- [x] Updated log-toolbar labels for improved clarity while reducing visual heaviness
## Milestone 30J: Header Context Chip Polish
- [x] Replaced plain top-header active-screen text with contextual hint-chip treatment for clearer glanceability
- [x] Added compact project-pages context chip in header row to reinforce current workflow context
- [x] Tuned header typography weight/size balance while preserving existing field-edit behavior
## Milestone 30K: Sidebar/Nav Framing + Tip Presentation Polish
- [x] Added framed card surface around the screen-navigation cluster to improve left-rail structure
- [x] Replaced bottom plain-text caution tip with accented hint-pill treatment for visual consistency
- [x] Preserved behavior while reducing loose text noise in the primary canvas
## Milestone 30L: Section Title Rhythm + Log Header Consolidation
- [x] Added reusable `draw_section_title` helper for consistent section-heading styling
- [x] Applied section-title treatment to key canvas regions (`Project Inputs`, `Actions`, `Action Log`)
- [x] Simplified action-log renderer by removing duplicate internal title drawing for cleaner hierarchy
## Milestone 30M: Secondary Action Visual Tiering
- [x] Added `draw_button_soft_accent` helper for medium-priority actions
- [x] Applied soft-accent treatment to Save/Open/Help controls to better separate them from neutral and primary CTAs
- [x] Preserved behavior while improving action hierarchy legibility
## Milestone 30N: Status/Log Metadata Pill Polish
- [x] Replaced dense status metadata lines with compact save/export/path pill treatments for cleaner glanceability
- [x] Added path-health badge stack (`P`/`E`) and accented inline path-fix hint pill in status card
- [x] Added compact log-toolbar shortcut hint pill to improve discoverability without visual clutter
## Milestone 30O: Topbar Container + Chip Refinement
- [x] Added framed topbar container card to visually anchor header context controls
- [x] Added dedicated `draw_topbar_chip` helper for refined topbar context pills
- [x] Updated header chip placements/styles for cleaner alignment and improved glance readability
## Milestone 30P: Sidebar Brand/Footer Cohesion Pass
- [x] Added framed sidebar brand card and section-title divider rhythm for a cleaner left-rail header
- [x] Added compact sidebar footer support card (`/` help reminder + overlay close hint)
- [x] Preserved behavior while improving left-rail visual cohesion and onboarding clarity
## Milestone 30Q: Action/Log Toolbar Surface Unification
- [x] Added reusable `draw_subtle_strip` helper for lightweight grouped-control backgrounds
- [x] Applied subtle strip treatment to action-row and action-log toolbar regions for stronger grouping without heavy chrome
- [x] Preserved behavior while improving scan rhythm across high-density control zones
## Milestone 30R: Destructive-Action Visual Cue Pass
- [x] Added `draw_button_warning` helper for low-intensity destructive/irreversible action emphasis
- [x] Applied warning-style treatment to `New` action in the primary action row to better signal reset risk
- [x] Preserved behavior while improving safety affordance visibility
## Milestone 30S: Active Navigation Marker Polish
- [x] Enhanced active sidebar nav item styling with a subtle marker dot and adjusted label offset
- [x] Preserved existing hover/active behavior while improving active-screen discoverability
- [x] Kept full build/test gate green
## Milestone 30T: Micro-Copy Pill Consistency Pass
- [x] Replaced plain helper micro-copy near export format/path controls with compact hint-pill treatments
- [x] Replaced summary toggle hotkey plain text with compact hint-pill treatment for visual consistency
- [x] Preserved behavior while reducing scattered plain-text noise
## Milestone 30U: Log Toolbar Layout Alignment Pass
- [x] Re-aligned log toolbar button geometry to fit cleanly within the action-log card bounds
- [x] Tightened toolbar label lengths and shortcut-hint placement to reduce overlap risk in dense log controls
- [x] Preserved behavior while improving right-panel visual alignment
## Milestone 30V: Status Card Density Rebalance
- [x] Consolidated save/export/path metadata into a single compact status line inside the status card bounds
- [x] Removed overflow-prone stacked metadata pills from the status region to reduce visual crowding
- [x] Preserved behavior while improving status-card containment and scan clarity
## Milestone 30W: Input-Row Rhythm Surface Pass
- [x] Applied subtle strip surfaces behind each primary input row in the `Project Inputs` region
- [x] Extended strip treatment to path row + action row for stronger vertical rhythm continuity
- [x] Preserved behavior while improving form scanability and visual cadence
## Milestone 30X: Utility/Modal Secondary Emphasis Pass
- [x] Applied soft-accent visual tier to helper controls (`Reset Helpers`, autosave toggle) for clearer control grouping
- [x] Applied soft-accent styling to confirm modal `Cancel` action for stronger destructive/non-destructive contrast
- [x] Preserved behavior while improving action hierarchy readability
## Milestone 30Y: Focus/Affordance Refinement Pass
- [x] Enhanced selected-input affordance with subtle outer halo + focus border treatment for clearer field focus
- [x] Extended active navigation cueing with a slim active rail marker inside selected sidebar items
- [x] Preserved behavior while improving interaction-state discoverability
## Milestone 30Z: Primary Action Guidance Chip Pass
- [x] Replaced plain recommended/hint text near Next/Auto controls with consistent hint-pill treatment
- [x] Added compact key-hint pills (`F9 Next`, `F10 Auto`) under primary action buttons for faster keyboard discoverability
- [x] Preserved behavior while improving action-guidance visual consistency
## Milestone 31A: UI Text-Overflow Resilience Pass
- [x] Added shared `fit_text_for_width` helper for width-aware truncation with ellipsis
- [x] Applied overflow-safe text rendering to hint/topbar/status badges and toast surface text
- [x] Applied status-line overflow-safe rendering in status card to prevent long-message spillover
## Milestone 31B: Button Label Overflow Resilience Pass
- [x] Applied width-aware label fitting across button styles (default/primary/danger/warning/soft-accent + disabled states)
- [x] Applied width-aware label fitting for compact utility buttons in enabled/disabled states
- [x] Preserved behavior while preventing long labels from overflowing high-density control regions
## Milestone 31C: Nav/Input Overflow Resilience Pass
- [x] Applied width-aware label fitting to sidebar nav items (including active-state offset handling)
- [x] Applied non-editing input-field text fitting to prevent long values from spilling outside input surfaces
- [x] Preserved editing ergonomics by keeping full-value rendering while an input is actively selected
## Milestone 31D: Sidebar Shortcut Overflow Resilience Pass
- [x] Added `draw_sidebar_shortcut_line` helper with width-aware text fitting for left-rail shortcut copy
- [x] Replaced direct sidebar shortcut text draws with overflow-safe helper usage
- [x] Preserved shortcut content while improving resilience to long copy and future wording changes
## Milestone 31E: Help Overlay Overflow Resilience Pass
- [x] Added `draw_help_line` helper with width-aware text fitting for help-overlay body copy
- [x] Replaced direct long shortcut lines in help overlay with overflow-safe helper usage
- [x] Preserved content/structure while improving resilience to future shortcut-copy growth
## Milestone 31F: Action Log Line Overflow Resilience Pass
- [x] Added width-aware fitting for rendered action-log lines (including timestamp prefix)
- [x] Prevented long log entries from spilling past right-panel bounds in compact log view
- [x] Preserved log semantics while improving dense-session readability
## Milestone 31G: Summary/Status Metadata Overflow Resilience Pass
- [x] Added `draw_summary_line` helper and applied overflow-safe rendering to long dynamic summary lines (genre/audience/title/export target/block reason)
- [x] Applied overflow-safe rendering to status-card pipeline/next and metadata footer lines
- [x] Preserved behavior while improving resilience under long project names/paths/messages
## Milestone 31H: Overlay/Layout-Row Overflow Resilience Pass
- [x] Applied overflow-safe fitting to confirm-overlay action sentence to guard long action labels/future copy changes
- [x] Applied overflow-safe summary-line rendering for layout pattern rows (`- P#: pattern (n)`) in both asc/desc views
- [x] Applied overflow-safe fitting to log-view metadata line (`View: n lines, order first`) in utility bar
## Milestone 31I: Chip Micro-Overflow Resilience Pass
- [x] Applied width-aware fitting to compact stat-chip label/value rendering (`draw_stat_chip`) for narrow chip bounds
- [x] Applied width-aware fitting to readiness-chip line rendering (`draw_readiness_chip`) using chip width argument
- [x] Preserved chip semantics while preventing crowding/spill in compact telemetry surfaces
## Milestone 31J: Screen Summary Uniform Overflow Pass
- [x] Expanded overflow-safe summary rendering across remaining dynamic Screen Summary lines (story/script/panels/layout/bubbles/export)
- [x] Replaced direct dynamic DrawText formatting with `draw_summary_line` for consistent truncation behavior
- [x] Preserved summary semantics while improving resilience under high-count data and long formatted values
## Milestone 31K: Summary Helper Consistency Pass
- [x] Applied width-aware fitting to section-title labels for tighter heading-bound resilience
- [x] Added `draw_summary_subline` helper for 16px secondary summary text with consistent width fitting
- [x] Replaced export "Last layout pattern" subline rendering with helper usage to reduce one-off formatting logic
## Milestone 31L: Fitted-Text Helper Consolidation Pass
- [x] Added shared `draw_text_fitted` helper to unify fit+draw behavior and reduce repeated truncation boilerplate
- [x] Refactored section-title/summary/help/sidebar shortcut helpers to use the consolidated text-fit renderer
- [x] Preserved behavior while reducing one-off fitting/draw patterns and tightening future maintenance seams
## Milestone 31M: Button Text Renderer Consolidation Pass
- [x] Refactored all primary button draw variants to use shared `draw_text_fitted` (default/primary/danger/warning/soft-accent)
- [x] Refactored enabled/disabled compact button text rendering and disabled-state standard button rendering to use shared helper
- [x] Preserved behavior while reducing repeated fit+draw branches in high-touch control rendering paths
## Milestone 31N: Surface/Chip Text Renderer Consolidation Pass
- [x] Refactored nav-item labels and non-selected input text rendering to use shared `draw_text_fitted`
- [x] Refactored hint/topbar/status chips plus stat/readiness chip text rendering to use shared helper
- [x] Preserved behavior while reducing repeated fit+draw fragments across non-button UI surfaces
## Milestone 31O: Status/Log Fitted-Text Consolidation Pass
- [x] Refactored action-log row rendering and toast text rendering to use shared `draw_text_fitted`
- [x] Refactored confirm-overlay action sentence and status-card text rows (status/pipeline/next/meta) to use shared helper
- [x] Refactored log utility metadata line (`View: n lines, order first`) to use shared helper while preserving existing copy/behavior
## Milestone 31P: Text-Fit Helper Test Coverage Pass
- [x] Added direct helper tests for `fit_text_for_width` truncation behavior (ellipsis + minimum-width rule)
- [x] Added helper passthrough tests for no-truncation and `px_per_char <= 0` paths
- [x] Revalidated full suite after test additions (76 passing)
## Milestone 32A: GUI File Split Kickoff (Text Helpers)
- [x] Started structural decomposition of `src/gui/runtime.odin` by extracting text-fit helpers into `src/gui/text_helpers.odin`
- [x] Moved `fit_text_for_width` and `draw_text_fitted` into the new module without behavior change
- [x] Revalidated full build/test gate after file split (76 passing)
## Milestone 32B: GUI File Split (Widget Primitives)
- [x] Extracted shared widget primitives from `src/gui/runtime.odin` into `src/gui/widgets.odin`
- [x] Moved card/strip/chip/section-summary draw helpers (`draw_card`, `draw_subtle_strip`, `draw_hint_pill`, `draw_topbar_chip`, `draw_status_badge`, `draw_section_title`, `draw_summary_line`, `draw_summary_subline`)
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32C: GUI File Split (Overlays + Log Views)
- [x] Extracted overlay/log rendering helpers from `src/gui/runtime.odin` into `src/gui/overlays.odin`
- [x] Moved action-log/toast/status-color + help/sidebar/confirm overlay draw helpers without behavior changes
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32D: GUI File Split (Summary + Readiness Views)
- [x] Extracted summary/readiness rendering helpers from `src/gui/runtime.odin` into `src/gui/summary_views.odin`
- [x] Moved status progress/readiness helpers and screen summary rendering (`draw_stat_chip`, `draw_readiness_chip`, `ready_stage_count`, `draw_progress_bar`, `draw_readiness_row`, `export_block_reason`, `draw_screen_summary`)
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32E: GUI File Split (Controls)
- [x] Extracted control rendering helpers from `src/gui/runtime.odin` into `src/gui/controls.odin`
- [x] Moved button/nav/input primitives and control helpers (`button_clicked`, button variants, `draw_small_button*`, `button_readiness_hint`, `draw_button_recommended`, `draw_nav_item`, `draw_input_field`)
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32F: GUI File Split (Path + Export Helper Layer)
- [x] Extracted path/export normalization and sync helpers from `src/gui/runtime.odin` into `src/gui/path_helpers.odin`
- [x] Moved format/path utility + path-message helpers (`format_suffix`, normalization helpers, preset/sync/fix helpers, path-health checks)
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32G: GUI File Split (Diagnostics + Report Helpers)
- [x] Extracted diagnostics/report helper layer from `src/gui/runtime.odin` into `src/gui/diagnostics.odin`
- [x] Moved diagnostics snapshot/report builders, context struct/builder, diagnostics/report file writers, and clipboard snapshot helpers
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32H: GUI File Split (Session + Status Helpers)
- [x] Extracted session/status/helper-state layer from `src/gui/runtime.odin` into `src/gui/session_helpers.odin`
- [x] Moved status/log push helpers, navigation/confirmation toggles, selected-field clear/paste helpers, and `Action_Log` lifecycle helpers
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32I: GUI File Split (Workflow + Action Helpers)
- [x] Extracted workflow/action helper layer from `src/gui/runtime.odin` into `src/gui/actions.odin`
- [x] Moved generation/layout/export runners, next/auto-all helpers, summary toggle helpers, interval parsers, and autosave/session action helpers
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32J: GUI File Split (Local Generation + Utility Helpers)
- [x] Extracted local generation and utility helper layer from `src/gui/runtime.odin` into `src/gui/local_helpers.odin`
- [x] Moved local script/panel builders, panel collection/count helpers, text append/pop helpers, recommended-label helper, and pending-action label helper
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32K: GUI File Split (Shared Types)
- [x] Extracted shared GUI types from `src/gui/runtime.odin` into `src/gui/types.odin`
- [x] Moved `Summary_View_Options` and `Pending_Confirm_Action` declarations to the dedicated types module
- [x] Revalidated full build/test gate after split (76 passing)
## Milestone 32L: Runtime Import Cleanup Checkpoint
- [x] Removed stale `runtime.odin` imports left behind after module extraction (`os`, `filepath`, `strconv`, `adapters`)
- [x] Kept runtime import surface aligned to active dependencies only (`fmt`, `strings`, `raylib`, `core`, `shared`, `ui`)
- [x] Revalidated full build/test gate after cleanup (76 passing)
## Milestone 32M: Fullscreen Startup Mode
- [x] Updated GUI runtime startup to size window to current monitor and toggle fullscreen on launch
- [x] Verified build + GUI launch path with fullscreen initialization
- [x] Revalidated build/test gate (`./build.sh`, `odin test tests`)
## Milestone 33A: Visual Redesign (Modern Theme Pass)
- [x] Refreshed global shell styling with richer gradients, soft ambient highlights, and cleaner sidebar/topbar contrast
- [x] Modernized core surfaces (cards/strips/chips) and controls (buttons/nav/input focus) with updated radii, shadows, and contemporary palette tuning
- [x] Refined UI microcopy labels in primary form regions for cleaner modern presentation while preserving behavior
## Milestone 33B: Layout Rhythm + Typography Pass
- [x] Refined section heading typography/underline treatment for stronger hierarchy and cleaner modern framing
- [x] Tuned topbar/input/action/status/log panel vertical rhythm (card heights, heading baselines, content offsets) for more consistent spacing cadence
- [x] Preserved behavior while improving visual balance and readability in dense dashboard regions
## Milestone 33C: Visual Course-Correction (Clean Minimal Pass)
- [x] Rebalanced redesign styling toward a cleaner minimal look (reduced visual noise, flatter shell treatment, calmer surface/controls palette)
- [x] Reverted over-aggressive spacing/offset shifts in topbar/status/log regions to restore stable layout rhythm while keeping modern polish
- [x] Revalidated full build/test gate after visual corrections (76 passing)
## Milestone 33D: Clutter Reduction + Readability Pass
- [x] Reduced dashboard visual clutter by removing non-essential row-strip treatments and duplicate key-hint pills in the action region
- [x] Consolidated top helper guidance into a single compact hint rail and simplified field-focus copy
- [x] Improved form label readability with lighter typography weight/size and calmer color tone while preserving behavior
## Milestone 33E: Minimalist Visual Reset Pass
- [x] Flattened shell styling to a cleaner neutral canvas (removed decorative gradients/highlights and reduced ornamental contrast)
- [x] Simplified card/strip component treatment to low-noise borders with restrained depth for a more professional utility-tool look
- [x] Rebalanced primary/nav palette saturation and corner radii for calmer modern controls without changing behavior
## Milestone 33F: Linear-like Dark Crisp Theme Pass
- [x] Shifted shell/surfaces/controls to a dark neutral palette with crisp blue accents for primary/active affordances
- [x] Updated summary/overlay/log text and chip/readiness/status color treatment for dark-background readability and contrast
- [x] Revalidated full build/test gate after dark-theme pass (76 passing)
## Milestone 33G: Fullscreen Reliability Follow-up
- [x] Updated GUI window startup flow to maximize on launch and enforce borderless-windowed state for better full-screen coverage behavior
- [x] Preserved existing rendering/input behavior while improving startup window mode handling on desktop
- [x] Revalidated full build/test gate after window-mode adjustments (76 passing)
## Milestone 33H: Fullscreen Utilization + Dark Theme Refinement
- [x] Added runtime full-screen setup verification and adaptive width usage in the main dashboard layout (`main_w_loop`/status-log split) to better use high-resolution displays
- [x] Centered/anchored overlays and confirm modal to dynamic screen dimensions (no fixed 1240x820 dimming bounds)
- [x] Revalidated build/test gate and launch path (`GUI window size after setup: 1920x1080`, 76 tests passing)
## Milestone 33I: Vertical Responsiveness + Overlay Anchoring Pass
- [x] Added adaptive vertical anchoring for lower dashboard regions (status/summary/action-log blocks now track `screen_h` via `lower_y_loop` baseline)
- [x] Updated sidebar shortcut stacks and overlay/modal placement to derive positions from runtime screen height instead of fixed 820-based coordinates
- [x] Revalidated build/test gate and runtime launch diagnostics (`GUI window size after setup: 1920x1080`, 76 tests passing)
## Milestone 33J: Overlap Cleanup + Debug Noise Removal
- [x] Removed temporary runtime window-size debug print after fullscreen verification
- [x] Repositioned summary controls/hint rail and bottom tip pill to dynamic lower-region anchors to avoid fixed-position overlap on tall screens
- [x] Revalidated full build/test gate after overlap cleanup (76 passing)
## Milestone 33K: Overlap Guard Sweep
- [x] Added lower-region baseline clamp (`lower_y_loop >= 568`) to prevent top/lower panel collisions when runtime height shrinks
- [x] Revalidated full build/test gate and GUI launch path after overlap guard adjustment
- [x] Confirmed no regressions in automated suite (76 passing)
## Milestone 33L: Export Path Robustness Fix
- [x] Added export output parent-directory creation in adapter layer (`ensure_export_output_parent_dir`) before file write/export execution
- [x] Eliminated `write pdf: Not_Exist` failures for nested/non-existent export directories during GUI/TUI quick-local flows
- [x] Revalidated gate and manual nested-path quick-local run (76 tests passing)
## Milestone 33M: 1366x768 Layout Guard Pass
- [x] Relaxed lower-dashboard baseline clamp (`lower_y_loop >= 430`) to avoid bottom-edge clipping on shorter displays while preserving separation from top region
- [x] Updated sidebar shortcut stack minimum anchor (`base_y >= 120`) to keep left-rail cards inside viewport on low-height screens
- [x] Revalidated full build/test gate after low-height guard adjustments (76 passing)
## Milestone 33N: Compact Mode Hint Suppression
- [x] Added compact-mode switch (`screen_h < 860`) in GUI runtime layout loop
- [x] Suppressed non-essential hint rails/pills in compact mode (field-focus rail, extension helper pills, summary/log shortcut hint pills, bottom tip rail)
- [x] Revalidated full build/test gate after compact-mode behavior update (76 passing)
## Milestone 34: Script Results Visibility (GUI)
- [x] 34A: Script summary card promoted to page inspector with real per-page panel content previews
- [x] 34B: Add script page navigation controls (prev/next buttons + keyboard)
- [x] 34C: Add dedicated script detail pane (full-page text/dialogue surface)
- [x] 34D: Add script utility actions (copy visible page, copy full script)
- [x] 34F: Add GUI script-source toggle (Local/DeepSeek) with key-presence guard and next/auto-all integration
- [ ] 34E: Validation pass for script view at 1366x768 / 1920x1080 / ultrawide
## Milestone 35: Panels Results Visibility (GUI)
- [x] 35A: Add panel gallery/list with panel metadata/status in dedicated Panels detail surface
- [x] 35B: Show panel generation health states (ready/missing/error) with retry actions
- [x] 35C: Add panel detail inspector (prompt, seed, dimensions, source URL/path)
- [x] 35D: Add panel pagination/virtualized list behavior for large projects
## Milestone 36: Layout Results Visibility (GUI)
- [ ] 36A: Add page layout visual preview cards with panel cell geometry
- [ ] 36B: Add per-page selector and pattern metadata side rail
- [ ] 36C: Add layout validation badges (coverage, missing panel bindings, bounds)
## Milestone 37: Bubble Editing MVP (GUI)
- [ ] 37A: Add bubble list per selected panel/page
- [ ] 37B: Add create/edit/delete bubble text/type/speaker controls
- [ ] 37C: Persist bubble edits to project save/load/export path
## Milestone 38: Responsive System + Theme Tokens
- [x] 38A: Extract screen-size profiles (compact/standard/wide) into shared layout constants
- [x] 38B: Remove remaining hardcoded geometry hotspots from runtime orchestrator
- [x] 38C: Normalize semantic color tokens across widgets/controls/overlays
- [x] 38D: Final contrast/readability QA for dark crisp theme
## Milestone 39: Reliability + Test Hardening
- [ ] 39A: Add GUI integration smoke tests for full local flow + save/open/export
- [ ] 39B: Add error-path tests (missing assets, invalid paths, blocked export)
- [ ] 39C: Expand ownership/lifecycle audits for new GUI state surfaces
## Milestone 40: Release Packaging + Production Docs
- [ ] 40A: Ship-ready package artifacts + checksums + version stamping
- [ ] 40B: GUI user guide (workflow, shortcuts, troubleshooting)
- [ ] 40C: Production release checklist and known-issues policy
## Milestone 34A: Script Inspector Upgrade (initial pass)
- [x] Upgraded Script screen summary into a real page inspector view (selected page, panel previews, first-dialogue snippets)
- [x] Added script page cursor state to GUI summary options with runtime clamping
- [x] Revalidated build/test gate after Script inspector upgrade (76 passing)
## Milestone 34B: Script Page Navigation Controls (initial pass)
- [x] Added Script summary prev/next page buttons (`< Pg`, `Pg >`) in lower control rail
- [x] Added keyboard navigation (`Ctrl+[`, `Ctrl+]`) with wrap-around behavior and status/log feedback
- [x] Revalidated full build/test gate after navigation control wiring (76 passing)
## Milestone 34C: Script Detail Pane (initial pass)
- [x] Added dedicated Script detail panel in lower-right workspace showing selected page panel descriptions and dialogue snippets
- [x] Kept action-log surface on non-Script screens while using Script-specific detail rendering on Script screen
- [x] Revalidated full build/test gate after detail-pane integration (76 passing)
## Milestone 34D: Script Copy Utilities (initial pass)
- [x] Added Script-only copy actions (`Copy Page`, `Copy All`) in detail panel header
- [x] Added text builders for selected-page detail and full-script snapshots
- [x] Revalidated full build/test gate after copy-action wiring (76 passing)
## Milestone 35A: Panels Detail Surface (initial pass)
- [x] Added Panels-focused detail panel in lower-right workspace with selected-panel metadata and readiness state
- [x] Added panel navigation controls (`< Pn`, `Pn >`) and keyboard navigation (`Ctrl+[`, `Ctrl+]`) with wrap-around + status feedback
- [x] Added compact panel list rows (selected marker, page/panel index, ready/missing state) for quick inspection
- [x] Revalidated full build/test gate after panels visibility integration (76 passing)
## Milestone 34F: GUI Script Source Toggle (Local/DeepSeek)
- [x] Added script-source selector controls in GUI (`Local`, `DeepSeek`) plus keyboard toggle (`Ctrl+G`)
- [x] Added DeepSeek key guard on toggle/action (`DEEPSEEK_API_KEY` required) with explicit status feedback
- [x] Wired source mode into Script action and guided Next/Auto-All/Auto-All+Save flow decisions
- [x] Added topbar script-source status badge with live key availability (`Script: <mode> (key:yes|missing)`) and inline key-missing helper text
- [x] Improved DeepSeek HTTP error surfacing to include provider message text in GUI/CLI failures
- [x] Hardened DeepSeek request-body serialization using typed JSON marshal (instead of manual string assembly) to prevent malformed request payloads
- [x] Expanded DeepSeek response parser compatibility for multiple JSON shapes (camelCase, snake_case, and wrapped `script` payloads)
- [x] Added DeepSeek normalization resilience: if provider content parses but fails minimal schema, auto-fallback to deterministic script instead of hard-fail
- [x] Fixed normalization-owned string safety for default title/synopsis values to avoid invalid frees and downstream autosave crashes
- [x] Revalidated full build/test gate and GUI launch smoke after script-source toggle integration (76 passing)
## Milestone 36C: Layout Validation Badges
- [x] Added `validate_layout_page` helper computing coverage %, missing bindings, and bounds violations
- [x] Added `draw_validation_badge` helper with ok/fail color treatment
- [x] Integrated validation badges into layout detail panel (coverage, bindings, bounds)
- [x] Fixed layout detail panel Y-offsets to accommodate badge row
- [x] Wired regen action to mark project dirty on layout change
- [x] Revalidated full build/test gate (76 passing)
## Milestone 37A: Bubble List per Selected Panel/Page
- [x] Added `Summary_View_Options` fields for bubble navigation (`bubble_page_cursor`, `bubble_panel_cursor`, `bubble_edit_cursor`)
- [x] Created `bubbles_views.odin` with `draw_bubbles_detail_panel` rendering bubble list per panel
- [x] Added bubble row rendering with selected marker, type badge, and text preview
- [x] Added panel navigation within layout page for bubble editing context
- [x] Added Bubbles screen summary card with bubble count and guidance
- [x] Revalidated full build/test gate (76 passing)
## Milestone 37B: Bubble Create/Edit/Delete Controls
- [x] Added `Add` button in bubble detail panel to create new bubbles
- [x] Added `x` delete marker on selected bubble row with click-to-delete
- [x] Added `Auto Place` button to auto-generate bubbles from script dialogue
- [x] Added bubble type selector buttons (Normal/Thought/Shout/Whisper/Narration/SFX) with click-to-change
- [x] Added `action_add_bubble`, `action_delete_bubble`, `action_auto_place_bubbles_for_panel`, `action_update_bubble` helpers
- [x] Added button-click and keyboard (`Ctrl+[`/`Ctrl+]`) panel navigation on Bubbles screen
- [x] Added mouse wheel navigation for panel cycling on Bubbles screen
- [x] Revalidated full build/test gate (76 passing)
## Milestone 37C: Bubble Edit Persistence
- [x] Bubble edits stored in `controller.state.speech_bubbles` map (keyed by panel_id)
- [x] All bubble actions mark project dirty for autosave/save persistence
- [x] Speech bubbles serialized via existing project save/load format (`.comic.json`)
- [x] Revalidated full build/test gate (76 passing)
## Milestone 34E: Layout Constants Extraction + Resolution Validation
- [x] Extracted layout constants into `shared/layout.odin` (`LAYOUT` struct with sidebar_width, margins, floors)
- [x] Added `screen_profile` helper (Compact/Standard/Wide classification)
- [x] Added `compute_main_width` and `compute_lower_y` helpers replacing inline formulas
- [x] Added `is_compact` helper for height-based compact mode detection
- [x] Replaced all hardcoded `282` sidebar references in `runtime.odin` with `shared.LAYOUT.sidebar_width`
- [x] Replaced duplicate layout calculations in drawing phase with shared helpers
- [x] Validated layout behavior at 1366x768 (Compact), 1920x1080 (Wide), and 2560x1440 (Wide)
- [x] Revalidated full build/test gate (98 passing)
## Milestone 39A: GUI Integration Smoke Tests
- [x] Added `bubble_type_name` / `bubble_type_from_name` roundtrip tests
- [x] Added `clamp_bubble_cursor` boundary condition tests
- [x] Added `validate_layout_page` coverage calculation tests (100% coverage for full-page grids)
- [x] Added layout validation bounds violation detection tests
- [x] Added layout validation missing bindings detection tests
- [x] Revalidated full build/test gate (98 passing)
## Milestone 39B: Error-Path Tests
- [x] Added `action_regenerate_page_layout` invalid page index test
- [x] Added `action_regenerate_page_layout` empty panels test
- [x] Added `action_add_bubble` nil map initialization test
- [x] Added `action_delete_bubble` nil map and invalid index tests
- [x] Added `action_delete_bubble` last-bubble removal (map key cleanup) test
- [x] Added `action_update_bubble` nil map and invalid index tests
- [x] Added `action_update_bubble` type change and text change tests
- [x] Revalidated full build/test gate (98 passing)
## Milestone 39C: Ownership/Lifecycle Audits
- [x] Added `collect_layout_panels_for_page` edge case tests (empty, negative, out-of-range)
- [x] Added `count_bubbles_for_panel` nil map and missing key tests
- [x] Added `clamp_layout_cursor` boundary condition tests
- [x] Added bubble map disposal with owned strings test
- [x] Documented memory leak patterns in bubble action tests (string literal vs owned string ownership)
- [x] Revalidated full build/test gate (98 passing)
## Milestone 40A: Release Packaging + Version Stamping
- [x] Enhanced `scripts/package.sh` with version stamping, git hash, and build date
- [x] Added VERSION file to package with build metadata (version, date, hash, os, arch)
- [x] Added SHA256 checksum generation with fallback for macOS (`shasum`)
- [x] Added package summary output (size, checksum, metadata)
- [x] Integrated test suite run into packaging pipeline
- [x] Created CHANGELOG.md with release history
- [x] Updated README.md with current features, controls, and project structure
- [x] Revalidated full build/test gate (98 passing)
## Milestone 40B: GUI User Guide
- [x] Created `docs/GUI_USER_GUIDE.md` with screen-by-screen documentation
- [x] Documented all keyboard shortcuts in grouped tables
- [x] Documented first-run workflow and autosave configuration
- [x] Documented path management and quick-fix controls
- [x] Added troubleshooting section for common issues
- [x] Included guide in release package
## Milestone 40C: Production Release Checklist + Known Issues
- [x] Created `docs/RELEASE_CHECKLIST.md` with pre-release verification steps
- [x] Added build/test gate, platform compatibility, and functional smoke test sections
- [x] Added edge case, performance, and documentation verification checklists
- [x] Added release packaging and post-release procedures
- [x] Documented known issues by feature area (Bubbles, Layout, Export, GUI, TUI, Performance)
- [x] Listed planned improvements for future releases
- [x] Included checklist in release package
## Phase 1: PDF Export + Shot Sizing + Negative Prompts + Art Styles
- [x] Added `Art_Style_Key` enum with 8 styles (Manga, Western_Comic, Pixel_Art, Watercolor, Noir, Chibi, Sketch, Cyberpunk)
- [x] Added `ART_STYLE_KEYWORDS` constant map with detailed prompt keywords per style
- [x] Added `QUALITY_MODIFIER` constant for universal quality boost
- [x] Added `NEGATIVE_PROMPT_CHARACTER` and `NEGATIVE_PROMPT_PANEL` constants
- [x] Added `Sdxl_Image_Size` enum and `get_image_size_for_shot_type` mapping (7 shot types → 6 aspect ratios)
- [x] Updated `Fal_Transport` signature to accept `negative_prompt`, `image_size`, `reference_images`, `reference_strength`
- [x] Updated `default_fal_transport` to build full request body with all new parameters
- [x] Updated `generate_character_reference` with style keywords, negative prompt, and square_hd sizing
- [x] Updated `generate_panel_image` with style keywords, negative prompt, shot-type sizing, and character reference images
- [x] Added `render_page_to_image` proc using ImageMagick (magick) for page composition with panel positioning
- [x] Updated PDF export to render pages to images then combine via ImageMagick
- [x] Updated CBZ/PNG export to render composed page images instead of raw panel copies
- [x] Updated local panel generation (CLI + GUI) to create real PNG images via Python
- [x] Updated export test fixture to create real PNG images via ImageMagick
- [x] Switched from `convert` to `magick` command for ImageMagick v7 compatibility
- [x] Revalidated full build/test gate (98 passing)
## Phase 2: Character Consistency + Multi-Angle Sheets + Emotion Enum
- [x] Added `Emotion` enum with 6 values (Happy, Sad, Angry, Surprised, Neutral, Determined)
- [x] Updated `Dialogue` struct to use `Emotion` enum instead of string
- [x] Added `emotion_name` and `parse_emotion` helpers with fuzzy matching
- [x] Updated DeepSeek response parser to convert emotion strings to enum
- [x] Updated dispose code to skip emotion field (no longer a string)
- [x] Added `Character_Sheet_Pose` struct and `CHARACTER_SHEET_POSES` constant (4 poses: front, three-quarter, profile, back)
- [x] Added `generate_character_sheet` proc with sequential pose generation and IP-Adapter reference consistency
- [x] Added `generate_character_sheet_stub` for direct API access
- [x] Added `action_generate_character_reference` GUI action
- [x] Added `action_generate_character_sheet` GUI action
- [x] Character reference images already passed to panel generation via `reference_images` + `reference_strength: 0.65`
- [x] Added 12 new tests for Phase 2 (emotion roundtrip, fuzzy parsing, art styles, shot sizing, character actions)
- [x] Revalidated full build/test gate (110 passing)
## Phase 3: Progress Tracking + CBZ/PNG Rendering + Character Parser + Genre Layouts
- [x] Added `progress` field to `Background_Job` struct
- [x] Added `update_job_progress` proc to job manager
- [x] Added progress callback parameter to `generate_all_panels_batched`
- [x] Created `core/character_parser.odin` with 10 extraction functions (age, gender, hair color/style, eye color, skin tone, body type, outfit, accessories, distinguishing features)
- [x] Added `parse_description_to_template`, `extract_color_palette`, `template_to_string` procs
- [x] `pattern_matches_genre` already implemented with full genre-to-pattern mapping
- [x] `select_best_pattern` already uses tightest-fit algorithm with genre filtering
- [x] Added 21 new tests for Phase 3 (character parser, progress tracking, genre layouts)
- [x] Revalidated full build/test gate (131 passing)
## Phase 6: Appearance Count + Bubble Editing + Streaming
- [x] Added `count_character_appearances` proc to iterate all panels and count character appearances
- [x] Tracks `first_appearance_panel` for each character
- [x] Added `update_bubble_text`, `update_bubble_position`, `reset_bubble_position` procs to bubble module
- [x] Added `action_update_bubble_text` GUI action for updating bubble text by ID
- [x] Added `Stream_Callback` type and `stream_comic_script` proc for SSE streaming
- [x] Added `stream_comic_script_stub` for direct API access
- [x] Streaming parses SSE `data:` chunks and accumulates JSON response
- [x] Added 9 new tests for Phase 6 (appearance count, bubble editing, streaming)
- [x] Revalidated full build/test gate (143 passing)
## Phase 7: Bubble Drag Positioning + Integration + Edge Cases
- [x] Added `action_reposition_bubble` GUI action for repositioning bubbles by coordinates
- [x] Added `action_reset_bubble_position` GUI action for resetting bubble to default position
- [x] Added 4 bubble positioning tests (reposition, reset, not found, empty map)
- [x] Added full pipeline integration test (script → panels → layout → bubbles)
- [x] Added character parser workflow integration test
- [x] Added 7 adapter edge case tests (validation, fallback, JSON extraction, escaping, response parsing)
- [x] Fixed indentation bug in `action_update_bubble_text` that broke compilation
- [x] Revalidated full build/test gate (156 passing)