Skip to content

Refactor compression lifecycle, consolidate messages, and add no-upda… - #24

Merged
CodeDead merged 1 commit into
developmentfrom
feature/refactoring
Jun 2, 2026
Merged

Refactor compression lifecycle, consolidate messages, and add no-upda…#24
CodeDead merged 1 commit into
developmentfrom
feature/refactoring

Conversation

@CodeDead

@CodeDead CodeDead commented Jun 2, 2026

Copy link
Copy Markdown
Owner

…te window

  • Add compressrNoUpdate language key across all locales (10 languages) and wire it into the new NoUpdate window view
  • Replace all Ignore* enum variants with a single Message::Noop variant
  • Remove current_scale field from Window struct; scale_factor now always returns 1.0
  • Remove compression_succeeded field from State — completion is now inferred from the results vector
  • Add compression_aborted: Arc<AtomicBool> to State; set on main window close during compression to cancel in-flight tasks
  • Add cancellation checks throughout compress_single so running operations abort promptly when the window is closed
  • Validate output path is an existing directory before starting compression (fail early instead of late)
  • Change CompressionParams.output_path to Arc<str> to share across batch items
  • Return &'static str from get_platform() instead of an owned String
  • Remove Serialize derives from Version/Platform (only deserialized)
  • Replace exhaustive theme match with dynamic Theme::ALL lookup
  • Add pixel_data() helper and use native color types in BMP/TIFF encoders
  • Minor cleanup: use first() over [0], format! over .to_string() +, inline trivial variables, fold for totals

…te window

- Add `compressrNoUpdate` language key across all locales (10 languages)
  and wire it into the new NoUpdate window view
- Replace all `Ignore*` enum variants with a single `Message::Noop` variant
- Remove `current_scale` field from `Window` struct; `scale_factor` now
  always returns 1.0
- Remove `compression_succeeded` field from `State` — completion is now
  inferred from the results vector
- Add `compression_aborted: Arc<AtomicBool>` to `State`; set on main
  window close during compression to cancel in-flight tasks
- Add cancellation checks throughout `compress_single` so running
  operations abort promptly when the window is closed
- Validate output path is an existing directory before starting
  compression (fail early instead of late)
- Change `CompressionParams.output_path` to `Arc<str>` to share across
  batch items
- Return `&'static str` from `get_platform()` instead of an owned `String`
- Remove `Serialize` derives from `Version`/`Platform` (only deserialized)
- Replace exhaustive theme match with dynamic `Theme::ALL` lookup
- Add `pixel_data()` helper and use native color types in BMP/TIFF encoders
- Minor cleanup: use `first()` over `[0]`, `format!` over `.to_string() +`,
  inline trivial variables, `fold` for totals
@CodeDead CodeDead self-assigned this Jun 2, 2026
@CodeDead CodeDead added enhancement New feature or request dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 2, 2026
@CodeDead
CodeDead merged commit a1f8e53 into development Jun 2, 2026
1 check passed
@CodeDead
CodeDead deleted the feature/refactoring branch June 2, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant