fix(chartread): enable ARGYLL_NOT_INTERACTIVE for stdin piping & fix instlist JSON parsing (resolves #134) #135

Merged
gronod merged 1 commits from fix/134-chartread-stdin-instlist-json into development 2026-08-29 13:25:33 +01:00
Owner

Summary

Fixes Stage 3 (chartread) interactive stdin piping on Windows and instrument autodetection JSON output parsing.

Details & Fixes

  1. Piped Stdin Execution (src-tauri/src/process_manager.rs):
    • Added command.env("ARGYLL_NOT_INTERACTIVE", "1"); to ProcessManager::spawn so ArgyllCMS tools on Windows switch from console keyboard hooks (_getch()) to standard piped stdin stream reads.
  2. Instrument Detection (src/js/chartread.js):
    • Updated detect_instruments to parse JSON device streams emitted by instlist ({"event": "instruments", "devices": [...]}) with automatic fallback to legacy regex line parsing.
  3. Prompt Detection & Interactive Calibration (src/js/chartread.js):
    • Broadened calibration prompt matchers to detect "reflective white reference", "place the instrument", "hit any key to continue".
    • Added visual feedback on btnCalibrate when " \n" is written to stdin.
  4. Version Bump:
    • Version set to 0.3.5.

Resolves #134.

### Summary Fixes Stage 3 (`chartread`) interactive stdin piping on Windows and instrument autodetection JSON output parsing. ### Details & Fixes 1. **Piped Stdin Execution (`src-tauri/src/process_manager.rs`)**: - Added `command.env("ARGYLL_NOT_INTERACTIVE", "1");` to `ProcessManager::spawn` so ArgyllCMS tools on Windows switch from console keyboard hooks (`_getch()`) to standard piped stdin stream reads. 2. **Instrument Detection (`src/js/chartread.js`)**: - Updated `detect_instruments` to parse JSON device streams emitted by `instlist` (`{"event": "instruments", "devices": [...]}`) with automatic fallback to legacy regex line parsing. 3. **Prompt Detection & Interactive Calibration (`src/js/chartread.js`)**: - Broadened calibration prompt matchers to detect `"reflective white reference"`, `"place the instrument"`, `"hit any key to continue"`. - Added visual feedback on `btnCalibrate` when `" \n"` is written to stdin. 4. **Version Bump**: - Version set to `0.3.5`. Resolves #134.
gronod added 1 commit 2026-08-29 13:25:29 +01:00
gronod merged commit fcaad2a574 into development 2026-08-29 13:25:33 +01:00
gronod deleted branch fix/134-chartread-stdin-instlist-json 2026-08-29 13:25:33 +01:00
Sign in to join this conversation.