fix(print): macOS Preferences crash and color-management hardening (closes #188) #195

Merged
gronod merged 12 commits from fix/188-12 into main 2026-09-03 13:31:18 +01:00
12 Commits
Author SHA1 Message Date
Gordon Bolton a4612bf065 chore: bump version to 0.7.3 2026-09-03 13:30:03 +01:00
Gordon BoltonandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com> 8b01c98463 fix(print): remove crashing 3-arg PMSessionSetColorMatchingMode calls and fix SPI usage (closes #188)
Build Windows Packages / Build Windows (push) Successful in 7m7s
Build Linux Packages / Build Linux (push) Successful in 11m4s
- All PMSessionSetColorMatchingMode* symbols use the 2-arg (PMPrintSession, *const CFString) signature.
- PMSessionSetColorMatchingModeLock sets and locks in one call; it does not take a Boolean.
- Remove speculative 3-argument transmutes that caused EXC_BAD_ACCESS.
- Restrict color-matching modes to application-managed bypass only (AP_ApplicationColorMatching / ApplicationColorMatching).
- Preserve the PMSessionGetCurrentPrinter pre-check.
- Return bool from set_session_color_matching_mode and log SPI results.
- Update non-macOS stub to return bool.
- Improve run_native_print_panel error logging when the printer cannot be resolved.
- Add unit tests for color-bypass filtering and detection.
- Update AGENTS.md with the corrected SPI notes.

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 12:58:01 +01:00
Gordon Bolton 37b0c13263 fix(print): fix PMSessionGetCurrentPrinter type with .into() and remove unused mut on printer_from_id
Build Linux Packages / Build Linux (push) Failing after 10m25s
Build Windows Packages / Build Windows (push) Failing after 2h7m9s
2026-09-03 09:39:08 +01:00
Gordon Bolton 3e844fdf8b fix(print): extended PMSessionSetColorMatchingMode signature search with mode constants, session validation, and detailed logging
Build Linux Packages / Build Linux (push) Failing after 10m59s
Build Windows Packages / Build Windows (push) Failing after 2h6m47s
2026-09-03 07:35:59 +01:00
Gordon Bolton bafed60b20 fix(print): try correct PMSessionSetColorMatchingMode signatures (3-arg, 2-arg+lock, NoLock+lock) to avoid crash
Build Windows Packages / Build Windows (push) Failing after 5m20s
Build Linux Packages / Build Linux (push) Failing after 10m55s
2026-09-03 00:46:37 +01:00
Gordon Bolton 7b8d9e644a fix(print): correct log::warn! string literal in color matching helper
Build Windows Packages / Build Windows (push) Failing after 9m50s
Build Linux Packages / Build Linux (push) Failing after 10m52s
2026-09-03 00:28:01 +01:00
Gordon Bolton ff01e97ccf fix(print): use private PMSessionSetColorMatchingMode SPI and pre-select driver color bypass
Build Windows Packages / Build Windows (push) Successful in 7m14s
Build Linux Packages / Build Linux (push) Failing after 14m28s
2026-09-03 00:19:59 +01:00
Gordon Bolton 8f8c73d46b fix(print): deref Retained<NSString> for NSPrintInfo printSettings insert
Build Windows Packages / Build Windows (push) Successful in 6m38s
Build Linux Packages / Build Linux (push) Successful in 10m7s
2026-09-02 23:33:39 +01:00
Gordon Bolton 2273882330 fix(print): force application color matching on macOS via PM, NSPrintInfo, and lp
Build Windows Packages / Build Windows (push) Failing after 5m30s
Build Linux Packages / Build Linux (push) Successful in 10m30s
2026-09-02 23:22:58 +01:00
Gordon Bolton 53d5ab20b9 fix(print): add display_name field to Windows Printer initializers
Build Windows Packages / Build Windows (push) Successful in 6m44s
Build Linux Packages / Build Linux (push) Successful in 9m19s
2026-09-02 23:04:25 +01:00
Gordon Bolton 313bdfdee4 fix(print): bind macOS print panel via Core Printing, fix Windows build, and correct Epson bypass (#188)
Build Windows Packages / Build Windows (push) Failing after 2m5s
Build Linux Packages / Build Linux (push) Successful in 10m43s
2026-09-02 22:44:20 +01:00
Gordon BoltonandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com> ce5e0ef2b5 fix(print): open native NSPrintPanel for macOS printer properties (#188)
Build Windows Packages / Build Windows (push) Failing after 2m15s
Build Linux Packages / Build Linux (push) Successful in 11m2s
Replace the CUPS web interface fallback with the native macOS NSPrintPanel,
pre-configured with AP_ColorMatchingMode=AP_ApplicationColorMatching so the
driver's color-management controls are greyed out (application manages color).
Capture the user's media type and quality selections from the dialog and feed
them into the lp job via PrintOptions.cups_options.

- Add objc2-app-kit / objc2-application-services dependencies for NSPrintPanel
- Rewrite show_printer_properties to dispatch NSPrintPanel on the main thread
- Always add AP_ColorMatchingMode=AP_ApplicationColorMatching in build_lp_args
- Forward captured CUPS options with deduplication against explicit fields
- Detect Epson EPIJ_Medi / EPIJ_CCor / EPIJ_OSColMat PPD options
- Add parse_cups_options_string helper and filtering of internal Apple keys
- Update frontend to store and pass captured options per printer

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

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-02 21:21:52 +01:00