Settings store, logging & settings dialog #5

Closed
opened 2026-09-08 17:39:20 +01:00 by gronod · 0 comments
Owner

Summary

settings.json + file logger + Settings dialog in M1 (not M6).

Spec refs

docs/22-settings-presets.md, 02-architecture.md logging, 21-ui-reference.md settings ids. #158 #184.

Scope

In: model, validation, persist, dialog, log rotation, live log-level.
Out: About, overlay tooltips (issue 31), presets engine (issue 11).

Implementation notes

Path: ~/Library/Application Support/com.gronod.iccery2/settings.json. Do not read v1's folder.
Defaults:

  • argyll_binary_dir nil
  • default_instrument nil — stored, NEVER applied to argv
  • log_level nil → Debug in debug builds, Info in release
  • delta_e_good_max 2.0, delta_e_warning_max 5.0, both ≥ 0, good < warning
  • custom_presets []
  • enable_i1pro2_leds false
  • calibration_stale_days 30
  • default_install_location user
  • ask_before_overwrite_profile true
  • open_color_panel_after_install false
    Invalid JSON → defaults.
    Validation strings exactly:
  • "ΔE thresholds cannot be negative."
  • "Good ΔE threshold must be strictly less than the warning threshold."
    Logger: ~/Library/Logs/com.gronod.iccery2/iccery.log, 5 MiB × 5. Level applied at startup AND on save. Publish a settings-changed notification so issue 20 can reclassify swatches.
    Dialog: argyll dir picker, default instrument (display-only caveat), i1Pro2 LEDs, ΔE fields + inline error, stale days, install location, overwrite ask, open ColorSync toggle, log level, open-log-folder / copy-path / copy-excerpt.

Rewrite invariants

#158 log level is runtime state. #184 thresholds actually apply.

Dependencies

Blocks-on: 1. 6 (directory picker) may land in parallel — stub selectDirectory if needed.
Unblocks: 11, 19, 20, 26, 27, 31.

Test

  • CI/mock: validation strings; live log-level change without restart; rotation; dialog bindings persist; corrupt JSON → defaults.
  • Hardware: N/A.

Acceptance criteria

  • Settings dialog ships in M1.
  • v1 settings path is never read.
## Summary `settings.json` + file logger + Settings dialog in M1 (not M6). ## Spec refs docs/22-settings-presets.md, 02-architecture.md logging, 21-ui-reference.md settings ids. #158 #184. ## Scope In: model, validation, persist, dialog, log rotation, live log-level. Out: About, overlay tooltips (issue 31), presets engine (issue 11). ## Implementation notes Path: `~/Library/Application Support/com.gronod.iccery2/settings.json`. Do not read v1's folder. Defaults: - `argyll_binary_dir` nil - `default_instrument` nil — stored, NEVER applied to argv - `log_level` nil → Debug in debug builds, Info in release - `delta_e_good_max` 2.0, `delta_e_warning_max` 5.0, both ≥ 0, good < warning - `custom_presets` [] - `enable_i1pro2_leds` false - `calibration_stale_days` 30 - `default_install_location` `user` - `ask_before_overwrite_profile` true - `open_color_panel_after_install` false Invalid JSON → defaults. Validation strings exactly: - "ΔE thresholds cannot be negative." - "Good ΔE threshold must be strictly less than the warning threshold." Logger: `~/Library/Logs/com.gronod.iccery2/iccery.log`, 5 MiB × 5. Level applied at startup AND on save. Publish a settings-changed notification so issue 20 can reclassify swatches. Dialog: argyll dir picker, default instrument (display-only caveat), i1Pro2 LEDs, ΔE fields + inline error, stale days, install location, overwrite ask, open ColorSync toggle, log level, open-log-folder / copy-path / copy-excerpt. ## Rewrite invariants #158 log level is runtime state. #184 thresholds actually apply. ## Dependencies Blocks-on: 1. 6 (directory picker) may land in parallel — stub `selectDirectory` if needed. Unblocks: 11, 19, 20, 26, 27, 31. ## Test - CI/mock: validation strings; live log-level change without restart; rotation; dialog bindings persist; corrupt JSON → defaults. - Hardware: N/A. ## Acceptance criteria - [ ] Settings dialog ships in M1. - [ ] v1 settings path is never read.
gronod added this to the M1 — Foundation & process core milestone 2026-09-08 17:39:20 +01:00
gronod added the
Priority
High
2
Project/ICCery-v2Feature/BackendFeature/UI
labels 2026-09-08 17:39:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#5