feat(print): Stage 2 paper size + quality selection (#183) #193

Merged
gronod merged 1 commits from feat/183-stage2-print-settings into milestone/m11-print-settings 2026-09-15 18:43:20 +01:00
Owner

Refs #183

Scope

Stage 2 paper-size and print-quality selection (M11 Phase 1):

  • ICCeryCore: PrinterQuality model; PrinterCapabilities gains qualityKey/qualities/qualityDefault; PrintOptions.quality; CupsParsers.qualityKeys + detectQualityKey + extractOption/extractQuality/extractOrientation; CupsService.capabilities quality extraction (roster order, * default, PPD labels); CupsOptionsFilter.relevantKeys gains EPIJ_Qual (+ CNIJPrintQuality, PrintQuality) with EPIJ_Quality retained as alias; LpArgs emits -o <qualityKey>=<quality> after media/before orientation, captured options win case-insensitively, sanitized, never -o raw.
  • App: PrintSessionViewModel gains selectedPaperSize/selectedQuality, seeds from Stage 1 workflow.pageSize, re-mirrors on page-size/printer changes, preserves user edits across unrelated publishes; .custom produces the synthetic id: 0 entry with point-based Custom.<pt>x<pt> token (mm × 72/25.4); PrintOptions carries paper token + quality into spool.
  • Stage 2 UI: paper + quality pickers (printerPaperSizeSelect / printerQualitySelect pop-up buttons; paperSizeGroup / qualityGroup containers); all existing identifiers unchanged.
  • Print panel: PrintPanelInitialSelections (paperSize/qualityKey/quality/mediaType/orientation fields); this phase consumes paper + quality only, written after PMSessionDefault* and before ColorSync suppression. Media/orientation preselect and full capture-return remain #186. Panel stub extended via ICCERY_TEST_PANEL_OPTIONS — no real NSPrintPanel in UI tests.

Out of scope (unchanged): #180 EPIJ_Qual fixture enrichment, #181 locale fix, #186 media/orientation + full capture-return. workflow.pageSize is never written by print-side selection. ColorSync SPI signature and ordering untouched. No dependency/signing/sandbox/deployment-target changes.

Test evidence

Gate command:

xcodebuild test -scheme ICCery -destination 'platform=macOS' \
  -derivedDataPath build/DerivedData-feat-183-stage2-print-settings \
  ARCHS="$(uname -m)" CODE_SIGNING_ALLOWED=YES CODE_SIGN_IDENTITY='-' \
  -only-testing:ICCeryCoreTests/CupsParserTests \
  -only-testing:ICCeryCoreTests/LpArgsTests \
  -only-testing:ICCeryCoreTests/PrintPanelStubTests \
  -only-testing:ICCeryUITests/Milestone11PrintSettingsUITests \
  -only-testing:ICCeryUITests/Milestone3UITests

Result (x86_64, local): 41 executed, 0 failures

  • CupsParserTests: 14
  • LpArgsTests: 14
  • PrintPanelStubTests: 4
  • Milestone11PrintSettingsUITests: 3
  • Milestone3UITests: 6

Extended core run (also green, 45/0) additionally included PrintSessionViewModelTests (8) and CupsOptionsFilterTests (5).

Note: the CupsParserTests.swift file's class was renamed CupsParsersTestsCupsParserTests to match the file name and the contract selector (a zero-match selector is a failed gate).

Refs #183 ## Scope Stage 2 paper-size and print-quality selection (M11 Phase 1): - ICCeryCore: `PrinterQuality` model; `PrinterCapabilities` gains `qualityKey`/`qualities`/`qualityDefault`; `PrintOptions.quality`; `CupsParsers.qualityKeys` + `detectQualityKey` + `extractOption`/`extractQuality`/`extractOrientation`; `CupsService.capabilities` quality extraction (roster order, `*` default, PPD labels); `CupsOptionsFilter.relevantKeys` gains `EPIJ_Qual` (+ `CNIJPrintQuality`, `PrintQuality`) with `EPIJ_Quality` retained as alias; `LpArgs` emits `-o <qualityKey>=<quality>` after media/before orientation, captured options win case-insensitively, sanitized, never `-o raw`. - App: `PrintSessionViewModel` gains `selectedPaperSize`/`selectedQuality`, seeds from Stage 1 `workflow.pageSize`, re-mirrors on page-size/printer changes, preserves user edits across unrelated publishes; `.custom` produces the synthetic `id: 0` entry with point-based `Custom.<pt>x<pt>` token (mm × 72/25.4); `PrintOptions` carries paper token + quality into spool. - Stage 2 UI: paper + quality pickers (`printerPaperSizeSelect` / `printerQualitySelect` pop-up buttons; `paperSizeGroup` / `qualityGroup` containers); all existing identifiers unchanged. - Print panel: `PrintPanelInitialSelections` (paperSize/qualityKey/quality/mediaType/orientation fields); this phase consumes paper + quality only, written after `PMSessionDefault*` and before ColorSync suppression. Media/orientation preselect and full capture-return remain #186. Panel stub extended via `ICCERY_TEST_PANEL_OPTIONS` — no real `NSPrintPanel` in UI tests. Out of scope (unchanged): #180 EPIJ_Qual fixture enrichment, #181 locale fix, #186 media/orientation + full capture-return. `workflow.pageSize` is never written by print-side selection. ColorSync SPI signature and ordering untouched. No dependency/signing/sandbox/deployment-target changes. ## Test evidence Gate command: ``` xcodebuild test -scheme ICCery -destination 'platform=macOS' \ -derivedDataPath build/DerivedData-feat-183-stage2-print-settings \ ARCHS="$(uname -m)" CODE_SIGNING_ALLOWED=YES CODE_SIGN_IDENTITY='-' \ -only-testing:ICCeryCoreTests/CupsParserTests \ -only-testing:ICCeryCoreTests/LpArgsTests \ -only-testing:ICCeryCoreTests/PrintPanelStubTests \ -only-testing:ICCeryUITests/Milestone11PrintSettingsUITests \ -only-testing:ICCeryUITests/Milestone3UITests ``` Result (x86_64, local): **41 executed, 0 failures** - CupsParserTests: 14 - LpArgsTests: 14 - PrintPanelStubTests: 4 - Milestone11PrintSettingsUITests: 3 - Milestone3UITests: 6 Extended core run (also green, 45/0) additionally included `PrintSessionViewModelTests` (8) and `CupsOptionsFilterTests` (5). Note: the `CupsParserTests.swift` file's class was renamed `CupsParsersTests` → `CupsParserTests` to match the file name and the contract selector (a zero-match selector is a failed gate).
gronod added 1 commit 2026-09-15 18:43:14 +01:00
feat(print): Stage 2 paper size + quality selection (#183)
macOS CI / build-and-test (push) Skipped
37d1f7eb24
Devin-AI: Devin <devin@cognition.ai>
Co-authored-by: Devin <devin@cognition.ai>
gronod self-assigned this 2026-09-15 18:43:16 +01:00
gronod added this to the M11 — Printer settings completeness & dialog binding milestone 2026-09-15 18:43:16 +01:00
gronod added the Kind/Feature
Priority
Medium
3
Project/ICCery-v2Feature/UI
labels 2026-09-15 18:43:16 +01:00
gronod merged commit 51c30737c7 into milestone/m11-print-settings 2026-09-15 18:43:20 +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#193