Skip to content

feat(ui): redesigned interface, automatic GPU/CPU, in-app updates, macOS icon - #189

Merged
noah-peeters merged 11 commits into
masterfrom
feat/ui-redesign
Oct 30, 2026
Merged

noah-peeters merged 11 commits into
masterfrom
feat/ui-redesign

Conversation

@noah-peeters

@noah-peeters noah-peeters commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

A rebuilt interface (still PySide6 Qt Widgets, same packaging) that behaves like a current desktop app on macOS, Windows and Linux.

Layout

  • Sidebar: Frames and Results with HiDPI thumbnails. Delete/Backspace removes frames; right-click offers Remove and Show in Finder/Explorer; drop files or folders anywhere.
  • Inspector: methods are option cards with a one-line description. Alignment is one plain-language choice (Standard, Focus breathing, Shift only, Shift + rotation, Full affine, Off), and Off replaces the hidden "Stack only" menu. Advanced shows only the parameters the chosen method uses. The old panel clipped its right edge.
  • Activity bar: progress with time left, Pause/Resume and Stop. The status bar shows image info and the compute device ("GPU · Apple M4").
  • Settings window (Cmd+, / Ctrl+,): theme (match system, dark, light) and GPU.
  • Theme: follows the system appearance live. Fusion is used on every platform with the system font (it was hard-coded to Helvetica Neue). Icons are SVGs rendered at the screen's pixel density (they were 20 px bitmaps, blurry on Retina) and follow the theme.

Viewer

  • Mouse wheel zooms at the cursor; trackpad two-finger scroll pans; pinch zooms (macOS native gesture, Windows precision touchpads via Ctrl+wheel, touchscreens via QPinchGesture); Cmd/Ctrl+scroll zooms with any device.
  • Drag (mouse, pen or finger) pans. Double-click or double-tap toggles Fit/100 %, and so does a two-finger double-tap on a Mac trackpad.
  • Zoom shows the real pixel scale (100 % = 1:1; fit was shown as 100 % before). Pixels are drawn crisp above 200 %.
  • Compare is part of the viewer: a draggable before/after divider at any zoom and pan, with the before frame cropped like the result. It used to be a separate fit-only tab.
  • Arrow keys step through frames at Fit and pan when zoomed in.

