File dialogs & artefact helpers #6

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

Summary

One NSOpenPanel/NSSavePanel wrapper per purpose. Never a shared picker.

Spec refs

docs/04-argyll-binaries.md §0.2/§13, 24-issues-invariants.md #103 #210 #211 #172 #58 #69.

Scope

In: pickers, TIFF→PNG, ti2 header, cwd helpers, getAppInfo, getProfilePath.
Out: CGATS parse (issue 30).

Implementation notes

  • selectTargetFile — save, .ti1
  • selectExistingTarget — open, .ti1/.ti2
  • selectProfileFile.icc/.icm/.mpp (NOT .ti*)
  • selectSpectrumFile.sp
  • selectDatasetFile — open, .ti3/.txt/.cgats/.csv
  • selectDirectory, selectCsvSavePath, selectCalFile
  • readTiffPreviewPng: decode TIFF → PNG, max edge 1200, high-quality. Never use raw TIFF as gallery source.
  • parseTi2Header: TARGET_INSTRUMENT, NUMBER_OF_SETS → patch_count, NUMBER_OF_PAGES, sibling .ti1. Note: NUMBER_OF_FIELDS is CGATS field count, not ink count.
  • resolveSafeCwd, getDefaultWorkingDir, getAppInfo, readFileBase64 for text artefacts only.

Rewrite invariants

#103/#210/#211 dedicated pickers. #172 profile filter. #58 host-side PNG.

Dependencies

Blocks-on: 1.
Unblocks: 5, 7, 8, 10, 23, 30.

Test

  • CI/mock: each picker mode+filters documented as unit-testable helpers; TIFF→PNG fixture; ti2 header fixtures.
  • Hardware: N/A.

Acceptance criteria

  • No shared “generic file dialog” API used by more than one purpose.
## Summary One NSOpenPanel/NSSavePanel wrapper per purpose. Never a shared picker. ## Spec refs docs/04-argyll-binaries.md §0.2/§13, 24-issues-invariants.md #103 #210 #211 #172 #58 #69. ## Scope In: pickers, TIFF→PNG, ti2 header, cwd helpers, getAppInfo, getProfilePath. Out: CGATS parse (issue 30). ## Implementation notes - `selectTargetFile` — save, `.ti1` - `selectExistingTarget` — open, `.ti1/.ti2` - `selectProfileFile` — `.icc/.icm/.mpp` (NOT `.ti*`) - `selectSpectrumFile` — `.sp` - `selectDatasetFile` — open, `.ti3/.txt/.cgats/.csv` - `selectDirectory`, `selectCsvSavePath`, `selectCalFile` - `readTiffPreviewPng`: decode TIFF → PNG, max edge 1200, high-quality. Never use raw TIFF as gallery source. - `parseTi2Header`: `TARGET_INSTRUMENT`, `NUMBER_OF_SETS` → patch_count, `NUMBER_OF_PAGES`, sibling `.ti1`. Note: `NUMBER_OF_FIELDS` is CGATS field count, not ink count. - `resolveSafeCwd`, `getDefaultWorkingDir`, `getAppInfo`, `readFileBase64` for text artefacts only. ## Rewrite invariants #103/#210/#211 dedicated pickers. #172 profile filter. #58 host-side PNG. ## Dependencies Blocks-on: 1. Unblocks: 5, 7, 8, 10, 23, 30. ## Test - CI/mock: each picker mode+filters documented as unit-testable helpers; TIFF→PNG fixture; ti2 header fixtures. - Hardware: N/A. ## Acceptance criteria - [ ] No shared “generic file dialog” API used by more than one purpose.
gronod added this to the M1 — Foundation & process core milestone 2026-09-08 17:39:31 +01:00
gronod added the
Priority
High
2
Project/ICCery-v2Feature/Backend
labels 2026-09-08 17:39:31 +01:00
gronod reopened this issue 2026-09-08 19:06:39 +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#6