Skip to content

Promote auto-zoom to production: configurable intensity, sensitivity, and dead zone#1646

Open
bytemines wants to merge 7 commits intoCapSoftware:mainfrom
bytemines:feat/auto-zoom-production
Open

Promote auto-zoom to production: configurable intensity, sensitivity, and dead zone#1646
bytemines wants to merge 7 commits intoCapSoftware:mainfrom
bytemines:feat/auto-zoom-production

Conversation

@bytemines
Copy link

@bytemines bytemines commented Mar 5, 2026

newshowcase.mp4
Auto-zoom toggle Auto-zoom editor controls

Context

Auto-zoom has existed since PR #558 (Aug 2025) and was refined in
#1090 and #1106, but it remained experimental and hard to discover.
Users have been asking for it (issues #352, #758) — some citing it
as the reason they'd switch from Screen Studio or FocuSee to Cap.

The feature was gated behind:

  • custom_cursor_capture2 experimental setting (must enable first)
  • DEV-only context menu (generate button hidden in production)
  • No user-facing controls for zoom amount or sensitivity

This PR makes auto-zoom accessible, configurable, and production-ready.

Changes

Recording setup

  • Add "Auto Zoom" toggle in Studio Mode recording controls
  • Remove the toggle from experimental settings (moved to main UI)
  • Increase main window height to fit the new control

Editor

  • Remove DEV guard from "Generate zoom segments from clicks" context menu
  • Remove custom_cursor_capture2 gate from Auto zoom mode tab
  • Add Auto Zoom section in sidebar with Generate/Remove buttons
  • Add zoom intensity slider (1.0–3.0x, was hardcoded 1.5x)
  • Add sensitivity slider (0.0–1.0, controls how many segments are generated)
  • Add "Remove all zoom segments" to zoom track context menu
  • Clear zoom selection state when removing all segments
  • Centralize zoom actions in shared projectActions

Zoom algorithm

  • Remove movement-based zoom triggering — zoom now triggers only on clicks, matching industry standard (Screen Studio, ScreenArc, FocuSee)
  • Cursor movement still drives the focal point during active zoom segments
  • Filter cursor events to trimmed time ranges when generating zoom segments
  • Remap event timestamps from recording-time to timeline-time for trimmed videos
  • Guard against zero/NaN timescale in remap math
  • Validate input parameters (clamp zoom amount, sensitivity)

Rendering

  • Add dead_zone_radius to ScreenMovementSpring (default 0.03)
  • Suppress micro-jitter in spring focus interpolation during zoom playback
  • Use squared distance comparison instead of sqrt in hot loop
  • Old project files without this field load correctly via serde defaults

Backend

  • Add auto_zoom_amount and auto_zoom_sensitivity to GeneralSettingsStore
  • Pass configurable settings through to segment generation algorithm
  • Sensitivity scales click grouping thresholds
  • Avoid unnecessary clone of project config when reading timeline segments

What we did NOT change

  • Rendering pipeline (spring physics, viewport interpolation)
  • Cursor capture pipeline (custom_cursor_capture2 still experimental)
  • ZoomSegment struct, ZoomMode enum

Closes #758

… and dead zone

Add "Auto Zoom" toggle to Studio Mode recording setup, replacing
the experimental settings toggle. Add zoom intensity and sensitivity
sliders in the editor sidebar with generate/remove controls. Add
dead zone radius to spring focus interpolation to suppress viewport
jitter. Increase main window height to fit the new control.
…t fix

- Propagate GeneralSettingsStore::get errors instead of swallowing them
- Clamp base_zoom_amount and sensitivity before threshold math
- Compare squared distance instead of computing sqrt every sample
- Fix dead_zone_zero test to verify actual cursor tracking behavior
- Use Self::default_dead_zone_radius() in Default impl instead of hardcoded 0.03
- Change cursor-default to cursor-pointer on auto-zoom toggle button
Auto-zoom now triggers exclusively on click events, matching
the industry standard (Screen Studio, ScreenArc, FocuSee).
Cursor movement data is still used to determine zoom focal
point during active segments, but no longer independently
creates zoom intervals.
Auto-zoom now filters cursor events to trimmed time ranges and
remaps timestamps to timeline-time before generating segments.
Previously it used the full raw recording duration and all events.
- Guard against zero/NaN/negative timescale in remap logic
- Borrow project_config instead of cloning
- Clear zoom selection when removing all zoom segments
@0xFloyd
Copy link

0xFloyd commented Mar 6, 2026

anything blocking this from being merged? @richiemcilroy happy to do whatever to push this over the line

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.

Status of auto zoom?

2 participants