M2 — Target generation & layout: targen, printtarg, resume, gallery, presets (#7–#11) #41

Merged
gronod merged 1 commits from feat/7-targen-argv into milestone/m2-targets 2026-09-08 23:52:35 +01:00
Owner

Implements Milestone 2 (issues #7–#11) as a single commit on feat/7-targen-argv — the per-issue branches were collapsed because the work is interleaved across TargetWorkflowViewModel, RootView, and ProcessManager.

What's in it

  • #7 targen: TargenConfig + TargenArgs argv builder (-v -d 2/4, -f, -e, -B, optional advanced flags, CMYK-only -l 1–400, never -u), ArgyllRunner streaming over ProcessManager with ARGYLL_NOT_INTERACTIVE=1, Stage1View with disk-gated Generate and process log.
  • #8 resume: Open Existing → .ti1 resumes to Stage 2, .ti2 resumes to the Stage 3 shell with a persistent Resumed from .ti2 banner; .ti2 without its sibling .ti1 is rejected with a notice.
  • #9 printtarg: PrinttargConfig/PrinttargArgs (-v -u, -i, -p, deterministic -R 1 default, -r raster precedence, -t/-T + DPI, -K/-I builder support with CAL_ protection), Stage2View with instrument/page-size/bit-depth/DPI/layout-order/label controls, CM warning banner, stubbed disabled print panel (M3).
  • #10 manifest/gallery: PrinttargManifest Codable parsing of the pretty-printed event: manifest JSON from accumulated stdout, path-safe TIFF resolution, host-side TiffPreview PNG previews, per-page stubbed Print buttons, non-zero exit stays on Stage 2.
  • #11 presets: typed ProfilingPreset + PresetCatalog (4 built-ins) + PresetStore with legacy CustomPreset migration, sidebar picker, save/manage dialogs, import/export, bidirectional DPI binding (draft → 150 dpi).

Tests

xcodebuild test -scheme ICCery -destination 'platform=macOS' ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO124/124 Core tests (Swift Testing) + 11/11 Milestone2UITests (XCTest) pass. No hardware, no downloads, no $PATH lookup: UI tests use committed fixture sidecars at Tests/ICCeryUITests/Fixtures/bin/ and an isolated test root via ICCERY_TEST_ROOT/ICCERY_ARGYLL_BINARY_DIR.

Notable fixes found by UI-test bring-up

  • Container-level accessibilityIdentifier propagates to and overrides descendant identifiers — .accessibilityElement(children: .contain) added so child AX ids survive (also fixes VoiceOver).
  • ProcessError now conforms to LocalizedError so spawn failures surface the real posix_spawn reason.
  • XCTest-runner container allows read/write/stat but not exec — hence the committed fixture scripts.

🤖 Generated with Devin

Implements Milestone 2 (issues #7–#11) as a single commit on `feat/7-targen-argv` — the per-issue branches were collapsed because the work is interleaved across `TargetWorkflowViewModel`, `RootView`, and `ProcessManager`. ## What's in it - **#7 targen**: `TargenConfig` + `TargenArgs` argv builder (`-v -d 2/4`, `-f`, `-e`, `-B`, optional advanced flags, CMYK-only `-l 1–400`, never `-u`), `ArgyllRunner` streaming over `ProcessManager` with `ARGYLL_NOT_INTERACTIVE=1`, `Stage1View` with disk-gated Generate and process log. - **#8 resume**: Open Existing → `.ti1` resumes to Stage 2, `.ti2` resumes to the Stage 3 shell with a persistent `Resumed from .ti2` banner; `.ti2` without its sibling `.ti1` is rejected with a notice. - **#9 printtarg**: `PrinttargConfig`/`PrinttargArgs` (`-v -u`, `-i`, `-p`, deterministic `-R 1` default, `-r` raster precedence, `-t`/`-T` + DPI, `-K`/`-I` builder support with `CAL_` protection), `Stage2View` with instrument/page-size/bit-depth/DPI/layout-order/label controls, CM warning banner, stubbed disabled print panel (M3). - **#10 manifest/gallery**: `PrinttargManifest` Codable parsing of the pretty-printed `event: manifest` JSON from accumulated stdout, path-safe TIFF resolution, host-side `TiffPreview` PNG previews, per-page stubbed Print buttons, non-zero exit stays on Stage 2. - **#11 presets**: typed `ProfilingPreset` + `PresetCatalog` (4 built-ins) + `PresetStore` with legacy `CustomPreset` migration, sidebar picker, save/manage dialogs, import/export, bidirectional DPI binding (draft → 150 dpi). ## Tests `xcodebuild test -scheme ICCery -destination 'platform=macOS' ARCHS='arm64 x86_64' ONLY_ACTIVE_ARCH=NO` — **124/124 Core tests** (Swift Testing) + **11/11 `Milestone2UITests`** (XCTest) pass. No hardware, no downloads, no `$PATH` lookup: UI tests use committed fixture sidecars at `Tests/ICCeryUITests/Fixtures/bin/` and an isolated test root via `ICCERY_TEST_ROOT`/`ICCERY_ARGYLL_BINARY_DIR`. ## Notable fixes found by UI-test bring-up - Container-level `accessibilityIdentifier` propagates to and overrides descendant identifiers — `.accessibilityElement(children: .contain)` added so child AX ids survive (also fixes VoiceOver). - `ProcessError` now conforms to `LocalizedError` so spawn failures surface the real `posix_spawn` reason. - XCTest-runner container allows read/write/stat but not `exec` — hence the committed fixture scripts. 🤖 Generated with [Devin](https://devin.ai)
gronod added 1 commit 2026-09-08 23:13:50 +01:00
Stage 1 targen: typed TargenConfig + argv builder (-v -d 2/4, -f, -e,
-B, optional advanced flags, CMYK-only -l, never -u), ArgyllRunner over
ProcessManager, Stage1View with disk-gated Generate.

Issue 8: Open Existing resume — .ti1 → Stage 2, .ti2 → Stage 3 shell
with persistent "Resumed from .ti2" banner, sibling-.ti1 gate.

Stage 2 printtarg: PrinttargConfig/args (-v -u, -i, -p, -R 1 default,
-r raster, -t/-T DPI), Stage2View with instrument/page/DPI/label
controls, CM warning, stubbed print panel.

Issue 10: pretty-manifest JSON parsing, host-side TIFF→PNG gallery
previews, per-page stubbed print, failure stays on stage.

Issue 11: typed ProfilingPreset schema with legacy CustomPreset
migration, four built-ins, save/manage/import/export UI, DPI binding.

Tests: 124 Core tests (Swift Testing) + 11 Milestone2UITests (XCTest)
with committed fixture sidecars — all green on arm64+x86_64 universal
build. No hardware, no downloads.

Also: ProcessError LocalizedError conformance; accessibilityElement
.contain on container identifiers so child AX ids survive.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
gronod merged commit 797d30b023 into milestone/m2-targets 2026-09-08 23:52:35 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#41