Map ProfilingPreset ↔ targen / printtarg / colprof configs in one place
#82
Notifications
Due Date
No due date set.
Blocks
#86 Dead UI, duplicated colour types, shared argv / save-panel helpers
gronod/iccery-v2-mac
Reference: gronod/iccery-v2-mac#82
Reference in New Issue
Block a user
Summary
ProfilingPresetis a flat snake_case snapshot of Stage 1 + 2 + 4 + calibration fields (v1 JSON schema).TargetWorkflowViewModel.applyPreset/saveCurrentAsPresetandProfileWorkflowViewModel.applyPreset/presetSnapshothand-copy every field. A new flag will be forgotten on one path.Do not merge
ProfilingPresetinto the live configs — the JSON schema is a compatibility surface (docs/22-settings-presets.md).Spec refs
docs/22-settings-presets.mdProfilingPreset,TargenConfig,PrinttargConfig,ColprofConfigScope
In
Add initializers / snapshots on the Core configs (preferred) or a dedicated
PresetMappingenum inPackages/ICCeryCore/Sources/ICCeryCore/Settings/:TargetWorkflowViewModel.applyPresetbecomes: assign form fields from the three configs (or assign configs then push into form bindings — pick one direction and document it).saveCurrentAsPresetbuilds the three configs from the live form (buildTargenConfig,buildPrinttargConfig,profile.buildColprofConfig) thenProfilingPreset(...).Layout-order encoding stays:
noRandomize == true→.raster(-r)1→.deterministic(-R 1).customSeedPage size
"210x297"custom parse stays (parseCustomPage).ProfileWorkflowViewModel.applyPresetshould callColprofConfig(preset:)(or shared FWA parse). FWA mapping (none/""/D50/D65/ custom path) lives in one function next toColprofFwaSelection.Out
PresetCatalog).Full solution
colourSpaceon the preset as"rgb"|"cmyk"strings.fullSpreadAlgorithmstorage stays the flag letter /"ofps"via existingFullSpreadAlgorithm.presetValue.nilmeans “control off / omit flag”. Do not write0/0.50sentinels that would emit flags targen is specified to skip.calibrationFile+applyCalibration; they are not part ofTargenConfig.Rewrite invariants
PresetStore.saveCustomstill throws).Textonly (#114).#tiffDpiafter apply (M2 regression).Dependencies
Blocks-on: none.
Unblocks: cleanup ticket (optional
ArgsBuilderwork touches the same arg/config files — land mapping first).Test
Tests/ICCeryCoreTests/PresetTests.swift:ProfilingPreset→ three configs →ProfilingPresetequals on all Stage 1/2/4 fields (ignore generated id if you re-id).PrinttargConfig.dpi == 150.niloptional fields do not become0inTargenConfig(grey/single/neutral/ink/dark/devicePower)."none"/""/"D50"/ custom path survive the round-trip."210x297"→.custom+ width/height; invalid"foo"falls back to A4 (match current VM behaviour).Milestone2UITestspreset apply.Acceptance criteria
Implementation originally landed in stacked commit
d4261bavia PR #87.Completion/verification landed in PR #98 at
597cce7.Acceptance evidence:
[x] Centralised ColprofFwaSelection and FWA mapping logic in PresetMapping.swift.
[x] Stale custom FWA paths cleared on nil/none preset application.
[x] Preset calibration fields applied before Stage 2 config construction.
[x] TestAppEnvironment harness implemented for isolated temporary testing.
[x] Round-trip mapping asserted across all 8 full-spread algorithms and page formats.
Verification at milestone/m8-consolidation
891a504ee7:targeted suites: passed (25 tests)
full universal ICCeryCoreTests: 339 passed, 0 failed
full ICCeryUITests: 29 passed, 0 failed
Closing manually after code and tests are present on the milestone branch.