diff --git a/CHANGELOG.md b/CHANGELOG.md index 662ce23b..e045d067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,35 +7,33 @@ All notable changes to Kromacut are documented in this file. ### Added - **2D history shortcuts (#163)** - Ctrl/Cmd+Z undoes and Ctrl/Cmd+Shift+Z redoes image edits in 2D. The shortcuts are ignored in editable fields, dialogs, popovers, menus and open select lists, in 3D mode, while cropping, and during processing, and they follow the physical Z key on non-Latin keyboard layouts. Documented in the image adjustments guide, with Playwright regressions for keyboard behavior. -- **Auto-paint search guidance and cancellation (#103)** - Enhanced matching pauses before searching 1,024 or more distinct target colors, with guidance to quantize photos to 16–32 colors in 2D, disable repeats, or use a Fast / Compact shortcut. The advisory threshold comes from fixed-seed Balanced / Detailed measurements with repeats rather than image dimensions; deeper searches and more filaments can still be slow below it. Running filament searches now have **Cancel Auto-paint**, which terminates the worker and stays stopped until restarted or settings change; debounced requests and late worker messages cannot restart cancelled work. Changing settings invalidates previous Run/Cancel choices, including when returning to earlier values. All 12 languages include the controls, Auto-paint guide, and troubleshooting advice. Regression coverage checks the threshold, worker cancellation and restart, settings round-trips, and exact baseline final stacks and scores for existing image/profile fixtures with seed 12345. Frozen pre-change scoring functions run alongside production on each test runtime, preserving exact comparisons across Node/OS differences, and browser-clock control keeps debounce cancellation deterministic. E2e runs accept a private smoke-test port, and the in-process benchmark/test loader opens no WebSocket listener. -- **Open in Slicer (desktop)** - The 3D download menu in the desktop app adds **Open in Slicer**, which builds the same 3MF as **Download 3MF** and opens it with the system's default `.3mf` app without a Save As dialog. Set your slicer as that default app to open models straight in it. The model is written to a new file in Kromacut's cache folder, so a slicer that still has an earlier copy open is never overwritten, and copies older than a day are removed on the next handoff. Failures to write or dispatch the file, including a missing default app, show a localized error that points to **Download 3MF**. Native dispatch runs off the UI thread and reports OS launch errors without waiting for the slicer to close. The browser version is unchanged. Updated the localized export guides; added native tests for file naming, collisions, invalid data, cache cleanup, and launcher failures, and a browser regression for the desktop handoff. -- **Choose the slicer for Open in Slicer (desktop, #152)** - **Open in Slicer** now asks which app opens the model before building it. The chooser lists **System default** (the system's `.3mf` app, as before) plus Bambu Studio, Orca Slicer, PrusaSlicer, and UltiMaker Cura when they are installed in their usual locations: `/Applications` or `~/Applications` on macOS; Program Files or `%LOCALAPPDATA%\Programs` on Windows, including the newest versioned Cura folder (a saved older Cura stays usable after a newer version is installed next to it, #200); and `PATH` commands or Flatpak installs on Linux. **Browse** picks any other app with the native file dialog; only app bundles, `.exe` files, or executables are accepted, and Kromacut remembers picked apps in its config folder, up to 16, always keeping the saved slicer among them so later Browse picks cannot push it out. Models are only ever launched with a detected slicer or a picked app, never with a program named by the web view. **Always use this slicer** saves the choice under `kromacut:desktop-slicer`, so later clicks open the model straight away and the menu names the slicer; **Choose Slicer** in the same menu changes or forgets it. Closing a chooser opened from the menu returns keyboard focus to the download button, because the menu item that opened it is gone (#185). A saved slicer that was moved or uninstalled is forgotten and the chooser explains why. Flatpak slicers receive the model through Flatpak file forwarding, so their sandbox can read it. Launch failures keep the existing localized error. The chooser and menu are localized into all 12 languages, and the export guides describe the choice. Added native tests for per-platform detection, newest-version selection, a saved older Cura staying launchable after an upgrade, launchable-app validation, the detected-or-picked launch rule, picked-app storage that keeps the saved slicer, launch commands, and slicer path decoding; unit tests for the saved preference; and browser regressions for choosing, remembering, changing, browsing (including which saved slicer Browse keeps), forgetting, a missing saved slicer, and focus after closing a chooser opened from the menu. -- **Change or forget the saved slicer from Settings (desktop, #173)** - The desktop Settings dialog gains an **Open in Slicer** row that shows the saved choice (**Ask every time**, **System default**, or the slicer's name and path) and works without an image or model. **Change** opens the slicer chooser, whose confirm button then reads **Save**: it saves the selected slicer, including one picked with **Browse**, without exporting or opening anything; the **Always use this slicer** switch is hidden there because the choice is always saved. **Forget** clears the saved choice so the next Open in Slicer asks again. Closing the chooser opened from Settings returns keyboard focus to the Settings button. Settings and the 3D download menu share one preference, so a change in either shows up in the other straight away. The new strings, the updated remember hint, and the export guides' Open in Slicer paragraph are localized into all 12 languages. Added browser regressions for the browser build without the row, saving a detected, browsed, or system-default slicer from Settings without exporting, including with a model built, keeping the saved slicer launchable while browsing, focus after closing the chooser, cancelling, forgetting, and the download menu following a choice made or forgotten in Settings. -- **Saved slicer survives a slow check (desktop, #186)** - When **Open in Slicer** is still checking the saved slicer while a new one is saved or forgotten in Settings, the late check result is ignored. It no longer clears the newly saved slicer or opens the model in the replaced one. A rebuild that finishes during the check is exported with its own head count, pause schedule, and layer heights, instead of the settings of the build shown when **Open in Slicer** was clicked. A slicer chooser opened during the check, for example from **Settings → Change**, is also left alone: the late result no longer turns that chooser's **Save** into **Open**, opens the model over it, or forgets the saved slicer. Added unit regressions that hold the slicer lookup until after Settings saves or forgets a slicer, a chooser opens or closes, or a new build finishes, and browser regressions for a found, missing, or failed check that finishes while the Settings chooser is open. -- **Pull request CI and `test:e2e:all`** - Pull requests into `develop` and `main`, and pushes to them, now run lint, the build, unit tests, the desktop app's Rust tests (`cargo test` on Linux, macOS, and Windows), and every Playwright e2e suite in parallel jobs, with cached npm packages, Chromium, and cargo builds. The other Linux jobs run on Ubuntu 24.04 rather than `ubuntu-latest` (Ubuntu 26.04), where Playwright cannot install Chromium, and the Chromium cache is keyed by runner image. One `CI passed` check summarizes the result. Fork pull requests get a read-only token and no secrets. `npm run test:e2e:all` runs the same suites locally one after another: the `@smoke` tests, then the docs, landing, privacy, terms, 404, i18n, and i18n build suites, each on a fresh server. It fails if any suite fails, if a Playwright config isn't in the suite list, or if a test isn't run by any suite; the long `@full` export matrix stays on demand. Area specs now refuse to run under the wrong Playwright config and name the script to use. Palette Proof, the Settings legal links, and the adaptive Stack Matrix round trip were not in any suite and now run with `@smoke`. -- **Cats Exact benchmark reproducibility** - Audited the stale replay fingerprint against historical prediction changes while preserving captured observations and artifact hashes. Calibrated benchmarks capture provenance before optimization, pin archived source and provenance to one resolved commit, and save full results before golden assertions. CLI validation rejects invalid case/head/grouping selections and report paths that alias saved inputs, and checks replay results against preparation checksums; cached preparation requires an uncached Exact result and rejects mismatched physical/separation settings, repeat budgets, profiles, palettes, and model contexts. Fresh-stack multi-head measurements support warmed repeated samples, deterministic result checks, and separate fitting, optimization, analysis, and build-validation timing. The cats fixtures record the profile hash of the committed LF file instead of its Windows CRLF form, and `.kfil` and performance fixture JSON files are checked out byte-for-byte on every platform, so the immutability check passes on macOS and Linux; cached multi-head preparation still accepts results captured from CRLF checkouts of the same profile. +- **Auto-paint search guidance and cancellation (#103)** - Enhanced matching pauses before searching 1,024 or more distinct target colors, with guidance to quantize photos to 16–32 colors in 2D, disable repeats, or use a Fast / Compact shortcut. The advisory threshold comes from fixed-seed Balanced / Detailed measurements with repeats rather than image dimensions; deeper searches and more filaments can still be slow below it. Running filament searches now have **Cancel Auto-paint**, which terminates the worker and stays stopped until restarted or settings change; debounced requests and late worker messages cannot restart cancelled work. Changing settings invalidates previous Run/Cancel choices, including when returning to earlier values. All 12 languages include the controls, Auto-paint guide, and troubleshooting advice. Regression coverage checks the threshold, worker cancellation and restart, settings round-trips, and exact baseline final stacks and scores for existing image/profile fixtures with seed 12345. +- **Open in Slicer (desktop)** - The 3D download menu in the desktop app adds **Open in Slicer**, which builds the same 3MF as **Download 3MF** and opens it in a slicer without a Save As dialog. It first asks which app should open the model: **System default** (the system's `.3mf` app), or Bambu Studio, Orca Slicer, PrusaSlicer, and UltiMaker Cura when they are installed in their usual locations: `/Applications` or `~/Applications` on macOS; Program Files or `%LOCALAPPDATA%\Programs` on Windows, including the newest versioned Cura folder (a saved older Cura stays usable after a newer version is installed next to it, #200); and `PATH` commands or Flatpak installs on Linux. **Browse** picks any other app with the native file dialog; only app bundles, `.exe` files, or executables are accepted, and Kromacut remembers up to 16 picked apps, always keeping the saved slicer among them. With **System default**, make your slicer the default app for `.3mf` files first. **Always use this slicer** saves the choice under `kromacut:desktop-slicer`, so later clicks open the model straight away, and the menu shows the saved slicer's name when it is a specific app. When you choose a specific app, Kromacut only launches it if it was detected or picked with **Browse**, never a program named by the web view. **Choose Slicer** in the menu changes or forgets the saved slicer, and so does the **Open in Slicer** row in the desktop Settings dialog, which shows the saved choice (**Ask every time**, **System default**, or the slicer's name and path), works without an image or model, and saves a new choice without exporting or opening anything. Settings and the download menu share one saved choice, so a change in either shows up in the other straight away. Changing or forgetting the saved slicer while Open in Slicer is still checking the previous one does not let that check clear the new choice or open the model in the previous slicer, and a rebuild that finishes during the check is exported with its own head count, pause schedule, and layer heights instead of those of the build shown when **Open in Slicer** was clicked. A slicer chooser opened during the check, for example from **Settings → Change**, is also left alone: the late result does not turn that chooser's **Save** into **Open**, open the model over it, or forget the saved slicer. A saved slicer that was moved or uninstalled is forgotten and the chooser explains why. Closing the chooser returns keyboard focus to the download button or the Settings button. Each model is written to a new file in Kromacut's cache folder, so a slicer that still has an earlier copy open is never overwritten, and copies older than a day are removed on the next handoff. Flatpak slicers receive the model through Flatpak file forwarding, so their sandbox can read it. Failures to write or launch the file, including a missing default app, show a localized error that points to **Download 3MF**; Kromacut does not wait for the slicer to close. Like the rest of the download menu, **Open in Slicer** is disabled while Kromacut rebuilds the 3D preview. The browser version is unchanged. The chooser, menu, Settings row, and export guides are localized into all 12 languages. Added native tests for file naming, collisions, invalid data, cache cleanup, per-platform slicer detection, newest-version selection, a saved older Cura staying launchable after an upgrade, launchable-app validation, the detected-or-picked launch rule, picked-app storage, launch commands, and launcher failures; unit tests for the saved preference, including a slow saved-slicer check that finishes after Settings saves or forgets a slicer, a chooser opens or closes, or a new build finishes; and browser regressions for the desktop handoff, choosing, remembering, changing, browsing, and forgetting a slicer from the menu and Settings, a missing saved slicer, a found, missing, or failed check that finishes while the Settings chooser is open, the browser build without the Settings row, and focus after closing the chooser. +- **Pull request CI and `test:e2e:all`** - Pull requests into `develop` and `main`, and pushes to them, now run lint, the build, unit tests, the desktop app's Rust tests (`cargo test` on Linux, macOS, and Windows, where the test binary embeds the app's Windows manifest so it can start), and every Playwright e2e suite in parallel jobs, with cached npm packages, Chromium, and cargo builds. The other Linux jobs run on Ubuntu 24.04 rather than `ubuntu-latest` (Ubuntu 26.04), where Playwright cannot install Chromium, and the Chromium cache is keyed by runner image. One `CI passed` check summarizes the result. Fork pull requests get a read-only token and no secrets. `npm run test:e2e:all` runs the same suites locally one after another: the `@smoke` tests, then the docs, landing, privacy, terms, 404, i18n, and i18n build suites, each on a fresh server. It fails if any suite fails, if a Playwright config isn't in the suite list, or if a test isn't run by any suite; the long `@full` export matrix stays on demand. Area specs now refuse to run under the wrong Playwright config and name the script to use. Palette Proof, the Settings legal links, and the adaptive Stack Matrix round trip were not in any suite and now run with `@smoke`. - **Multi-head printing guide** - New in-app documentation page explaining Multi-head printing: prerequisites, how layers become color runs and windows, the Head Schedule, the combination search space, Color grouping, and what Fast, Balanced, and Thorough search depth change, with four explanatory diagrams. The guide, navigation metadata, and diagrams are available in all 12 languages, with measured translated labels and reciprocal Auto-paint links. Covers routed preview colors, 3MF head assignments and M600 checkpoints, single-head fallback, and cancellation when the image changes. Regression checks require matching guide metadata and complete diagram catalogs and label bounds; browser coverage loads the guide and all four illustrations in every language. -- **Multi-head printing** - Auto-paint can analyze per-pixel filament orders across 2–8 heads in a background worker. Successful builds route every color region through its per-layer filament path and scheduled physical head; the preview shows each region’s predicted blend, corrected by the same calibration evidence as single-head builds, and can display its physical filament instead. All smoothing strengths share conforming region boundaries and closed layer geometry, with chunked generation to keep builds responsive. Multi-head 3MFs retain that geometry and physical filament colors, use the selected head count and head assignments, and insert M600 pause markers at exactly the Head Schedule’s swap checkpoints. The download menu offers only 3MF for multi-head builds, as it does for Flat Paint, because STL can't carry head routing. Single-head fallback builds still offer STL. Selected heads beyond the filament count remain EMPTY, and Center/Edge priorities use the same weighted targets as normal Auto-paint; colors with zero regional weight retain printable surfaces through palette matching and finite routing groups without changing weighted centroids. Fast/Balanced/Thorough controls search effort with bounded deterministic sampling. A **Color grouping** control chooses the search targets: Layer-based merges colors sharing a printer layer; Color-based keeps hues separate within a bounded group budget while preserving every member’s original print layer. At least one group is retained per occupied layer, including visible regions with zero regional weight, so capped palettes keep every printable color assigned without changing scoring weights. Color-based can produce more printed colors, but does not guarantee lower color error. Fast fitted-optics simulation nominates a bounded shortlist; windows and final region paths are scored with the full appearance model and usage-weighted CIEDE2000 on the original grouped colors. Fully scored assignments are reused when their physical context is unchanged, avoiding repeated broad searches during reconciliation. The current order remains available during reconciliation, and calibrated preview colors and the 0.25 minimum predicted gain gate are retained. Head count, search depth, color grouping, and the mode toggle persist through fallback builds and retain edits made during analysis; Multi-head and Flat Paint are mutually exclusive. Worker errors, unusable or non-improving plans, and plans whose predicted usage-weighted mean CIEDE2000 gain over the normal stack is below 0.25 retain the normal single-head model, with a notice and its original start color and swaps. Instructions follow the built snapshot, and before the first multi-head build **Copy** gives the same build prompt the panel shows, not single-head swaps; fallback builds copy their single-head plan. Image changes cancel pending analysis and discard obsolete builds. Controls, notices, schedules, copied text, and usage guides are localized into all 12 languages. Added region/filament routing, head/extruder, pause, smoothing/topology, fallback, predicted gain, async lifecycle, worker failure, browser settings-persistence, and 3MF-only download menu regression coverage. Color-group regressions cover capped palettes crossing physical layer boundaries, and calibrated image measurements use final-stack surfaces with CIEDE2000. Added full-model shortlist, proof-anchor, weighted reconciliation, seeded corrected multi-window routing, and bounded-evaluation regressions plus reproducible measured-profile cats/Rocco benchmarks; removed unused LUT analyzers, test-only assignment bookkeeping, and an unreachable per-nozzle voxel export path, so multi-head export progress no longer reserves an idle span. - -- **Multi-head filament requirements** - Head schedules use final per-color paths only on layers those regions can print, avoiding reloads for abandoned filaments and unprinted suffixes while retaining zero-weight visible regions, useful preloads, and idle-head carryover. Height dithering resolves the actual filtered pixels on the preview's cropped block grid in the analysis worker; routing validation retains those printed surface limits. Added deterministic unused-load, active-layer head coverage, shared-block dithering, cropped-pixel scheduling, swap-count, copied-instruction, and physical 3MF regression coverage. -- **Awards page and Snapmaker Innovation Fund winner badge** - A new Awards page shows Kromacut's Snapmaker Innovation Fund Winner medal, linked to the Snapmaker Innovation Fund page. It is available in all 12 languages, prerendered for search engines, and listed in the sitemap. The website footer and the Settings links open it; the desktop app opens it in the system browser. The website and the README each gain an Awards section near the bottom. The badges embed Snapmaker's official logo files unaltered. A maintenance script regenerates the badge SVGs and the PNGs rendered from them; pages show the PNGs because Safari and other WebKit views draw the SVG lettering at the wrong font weight. Added route, static-page, Settings-link, and landing browser coverage. Privacy and Terms browser tests now account for all eight footer links, with the Privacy suite checking keyboard focus from Support through Awards to Privacy, restoring both suites after the Awards link was added. +- **Multi-head printing** - Auto-paint can analyze per-pixel filament orders across 2–8 heads in a background worker. Successful builds route every color region through its per-layer filament path and scheduled physical head; the preview shows each region’s predicted blend, corrected by the same calibration evidence as single-head builds, and can display its physical filament instead. All smoothing strengths share conforming region boundaries and closed layer geometry, with chunked generation to keep builds responsive. Multi-head 3MFs retain that geometry and physical filament colors, use the selected head count and head assignments, and insert M600 pause markers at exactly the Head Schedule’s swap checkpoints. The download menu offers only 3MF for multi-head builds, as it does for Flat Paint, because STL can't carry head routing; single-head fallback builds still offer STL. Multi-head export progress has no idle stretch reserved for unused work. The Head Schedule takes filament requirements from each region's final path on the layers that region can print, including zero-weight visible regions, so abandoned filaments and unprinted layers above a region do not cause reloads, while useful preloads and idle-head carryover are still allowed; height dithering is resolved on the preview's cropped block grid so the schedule matches the printed surfaces. Selected heads beyond the filament count remain EMPTY, and Center/Edge priorities use the same weighted targets as normal Auto-paint; colors with zero regional weight retain printable surfaces through palette matching and finite routing groups without changing weighted centroids. Fast/Balanced/Thorough controls search effort with bounded deterministic sampling. A **Color grouping** control chooses the search targets: Layer-based merges colors sharing a printer layer; Color-based keeps hues separate within a bounded group budget while preserving every member’s original print layer. At least one group is retained per occupied layer, including visible regions with zero regional weight, so capped palettes keep every printable color assigned without changing scoring weights. Color-based can produce more printed colors, but does not guarantee lower color error. Fast fitted-optics simulation nominates a bounded shortlist; windows and final region paths are scored with the full appearance model and usage-weighted CIEDE2000 on the original grouped colors. Fully scored assignments are reused when their physical context is unchanged, avoiding repeated broad searches during reconciliation. The current order remains available during reconciliation, and calibrated preview colors and the 0.25 minimum predicted gain gate are retained. Head count, search depth, color grouping, and the mode toggle persist through fallback builds and retain edits made during analysis; Multi-head and Flat Paint are mutually exclusive. Worker errors, unusable or non-improving plans, and plans whose predicted usage-weighted mean CIEDE2000 gain over the normal stack is below 0.25 retain the normal single-head model, with a notice and its original start color and swaps. Instructions follow the built snapshot, and before the first multi-head build **Copy** gives the same build prompt the panel shows, not single-head swaps; fallback builds copy their single-head plan. Image changes cancel pending analysis and discard obsolete builds. Controls, notices, schedules, copied text, and usage guides are localized into all 12 languages. Added region/filament routing, head/extruder, pause, smoothing/topology, fallback, predicted gain, async lifecycle, worker failure, browser settings-persistence, and 3MF-only download menu regression coverage. Color-group regressions cover capped palettes crossing physical layer boundaries, and calibrated image measurements use final-stack surfaces with CIEDE2000. Added full-model shortlist, proof-anchor, weighted reconciliation, seeded corrected multi-window routing, and bounded-evaluation regressions plus reproducible measured-profile cats/Rocco benchmarks. Head Schedule regressions cover unused loads, active-layer head coverage, shared-block dithering, cropped-pixel scheduling, swap counts, copied instructions, and physical 3MF output. +- **Awards page and Snapmaker Innovation Fund winner badge** - A new Awards page shows Kromacut's Snapmaker Innovation Fund Winner medal, linked to the Snapmaker Innovation Fund page. It is available in all 12 languages, prerendered for search engines, and listed in the sitemap. The website footer and the Settings links open it; the desktop app opens it in the system browser. The website and the README each gain an Awards section near the bottom. The badges embed Snapmaker's official logo files unaltered. Pages show PNG renders of the badges so Safari and other WebKit views draw the lettering at the right weight. Added route, static-page, Settings-link, and landing browser coverage. Privacy and Terms browser tests cover all eight footer links, and the Privacy suite checks keyboard focus through Awards. ### Changed - **Auto-paint scoring (#103)** - Reuse the winning CIEDE2000 error and precompute unchanged chroma, uncertainty, and segment values while preserving all target colors, arithmetic, tie breaking, and final stacks. The fixed-seed benchmark records a modest 6.1% reduction in median scoring time at 142,066 targets, with mixed results on smaller palettes; large repeated searches remain expensive. No target approximation or HD/TD storage or rounding change is involved. +- **Image decoding (#140, #141, #153)** - Imported images are decoded once: the decode that checks an import also supplies the 2D preview, image colors, and build-warning dimensions, and Stack Matrix draws the validated photo with its existing color sampling instead of decoding it again. Edits and Undo/Redo share one decoded snapshot instead of loading the same image separately for each consumer, and Manual 3D geometry, Auto-paint analysis, and Palette Proof image targets read those same pixels. Imported color-profiled images, including translucent and 8-/16-bit Display P3 files, keep their pixel values, swatches, and chosen color order through Undo/Redo, and closely spaced profiled colors stay consistent with the layers that are built and exported. Decoded bitmaps are released once their pixels are copied. While an image is still loading after Undo/Redo, Build waits for it and edits and downloads cannot use the previous image; image panels keep their size and show updating feedback. Large images show their size before color scanning finishes, and a localized checking indicator appears only when checking takes longer than 150 ms. Added browser regressions for one-decode imports, shared edit and history decodes, obsolete loads, bitmap cleanup, delayed import feedback, Display P3 import/history fidelity, chosen layer-order preservation, profiled 3D layers and watertight 3MF regions, shared Auto-paint and Palette Proof pixels without additional decodes, builds disabled during pending history loads, and EXIF-rotated Stack Matrix photos. ### Fixed - **Exporting during a rebuild** - Downloading an STL or 3MF, or using **Open in Slicer**, in the moment after **Build** is clicked could export the previous build's mesh with the new build's settings. For example, a routed multi-head model rebuilt as single-head could export the old head assignments without their swap pause. The old model is no longer offered for export once a new build starts. The 3D download menu stays disabled until the build finishes, and the preview actions behind the build overlay can no longer be reached by keyboard or screen reader. Added a browser regression that holds a multi-head to single-head rebuild open and checks that the keyboard cannot reach the export controls, and that the finished export matches the new build. - **Concurrent 2D edits (#163)** - Quantize and dedither now block competing image edits, imports and undo/redo until they finish, and stale asynchronous results (resize, crop, bake, swatch apply, imports) are discarded once the image or processing state changes. An open text draft is kept if processing produces no output. Brush, eraser and text edits not yet saved to history when processing starts are rolled back instead of staying on the canvas without an undo step, and a pending slider adjustment (from the keyboard or a just-released drag) is committed as soon as focus moves to another control instead of being refused by processing that starts on the same click. Playwright regressions cover each race. +- **Touch-up history (#153)** - Cropping right after a brush, eraser, or text touch-up keeps the visible edit instead of cropping the image from before it. Undo restores each of several rapid touch-ups even when their saves finish before the preview redraws. A touch-up that cannot be saved to history returns the preview to the latest saved edit, cancels later unsaved strokes, and lets new strokes be saved. Added browser regressions for cropping live touch-ups, batched saves, and failed saves. - **First color height stability** - Preserve the first-layer offset when image changes recompute swatches, so valid color heights do not drift by a layer when the first-layer height is not a multiple of the normal layer height. Keep user-selected color order and heights when resizing adds or removes colors, keep the order chosen by the height reset, apply a First Layer Height change made without an image when the image returns, and keep other colors on normal layer increments. Added repeated-reconciliation, swap-plan and browser history, reset and no-image regression tests. - **Oversized image imports** - Choosing or dropping an image beyond a conservative canvas budget now shows a localized error that names the image size and keeps the current image, undo history, and swatches. iPhone and iPad, including desktop browsing mode, use a lower pixel budget for compatibility with older Safari versions; the resize advice follows that budget. Thin panoramas beyond 32767 pixels still load when the browser supports their dimensions. Browsers with lower dimension limits are checked without allocating a full-size test canvas. Images remain importable when browser fingerprinting protection adds small amounts of canvas noise. The Loading Images and Troubleshooting guides explain recovery. Added unit coverage for dimension and area budgets, plus browser regressions for file-picker and drag-drop area rejection, iPhone/iPad limits, silent and throwing canvas failures, privacy noise on working and blank canvases, and valid panoramas. -- **Unreadable image imports** - Choosing or dropping a file that cannot be decoded as an image, including a truncated or partly damaged one, now shows a localized error in the 2D preview instead of failing silently or loading only part of the image. Truncated PNG, JPEG, and WebP files are detected from their file structure, so the macOS and Linux desktop apps, whose WebView otherwise decodes them partially, catch them too. The current image, its undo history, and its swatches are kept; previously the broken file replaced the current image in history. Image files that the platform reports without a file type are recognized by their extension. Non-image files use the same dismissible notice instead of a browser alert, and it closes when the image changes, including the next successful import, undo, edits, or removing the image. New imports are refused while quantize or dedither is running, so a finishing result cannot silently discard a newly chosen file. Stack Matrix photos go through the same check: a truncated or unreadable photo now reports that it could not be opened and keeps the photo already loaded, instead of loading only part of it. Raster imports now reuse their validation decode for the 2D preview, image colors, and build-warning dimensions, then release it. Edits and undo/redo share one decoded snapshot instead of loading the same URL separately for each consumer. Imported profiled images keep their pixel values, swatches, and chosen color order through Undo/Redo. Manual 3D geometry, Auto-paint analysis, and Palette Proof image targets read these same pixels, keeping closely spaced profiled colors consistent with the layers that are built and exported. Build waits until the current image pixels are ready. History retains the encoded file behind each import URL and repeats its original decoder settings, then releases every decoded bitmap after copying its pixels; encoded-file references are dropped when their URLs leave history. When an image is still loading after Undo/Redo, edits and downloads can no longer use the previous image. Cropping immediately after a touch-up preserves the visible edit. Undo restores intermediate rapid touch-ups correctly even when several saves finish before the preview renders. Image panels keep their size and show updating feedback while edits load. If a touch-up cannot be saved to history, the preview returns to the latest saved edit, cancels later unsaved strokes, and permits new strokes to be saved. Large images show their size before color scanning finishes, and a localized checking indicator appears only when validation lasts longer than 150 ms. Stack Matrix continues drawing the validated photo with its existing color sampling. The Loading Images and Calibration Workflows guides describe this behavior. Added browser regression coverage for corrupt, truncated, and non-image files, for imports with no current image or no file type, for the notice closing after undo and redo, for drops during quantize, for one-decode imports through the preview and image colors, shared edit and history decodes, obsolete loads, bitmap cleanup, delayed import feedback, translucent and opaque 8-/16-bit Display P3 import/history fidelity, chosen layer-order preservation, close-color 8-/16-bit profiled 3D layers and watertight 3MF regions, shared Auto-paint and Palette Proof pixels without additional decodes, disabled builds during pending history loads, cancelled imported-file bitmap cleanup, and truncated, corrupt, and EXIF-rotated Stack Matrix photos, plus unit coverage for truncation detection and image file validation. +- **Unreadable image imports** - Choosing or dropping a file that cannot be decoded as an image, including a truncated or partly damaged one, now shows a localized error in the 2D preview instead of failing silently or loading only part of the image. Truncated PNG, JPEG, and WebP files are detected from their file structure, so the macOS and Linux desktop apps, whose WebView otherwise decodes them partially, catch them too. The current image, its undo history, and its swatches are kept; previously the broken file replaced the current image in history. Image files that the platform reports without a file type are recognized by their extension. Non-image files use the same dismissible notice instead of a browser alert, and it closes when the image changes, including the next successful import, undo, edits, or removing the image. New imports are refused while quantize or dedither is running, so a finishing result cannot silently discard a newly chosen file. Stack Matrix photos go through the same check: a truncated or unreadable photo now reports that it could not be opened and keeps the photo already loaded, instead of loading only part of it. The Loading Images and Calibration Workflows guides describe this behavior. Added browser regression coverage for corrupt, truncated, and non-image files, for imports with no current image or no file type, for the notice closing after undo and redo, for drops during quantize, and for truncated and corrupt Stack Matrix photos, plus unit coverage for truncation detection and image file validation. - **3D camera inside the model** - The 3D preview camera now stops at the model's surface instead of moving inside it, where the view went empty or clipped. Zooming in Perspective, panning in either projection, and zooming in Orthographic before switching back to Perspective all keep the camera just outside the model's bounding box, so flat prints can still be inspected up close. Close-ups also reduce an enlarged near clipping plane after an Orthographic zoom-out and projection switch, keeping nearby surfaces visible. Rebuilding a model now frames it the same way in Perspective and Orthographic view; Orthographic previously framed it about 15% tighter. The 3D guide describes the camera limits. Added framing, keep-out, orthographic-panning, near-clipping, and projection-switch regression coverage. - **3D camera zoom when switching projections** - Returning from Orthographic to Perspective now keeps the zoom level set in Orthographic view, instead of jumping back to the distance the camera had before the switch. The camera keeps its viewing direction and target, and the visible depth range moves with it so zooming out does not clip the model or make stacked layers flicker. Rebuilding while in Orthographic view now frames the new model even after zooming. Added projection round-trip regression coverage. - **Relief layer keyboard controls** - Arrow keys now move each Layer Preview handle by one physical print layer, including the first-layer boundary, without adding a rounding sliver at the top of taller models. Home/End and larger keyboard steps respect the selected range. Pointer positioning remains proportional to height. Added physical-boundary regression coverage and browser coverage for both handles, exact ten-layer moves, and rebuild recovery. - **Reloading image files** - Choosing the same source image again reloads its original pixels after crop, resize, or other edits, instead of silently retaining the edited image. Added a browser regression for same-path reloads after resizing. -- **Desktop palette exports** - Save `.kpal` palettes through the native Save As dialog instead of WebView browser downloads, preserving browser downloads and surfacing write failures without changing saved palettes. Retry partial writes and treat stalled writes as failures with localized feedback. Desktop saves write to a temporary file beside the chosen one and replace it only after the whole file is written, so a failed overwrite of an existing palette, profile, image, or model leaves the old file intact and removes the temporary file. Added cancellation, error, partial-write, overwrite-failure, and export-content regressions plus native replace/discard tests; recovery checks exclude automatic feedback dismissal. +- **Desktop palette exports** - Save `.kpal` palettes through the native Save As dialog instead of WebView browser downloads, preserving browser downloads and surfacing write failures without changing saved palettes. Retry partial writes and treat stalled writes as failures with localized feedback; this applies to every desktop export saved through **Save As**, including images, models, profiles, and calibration files. Desktop saves write to a temporary file beside the chosen one and replace it only after the whole file is written, so a failed overwrite of an existing palette, profile, image, or model leaves the old file intact and removes the temporary file. Added cancellation, error, partial-write, overwrite-failure, and export-content regressions plus native replace/discard tests; recovery checks exclude automatic feedback dismissal. +- **Diagnostics folder (desktop)** - **Open folder** for Auto-paint diagnostics in Settings now shows its error when the system cannot open the folder, instead of counting as success as soon as the launcher started. +- **Cats Exact benchmark reproducibility** - The calibrated cats Exact benchmark from v4.2.0 passes again: an audit traced its stale replay expectation to intended prediction changes before refreshing it, and its fixture check now passes on fresh checkouts on every platform. ## v4.2.0 - 2026-10-19