This stage introduces real-time IPC stream processing for chartread -u, allowing the UI to drive spectrophotometer measurement workflows via a state machine and visualize incoming color patches with CIEDE2000 quality scoring.
Changes
Backend (Rust)
ProcessManager stdout stream update: Added prefix matching for ROW_COLORS_JSON: to emit structured process:json_row events while preserving raw log streaming to process:stdout.
JsonRowPayload & emit_json_row: Added structured event payload type for row completion events.
run_chartread Tauri Command: Added binary invocation handler and registered in lib.rs.
Unit Tests: Added test for chartread command argument construction.
Frontend (HTML / JS / CSS)
chartread.js: Implemented state machine controller (IDLE, CALIBRATING, AWAITING_STRIP, READING, ERROR, FINISHED) with stdin keystroke injection (" \n", "s\n", "q\n").
swatch_grid.js: Built dynamic swatch grid renderer reacting to process:json_row events, featuring patch progress tracking and live stats.
delta_e.js: Pure JavaScript implementation of the CIEDE2000 (\Delta E_{00}) color difference formula (validated against CIE 142-2001 / Sharma 2005 test pairs).
color_convert.js: D50 CIE L*a*b* to sRGB conversion pipeline for UI swatch rendering.
index.html & main.css: Added Stage 3 UI container, interactive status bar, traffic light indicators (Green \Delta E < 2, Amber \Delta E < 5, Red \Delta E \ge 5), and progress bar.
Testing & Mocking
chartread.mock: Included executable shell script to simulate chartread -u prompts and JSON row emissions for offline hardware testing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Implements Milestone 3 (Issues #5 and #6: Interactive Reading Engine & Swatch Grid Visualization).
This stage introduces real-time IPC stream processing for
chartread -u, allowing the UI to drive spectrophotometer measurement workflows via a state machine and visualize incoming color patches with CIEDE2000 quality scoring.Changes
Backend (Rust)
ProcessManagerstdout stream update: Added prefix matching forROW_COLORS_JSON:to emit structuredprocess:json_rowevents while preserving raw log streaming toprocess:stdout.JsonRowPayload&emit_json_row: Added structured event payload type for row completion events.ChartreadConfig&build_chartread_args: Maps target configuration tochartreadCLI flags (-v -u <basename>).run_chartreadTauri Command: Added binary invocation handler and registered inlib.rs.chartreadcommand argument construction.Frontend (HTML / JS / CSS)
chartread.js: Implemented state machine controller (IDLE, CALIBRATING, AWAITING_STRIP, READING, ERROR, FINISHED) with stdin keystroke injection (" \n","s\n","q\n").swatch_grid.js: Built dynamic swatch grid renderer reacting toprocess:json_rowevents, featuring patch progress tracking and live stats.delta_e.js: Pure JavaScript implementation of the CIEDE2000 (\Delta E_{00}) color difference formula (validated against CIE 142-2001 / Sharma 2005 test pairs).color_convert.js: D50 CIE L*a*b* to sRGB conversion pipeline for UI swatch rendering.index.html&main.css: Added Stage 3 UI container, interactive status bar, traffic light indicators (Green\Delta E < 2, Amber\Delta E < 5, Red\Delta E \ge 5), and progress bar.Testing & Mocking
chartread.mock: Included executable shell script to simulatechartread -uprompts and JSON row emissions for offline hardware testing.Closes #5
Closes #6