Capture the screen slightly before each click; record milestone in CHANGELOG
Template tests / tests (push) Successful in 1m58s
Template tests / tests (pull_request) Successful in 1m47s

Real-world recording now saves every click with exact markers; the only
remaining nit was screenshots feeling a touch late. Add a configurable
click-lead (capture.clickLeadMs, default 120ms) that targets the screen
just before the hook timestamp, and tighten the stream sampling cadence to
50ms so a frame near that target always exists. Verified end to end: frames
now land ~120-160ms before the click (was 25-57ms), markers stay at 0.00%
offset, and the 8-click burst still saves all 8.

Also document the milestone in docs/CHANGELOG.md and remove an accidental
paste of Gitea commit-page text from it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Iisyourdad
2026-06-12 08:12:13 -05:00
parent 951bba7a21
commit 5b89b5c927
4 changed files with 61 additions and 7 deletions
+6 -1
View File
@@ -27,7 +27,12 @@ const DEFAULT_SETTINGS = {
// desktop media stream). Falls back to the in-process loop when false
// or when streams cannot start on this desktop.
streamCapture: true,
frameSampleMs: 100, // stream backend sampling cadence
frameSampleMs: 50, // stream backend sampling cadence (finer = fresher frames)
// Target the screen this many ms *before* each click. The hook fires on
// button-down but the UI/cursor often start reacting within a frame, and
// stream pixels lag slightly; a small lead keeps the saved screenshot
// clear of the click's onset. Raise it if screenshots still feel late.
clickLeadMs: 120,
},
editor: {
focusedViewDefaultForNewSteps: false,