Regardless of the patch count selected in the UI (e.g. 400, 800, 1500, 2500, or Custom), ArgyllCMS targen always generates exactly 836 patches for RGB targets.
Root Cause
In src-tauri/src/commands.rs, build_targen_args only checks config.total_patches when appending the -f flag to targen command arguments (if let Some(patches) = config.total_patches). However, the frontend (src/js/targen.js) sends patch_count in the payload without setting total_patches. Because total_patches is None, the -f flag is omitted completely from the targen command line. When targen is executed without -f, ArgyllCMS defaults to its built-in formula, producing 836 patches.
Solution
Update build_targen_args in src-tauri/src/commands.rs to read config.patch_count (and config.total_patches as fallback) and include -f <patch_count>.
Update src/js/targen.js to send patch_count and total_patches with proper validation.
Update unit tests in src-tauri/src/commands.rs.
Bump patch version to 0.1.5.
### Description
Regardless of the patch count selected in the UI (e.g. 400, 800, 1500, 2500, or Custom), ArgyllCMS `targen` always generates exactly 836 patches for RGB targets.
### Root Cause
In `src-tauri/src/commands.rs`, `build_targen_args` only checks `config.total_patches` when appending the `-f` flag to `targen` command arguments (`if let Some(patches) = config.total_patches`). However, the frontend (`src/js/targen.js`) sends `patch_count` in the payload without setting `total_patches`. Because `total_patches` is `None`, the `-f` flag is omitted completely from the `targen` command line. When `targen` is executed without `-f`, ArgyllCMS defaults to its built-in formula, producing 836 patches.
### Solution
1. Update `build_targen_args` in `src-tauri/src/commands.rs` to read `config.patch_count` (and `config.total_patches` as fallback) and include `-f <patch_count>`.
2. Update `src/js/targen.js` to send `patch_count` and `total_patches` with proper validation.
3. Update unit tests in `src-tauri/src/commands.rs`.
4. Bump patch version to `0.1.5`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Regardless of the patch count selected in the UI (e.g. 400, 800, 1500, 2500, or Custom), ArgyllCMS
targenalways generates exactly 836 patches for RGB targets.Root Cause
In
src-tauri/src/commands.rs,build_targen_argsonly checksconfig.total_patcheswhen appending the-fflag totargencommand arguments (if let Some(patches) = config.total_patches). However, the frontend (src/js/targen.js) sendspatch_countin the payload without settingtotal_patches. Becausetotal_patchesisNone, the-fflag is omitted completely from thetargencommand line. Whentargenis executed without-f, ArgyllCMS defaults to its built-in formula, producing 836 patches.Solution
build_targen_argsinsrc-tauri/src/commands.rsto readconfig.patch_count(andconfig.total_patchesas fallback) and include-f <patch_count>.src/js/targen.jsto sendpatch_countandtotal_patcheswith proper validation.src-tauri/src/commands.rs.0.1.5.