Skip to content

Rename process modes to Color Negative / B&W Negative / Transparency - #819

Merged
marcinz606 merged 1 commit into
mainfrom
rename-process-modes
Aug 13, 2026
Merged

Rename process modes to Color Negative / B&W Negative / Transparency#819
marcinz606 merged 1 commit into
mainfrom
rename-process-modes

Conversation

@marcinz606

@marcinz606 marcinz606 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Closes #818.

What

ProcessMode is a StrEnum whose value is the label, so renaming the values renames the app: the Process picker, the HUD mode pill, the settings/copy dialog and the crosstalk editor all follow for free.

Member Old New
ProcessMode.C41 C41 Color Negative
ProcessMode.BW B&W B&W Negative
ProcessMode.E6 E-6 Transparency

Member names stay C41 / BW / E6 — the ~200 call sites compare through members and are untouched.

Migration

Old strings reach the config from more places than a loaded flat dict (sticky last_process_mode, asset dicts, session_stitches / session_hdr_merges blobs, export presets), so this is not a migrations.py entry: ProcessMode._missing_ maps the legacy names and ProcessConfig.__post_init__ coerces on every construction. Crosstalk .toml files declaring process = "E-6" are coerced on read, so a user's own matrices still match their mode. An unrecognised value still resolves to colour negative, which is how the render has always treated it.

Also in here (string → enum)

Fields that already had an enum but were declared str, each coercing a stale saved value to its default rather than raising:

  • PipelineContext.process_modeProcessMode (tests now pass members, not literals)
  • export_fmt / output_mode / export_resolution_mode → their existing enums
  • autocrop_ratioAspectRatio, autocrop_modeAutocropMode. AspectRatio moves next to GeometryConfig so the config can name it without a cycle; domain.models re-exports it.
  • new WhiteCaptureMode for Scanlight white-light capture (replaces the lowercase remap in controller.py)
  • new CrosstalkType for a profile's provenance. get_type() still returns str — a type is free-form on disk by design.

export_color_space deliberately stays str: ColorSpace is a plain Enum, so typing it would break every string comparison against it.

Docs

USER_GUIDE.md, PIPELINE.md, CROSSTALK.md and the README use the new names; the chemistry stays where a sentence is about chemistry (Transparency (E-6), the orange mask, RA4 papers). The built-in profile Generic C41 is a profile name, not a mode, and is unchanged.

Verification

make all green: 3959 passed. New coverage for the legacy names (config, crosstalk .toml, scanlight settings) and for stale enum values falling back to their defaults.

The mode picker showed the chemistry codes C41, B&W and E-6. ProcessMode is a
StrEnum whose value is the label, so renaming the values renames the picker, the
HUD pill and the settings dialog together.

Saved edits, sticky settings, session blobs and crosstalk .toml files all carry
the old strings, so ProcessMode._missing_ maps them back and
ProcessConfig.__post_init__ coerces on every construction — that covers every
path a mode reaches the config from, not just a loaded flat dict.

While in the same files, type the fields that already had an enum but were
declared str: PipelineContext.process_mode, the export format / output mode /
resolution mode, autocrop_ratio and autocrop_mode, plus a new WhiteCaptureMode
for the Scanlight white-light capture and CrosstalkType for a profile's
provenance. Each coerces a stale saved value to its default instead of raising.
AspectRatio moves next to GeometryConfig so the config can name it;
domain.models re-exports it.

Closes #818
@marcinz606
marcinz606 marked this pull request as ready for review August 13, 2026 08:46
@marcinz606
marcinz606 merged commit 38e6070 into main Aug 13, 2026
1 check passed
@marcinz606
marcinz606 deleted the rename-process-modes branch August 13, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename process modes across the app

1 participant