Workflow

  • Actions are disabled when they can't run, instead of "load images first" error boxes.
  • Standard shortcuts: Cmd/Ctrl+A selects all (it used to start a stack), Cmd/Ctrl+W closes the window (it used to quit), Cmd/Ctrl+Q quits, Cmd/Ctrl+Return stacks, Cmd+. or Esc stops (Esc used to stop from anywhere). About, Settings and Quit sit in the macOS app menu.
  • Native file dialogs everywhere (export and batch export forced Qt's own dialog before).
  • Adding images appends (New Stack starts over), and the session's results are kept in the sidebar. Open Recent; files opened with the app or dropped on the Dock icon are added; the window layout is restored.
  • Export: one dialog for format, bit depth and quality (remembered), the native save panel, then "Show in Finder" in the status bar instead of three modal dialogs. Writes through imencode, so non-ASCII paths work on Windows.
  • Quitting with unexported results asks once, with an Export… button.
  • The Dock icon bounces / taskbar flashes when a stack finishes in the background.

Updates

  • Settings → Updates: "Automatically check for updates" (on by default, at most once a day, contacts only api.github.com), "Include pre-releases", Check Now. "Check for Updates…" is in the app menu on macOS and the Help menu elsewhere.
  • The update window shows the release notes, with Install Update, Remind Me Later and Skip This Version. Install downloads this platform's asset with progress and verifies it against the SHA-256 GitHub publishes for it (an asset without a digest is never installed automatically). It stages the update next to the installed copy, and once the app quits a helper swaps it in and relaunches: the .app from the DMG on macOS, the zip's folder on Windows, the AppImage on Linux. "Install on Quit" defers it. Copies that can't update themselves (source checkouts, read-only locations) link to the release page instead.
  • src/updater.py has no Qt dependency; tests/test_updater.py covers version ordering, release parsing, verified/tampered/cancelled downloads, a real DMG stage (macOS) and the swap-and-relaunch helper.
  • Not tested yet: a full update against a real newer release, because none exists. The first one to try it on is the release after this one.

Automatic GPU/CPU choice

  • Settings → Processing: Automatic (default), Always GPU, Always CPU. The CLI uses the same choice: no flag, --gpu, --cpu. "Use GPU" on becomes Automatic; off stays CPU.
  • src/compute.py decides per stack:
    • The CPU when no GPU works or the stack doesn't fit in GPU memory (peak use measured per method on 24 MP stacks).
    • Otherwise a one-time measurement on this computer: synthetic frames, aligned and stacked like a real stack, at 1 and 6 MP and 2 and 5 frames, with GPU and CPU run back to back. Time is modelled as setup + frames × per-frame cost (both linear in megapixels) and compared for the real size and frame count.
    • Before anything is measured: the GPU, or the CPU for frames under 1 MP.
  • The app measures in the background while idle, about 25 s per method with the method in use first. It stops when a stack starts and waits while other programs use more than 30 % of the cores. The CLI reuses the same cache and measures with --measure. The cache is keyed by GPU, driver and app version; Settings shows the results, and Measure Again forgets them.
  • The CLI prints e.g. Device: Auto: GPU · Apple M4 (measured 2.4× faster); the app shows the choice in the status bar and result info.
  • NSAppSleepDisabled: App Nap was throttling stacks, and speed tests, while the window was hidden.
  • Checked against 20 real aligned stacks on the M4 MacBook Air (24 / 6 / 2 / 0.4 MP, every method). A fast CPU and a modest GPU there means the GPU wins nearly everything, so Auto comes out as "GPU, except tiny stacks": 15 of 20 picks right, total time +9 % over the best pick per stack (always-GPU +7 %, always-CPU +112 %). The test is noisy on a busy computer, so the CPU only takes over when it is clearly (1.5×) faster, every timing is the best of two, and disturbed measurements are discarded. Two independent measurements on a heavily loaded machine (8 of 10 cores busy) now give identical picks. Auto's real value is catching a GPU that's missing, broken, short on memory or much slower, which this Mac can't show.

Fixes found along the way

  • "Rotation + Scale" off had no effect once an alignment mode was saved (_resolve_alignment_mode only reads it in auto mode). Shift only now passes translation.
  • Stacking errors failed silently (the worker's error signal wasn't connected). They are shown now.
  • RAW frames had no preview (it used cv2.imread). It uses the RAW loader now.
  • Thumbnails and the preview are loaded off the UI thread without touching QPixmap there.

macOS icon

The .icns is rebuilt on Apple's icon grid (an 824 px superellipse body on a 1024 canvas, with a shadow), so the Dock no longer masks it into a circle. The bundled app keeps that icon instead of replacing it at runtime with the edge-to-edge PNG. packaging/icons/make_macos_icon.py regenerates it from chimpstackr_icon.png.

Removed

The retouch viewer (never reachable in the UI), the old comparison tab, QActions.py, ProgressBar.py and style.py (replaced by theme.py).

Tests

tests/test_compute.py: device rules, the time model, frame count, memory limits, caching and re-measuring per driver/app version, background measuring stopped by a stack or by load, the API and the CLI flags. tests/test_gui.py (offscreen): action states, adding/removing frames, previews and thumbnails, a full stack → compare → export, cancel, zoom/pan for mouse wheel, trackpad and Ctrl+scroll, zoom anchoring, the alignment settings round trip, theme switching, and every export format (non-ASCII path).
Checked on macOS 27 / Apple M4 with a local PyInstaller build installed to /Applications: open-with a 50-frame 24 MP folder, Hybrid stack (51 s on the GPU), Pause/Resume, Compare, Export through the native save panel, the app menu (About, Settings…, Check for Updates…, Quit), and the Dock icon now shows as a rounded square. Windows and Linux use the same Qt code paths, but I haven't run them on those systems.

🤖 Generated with Claude Code

Also in this PR

  • Aligned GPU-vs-CPU tests: test_same_result_with_the_same_alignment checks GPU stacking with the CPU's transforms against the strict limits, and test_alignment_matches_cpu checks the two sets of transforms agree within 0.1 px. End-to-end aligned runs allow for the float rounding between GPU and CPU ECC, which is larger on ARM. All GPU tests pass on Apple M4.
  • The release DMG has an Applications shortcut next to the app.
  • In-app update tested end to end on macOS: a build marked v0.3.9 found v0.4.0 on GitHub, downloaded and verified the 239 MB DMG, swapped itself and relaunched as 0.4.0.

noah-peeters and others added 7 commits October 29, 2026 20:19
Layout
- Frames and Results sidebar with HiDPI thumbnails (Delete removes,
  right-click: Remove, Show in Finder/Explorer), the viewer, and an
  inspector: methods as option cards with a one-line description, one
  plain-language Alignment choice (Off = stack without aligning), Output,
  and Advanced showing only the parameters the chosen method uses.
- Activity bar for progress (time left, Pause/Resume, Stop) and a status
  bar with image info and the compute device.
- Settings window (Cmd+, / Ctrl+,): theme and GPU.
- Light and dark themes that follow the system (live) or a user choice;
  Fusion on every platform with the system font; theme-aware SVG icons
  rendered at the screen's pixel density.

Viewer
- Mouse wheel zooms at the cursor, trackpad scroll pans, pinch zooms
  (macOS native gesture, Windows precision touchpads, touchscreens),
  Ctrl/Cmd+scroll zooms; drag pans, double-click/double-tap toggles Fit
  and 100 %. Zoom is the real pixel scale; pixels are crisp above 200 %.
- Compare is part of the viewer: before/after divider at any zoom, the
  before frame cropped like the result.
- Arrow keys step through frames; drop files/folders anywhere.

Workflow
- Actions are enabled only when they can run instead of error popups;
  standard shortcuts (Cmd+A selects, Cmd+W closes, Cmd+Q quits, Cmd+Return
  stacks, Cmd+. / Esc stops) and menu roles (About, Settings, Quit in the
  macOS app menu); native file dialogs; Open Recent; files opened with the
  app or dropped on the Dock icon; window layout restored.
- Adding images appends (New Stack starts over); results of the session
  are kept; quitting with unexported results asks first.
- Export: one dialog for format, bit depth and quality (remembered), the
  native save panel, then "Show in Finder"; writes non-ASCII paths on
  Windows.
- Stacking errors are shown instead of failing silently; RAW frames
  preview; "Shift only" alignment now really runs translation-only
  (a saved alignment mode used to override the Rotation + Scale switch).

macOS icon
- The .icns is rebuilt on Apple's grid (824 px body on 1024, shadow), so
  the Dock no longer masks it into a circle; the bundled app keeps that
  icon instead of replacing it with the full-bleed PNG at runtime
  (packaging/icons/make_macos_icon.py regenerates it).

Removed the retouch viewer, which was never reachable in the UI, and the
old comparison widget. Tests: tests/test_gui.py (offscreen).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Settings → Updates: "Automatically check for updates" (on by default,
  at most once a day, only api.github.com is contacted), "Include
  pre-releases", and Check Now; "Check for Updates…" in the app menu on
  macOS and the Help menu elsewhere.
- The update window shows the release notes and offers Install Update,
  Remind Me Later or Skip This Version. Installing downloads this
  platform's release asset with progress, verifies it against the SHA-256
  GitHub publishes for it (no digest, no automatic install), stages it
  next to the installed copy, and after the app quits a helper swaps it
  in and relaunches: the .app from the DMG on macOS, the zip's folder on
  Windows, the AppImage on Linux. "Install on Quit" defers it. Copies
  that can't update themselves (source checkouts, read-only locations)
  link to the release page instead.
- About and Settings show dev builds as "0.4.0 (dev build 3578d8c)".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…popups

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…… in the macOS app menu; no duplicate Enter Full Screen; long progress titles elide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… Qt GUI libs; readable error when OpenEXR is unavailable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Processing device is now Automatic (default), Always GPU or Always CPU
(Settings → Processing; CLI: no flag, --gpu, --cpu). src/compute.py
decides per stack:
- no usable GPU, or a stack that doesn't fit in the GPU's memory (peak
  use measured per method on 24 MP stacks): CPU;
- otherwise a one-time measurement on this computer: synthetic frames,
  aligned and stacked like a real stack, at 1 and 6 MP and 2 and 5 frames
  on both devices; stack time is modelled as setup + frames * per_frame
  (linear in megapixels) and compared for the real frame size and count;
- not measured yet: GPU (small frames under 1 MP: CPU, without measuring).
The app measures in the background while idle, ~15 s per method, the
method in use first, and stops as soon as a stack starts; the CLI uses the
same cache and measures with --measure. Measurements are cached per GPU,
driver and app version (~/Library/Caches/ChimpStackr, %LOCALAPPDATA%,
~/.cache/chimpstackr); Settings shows them, Measure Again forgets them.

The status bar and result info show where a stack ran and why; the CLI
prints "Device: Auto: GPU · Apple M4 (measured 2.4× faster)". Existing
"Use GPU" on becomes Automatic, off stays CPU.

Checked against 20 real aligned stacks on an M4 MacBook Air (24/6/2/0.4 MP):
16 right picks (always-GPU: 15), total time +6 % over the best choice per
stack (always-GPU +7 %, always-CPU +112 %); the CPU really wins Pyramid and
Hybrid at 6 MP there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ns; no App Nap

A background measurement on a loaded Mac (load 14 on 10 cores, screen
locked) came out wrong (Hybrid 24 MP "16× faster", Depth Map 6 MP "CPU
faster"). Background measuring now waits while other programs use more
than 30 % of the cores (checked before and between steps; a disturbed
measurement is discarded), times GPU and CPU back to back per frame count
so drifting load hits both, and the app sets NSAppSleepDisabled so macOS
doesn't throttle stacks or measurements while its window is hidden.

Re-checked against the 20 real aligned stacks: 17 right picks (always-GPU
15), +6 % total time over the best choice per stack (always-GPU +7 %).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noah-peeters noah-peeters changed the title feat(ui): redesigned interface, in-app updates, macOS icon feat(ui): redesigned interface, automatic GPU/CPU, in-app updates, macOS icon Oct 29, 2026
noah-peeters and others added 4 commits October 29, 2026 22:17
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…with an Applications link

- Aligned GPU-vs-CPU pipeline tests failed on Apple Silicon by small
  margins: GPU and CPU each estimate their own transforms, which differ by
  float rounding (a few thousandths of a pixel per pair, more along a
  breathing chain), and sharp edges / Depth Map's per-pixel frame choice
  turn that into image differences. Now:
  - test_same_result_with_the_same_alignment: GPU stacking with the CPU's
    transforms must match as tightly as unaligned stacks;
  - test_alignment_matches_cpu: GPU and CPU breathing transforms agree
    within 0.1 px;
  - aligned end-to-end runs use limits that allow the rounding (mean 0.5,
    2 % of pixels > 2 levels; Depth Map 0.6 / 5 %; slabbed 0.5 / 0.75).
- The release DMG has an Applications shortcut next to the app.
- GUI test: the viewer stays in View mode after a stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a busy computer single timings swing a lot (two builds' background
measurements disagreed by up to 4x). Now every timing is the best of two
runs, a measurement where 5 frames come out quicker than 2 is discarded
as disturbed, and Automatic leaves the GPU only when the test finds the
CPU at least 1.5x faster (near-ties stay on the GPU), as Capture One's
and darktable's automatic modes are meant to catch clearly slower GPUs.
Two independent measurements on a heavily loaded M4 now give identical
choices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noah-peeters
noah-peeters merged commit d226ba8 into master Oct 30, 2026
8 checks passed
@noah-peeters
noah-peeters deleted the feat/ui-redesign branch October 30, 2026 08:22
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.

1 participant