Implement the Stage 4 Profile Generation step. After .ti3 measurement data is obtained, the user configures profile quality and metadata, then the Rust backend spawns colprof as a long-running background process to compute the ICC profile.
Toolchain Context
Backend: Rust (Tauri 2) — spawns colprof via ProcessManager; process runs in tokio async task without blocking the UI thread
Frontend: Vanilla JS with indeterminate progress spinner
Implementation Plan
Backend (Rust)
New Tauri commandcommands::run_colprof(app, state, config):
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.
Description
Implement the Stage 4 Profile Generation step. After
.ti3measurement data is obtained, the user configures profile quality and metadata, then the Rust backend spawnscolprofas a long-running background process to compute the ICC profile.Toolchain Context
colprofviaProcessManager; process runs in tokio async task without blocking the UI threadImplementation Plan
Backend (Rust)
commands::run_colprof(app, state, config):ColprofConfigstruct:{ quality: String, algorithm: String, description: String, copyright: Option<String>, source_gamut: Option<String>, basename: String }["-v", "-q", <quality>, "-a", <algo>, "-D", <desc>, <basename>]-C <copyright>and-S <source_gamut>.icmProcessManager-v) stdout for stage markers (e.g., "Creating", "Gamut mapping"). Emit coarse-grainedprocess:progressevents with estimated stage labels:{ stage: "gamut_mapping" | "fitting" | "writing", percent: <estimated> }..icc/.icmfile exists. Emitprocess:completewith file path and size.Frontend (JavaScript)
#stage-4):run_colprofprocess:progressevents arrive, show stage label (e.g., "Gamut mapping…")New/Modified Files
[MODIFY]src-tauri/src/commands.rs— addrun_colprofcommand,ColprofConfigstruct[MODIFY]src-tauri/src/events.rs— addemit_progressevent type[MODIFY]src/index.html— expand Stage 4 panel[NEW]src/js/colprof.js— Stage 4 frontend logic[MODIFY]src/styles/main.css— spinner and progress stage stylesAcceptance Criteria
References
colprof: gronod/argyllcms