Milestone M13 merges the native print ticket persistence fix (#217) and Stage 2 paper-source selection (#218) onto develop. It also converts the Portrait/Landscape toggle into a dropdown that matches the rest of the Stage 2 print settings.
Included issues
Closes#217 — Printer properties dialog reopens on driver defaults (captured PrintTicket is now restored before overrides, then validated and captured again).
CupsParsers now detects a vendor tray-key roster (InputSlot, MediaSource, EPIJ_FdSo, EPIJ_PSrc, CNIJMediaSupply) with EPIJ_FdSo preferred over EPIJ_PSrc.
PrinterTray carries both the raw CUPS/PPD token and a display name enriched from PPD translations.
CupsService enumerates trays from the detected key, seeds selection from the * default, and precomputes tray-specific media-to-quality maps.
MediaQualityConstraints resolves allowed qualities from the selected media and selected tray, falling back to the media-only map.
PrintPanelService applies the Stage 2 tray value to PMPrintSettings, then captures the chosen tray back from the full roster plus AP_D_InputSlot.
Unknown captured tray tokens are preserved as synthetic Stage 2 tray entries.
TicketWriteResolver emits the selected tray key/value in the locked write order.
Stage2View now uses an orientation dropdown (printerOrientationSelect) while keeping the existing portrait/landscape values and orientation-requested=3|4 ticket behavior.
Tests and fixtures updated across ICCeryCoreTests and ICCeryUITests; docs updated (10, 11, 21, 24).
Verification
Local syntax build via xcodegen generate + xcodebuild build-for-testing succeeded.
Full verification run on the macOS 12.7.6 x86_64 CI runner (Xcode 14.2, xcodegen 2.38.0): ICCeryCoreTests — 557 tests, 0 failures.
UI tests were not run on the headless runner per project policy.
Hardware verification on Epson/Canon trays is best-effort follow-up, not a hard gate.
## Summary
Milestone M13 merges the native print ticket persistence fix (#217) and Stage 2 paper-source selection (#218) onto `develop`. It also converts the Portrait/Landscape toggle into a dropdown that matches the rest of the Stage 2 print settings.
## Included issues
- Closes #217 — `Printer properties dialog reopens on driver defaults` (captured `PrintTicket` is now restored before overrides, then validated and captured again).
- Closes #218 — `Stage 2: paper source selection` (vendor tray key roster, PPD label enrichment, native panel apply/capture, ticket write, spool override).
## What changed
- `CupsParsers` now detects a vendor tray-key roster (`InputSlot`, `MediaSource`, `EPIJ_FdSo`, `EPIJ_PSrc`, `CNIJMediaSupply`) with `EPIJ_FdSo` preferred over `EPIJ_PSrc`.
- `PrinterTray` carries both the raw CUPS/PPD `token` and a display `name` enriched from PPD translations.
- `CupsService` enumerates trays from the detected key, seeds selection from the `*` default, and precomputes tray-specific media-to-quality maps.
- `MediaQualityConstraints` resolves allowed qualities from the selected media **and** selected tray, falling back to the media-only map.
- `PrintPanelService` applies the Stage 2 tray value to `PMPrintSettings`, then captures the chosen tray back from the full roster plus `AP_D_InputSlot`.
- Unknown captured tray tokens are preserved as synthetic Stage 2 tray entries.
- `TicketWriteResolver` emits the selected tray key/value in the locked write order.
- `Stage2View` now uses an orientation dropdown (`printerOrientationSelect`) while keeping the existing `portrait`/`landscape` values and `orientation-requested=3|4` ticket behavior.
- Tests and fixtures updated across `ICCeryCoreTests` and `ICCeryUITests`; docs updated (`10`, `11`, `21`, `24`).
## Verification
- Local syntax build via `xcodegen generate` + `xcodebuild build-for-testing` succeeded.
- Full verification run on the macOS 12.7.6 x86_64 CI runner (Xcode 14.2, xcodegen 2.38.0): `ICCeryCoreTests` — **557 tests, 0 failures**.
- UI tests were not run on the headless runner per project policy.
- Hardware verification on Epson/Canon trays is best-effort follow-up, not a hard gate.
## Branching
`develop` ← `milestone/m13-print-ticket` ← `feat/217-panel-ticket-restore` / `feat/218-paper-source`
The bound NSPrintPanel always opened on queue driver defaults —
capturedTickets[queue] was stored but never passed back, so every
vendor-PDE setting outside the four mirrored fields was discarded
on reopen (RC1), and pre-selection writes were never validated into
the ticket before runModal (RC2).
Extract the pre-modal configuration into a testable
configureBoundPanel seam with the spooler's S4→S7 order: ticket
restore (warn-only, unlike the spooler's fatal try — a stale ticket
must not keep the dialog from opening → Stage 2 selections (D6
parity) → PMSessionValidatePrintSettings + updateFromPMPrintSettings
→ applyPaper → suppression ②–⑤.
ICCERY_DEBUG_PANEL_DUMP=1 logs the raw PMPrintSettingsToOptions
output and serialised ticket sizes pre/post modal for the XP-55
RC3 verification.
Refs #217
EOF
)
- Detect vendor tray keys in CupsParsers with InputSlot/MediaSource/EPIJ_FdSo/EPIJ_PSrc/CNIJMediaSupply roster; EPIJ_FdSo wins over EPIJ_PSrc.
- PrinterTray now carries raw token + display name; PrinterCapabilities exposes trayKey, trayDefault and tray-specific quality maps.
- CupsService enumerates trays from the detected key, enriches labels from PPD, seeds selection from CUPS default, and precomputes per-tray media→quality constraints.
- MediaQualityConstraints resolves quality availability from both selected media and selected tray, falling back to the media-only map.
- TicketWriteResolver emits the selected tray key=token in the locked write order between PageSize and media key.
- PrintPanelService applies the Stage 2 tray token to PMPrintSettings on open and captures the tray back from the full roster plus AP_D_InputSlot.
- PrintSessionViewModel keeps selectedTrayToken, applies capture-back, preserves unknown captured tokens as synthetic trays, and passes tray into spool overrides.
- Stage2View replaces portrait/landscape buttons with an orientation dropdown (printerOrientationSelect) while preserving portrait/landscape semantics and orientation-requested=3|4.
- Add/update core, UI and fixture tests for tray detection, enumeration, PPD labels, defaults, unknown-token synthesis, panel capture, ticket write order and tray-aware quality clamping.
- Update docs/10-print-system.md, docs/11-print-macos.md, docs/21-ui-reference.md and docs/24-issues-invariants.md.
Verified on the macOS 12.7.6 x86_64 CI runner: xcodebuild build-for-testing and ICCeryCoreTests pass (557 tests, 0 failures).
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.
Summary
Milestone M13 merges the native print ticket persistence fix (#217) and Stage 2 paper-source selection (#218) onto
develop. It also converts the Portrait/Landscape toggle into a dropdown that matches the rest of the Stage 2 print settings.Included issues
Printer properties dialog reopens on driver defaults(capturedPrintTicketis now restored before overrides, then validated and captured again).Stage 2: paper source selection(vendor tray key roster, PPD label enrichment, native panel apply/capture, ticket write, spool override).What changed
CupsParsersnow detects a vendor tray-key roster (InputSlot,MediaSource,EPIJ_FdSo,EPIJ_PSrc,CNIJMediaSupply) withEPIJ_FdSopreferred overEPIJ_PSrc.PrinterTraycarries both the raw CUPS/PPDtokenand a displaynameenriched from PPD translations.CupsServiceenumerates trays from the detected key, seeds selection from the*default, and precomputes tray-specific media-to-quality maps.MediaQualityConstraintsresolves allowed qualities from the selected media and selected tray, falling back to the media-only map.PrintPanelServiceapplies the Stage 2 tray value toPMPrintSettings, then captures the chosen tray back from the full roster plusAP_D_InputSlot.TicketWriteResolveremits the selected tray key/value in the locked write order.Stage2Viewnow uses an orientation dropdown (printerOrientationSelect) while keeping the existingportrait/landscapevalues andorientation-requested=3|4ticket behavior.ICCeryCoreTestsandICCeryUITests; docs updated (10,11,21,24).Verification
xcodegen generate+xcodebuild build-for-testingsucceeded.ICCeryCoreTests— 557 tests, 0 failures.Branching
develop←milestone/m13-print-ticket←feat/217-panel-ticket-restore/feat/218-paper-source