Session UX: tray-controlled recording, no per-shot window hiding
Template tests / tests (push) Failing after 24s

Users couldn't click into the app mid-session: every automatic capture
hid the window for the shot, so it vanished under the cursor. Under
WSLg minimize() is a no-op and isFocused() sticks true, so neither can
be used for control.

- Sessions now hide the window once at start and show a red tray icon
  with Capture now / Pause-Resume / Open StepForge (auto-pauses) /
  Finish; finishing or quitting restores/cleans up properly
- Opening the app from the tray pauses capture; resuming tucks the
  window away again
- Automatic captures skip while the cursor is over a visible StepForge
  window (cursor-based, not focus-based, due to WSLg sticky focus)
- Per-shot latency reduced: with the window already hidden the 350 ms
  hide-repaint wait is skipped entirely
- OS notification announces the session; self-tests updated and green

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Iisyourdad
2026-06-10 22:51:01 -05:00
parent 52fd516a5d
commit 25bca7c3de
4 changed files with 134 additions and 4 deletions
+3 -3
View File
@@ -189,11 +189,11 @@ class StepForgeApp {
this.updateCaptureState(state);
const hotkey = this.state.settings?.capture?.hotkeyCapture;
if (state.clickCapture) {
toast('Capture session started — every click outside StepForge grabs a step.');
toast('Recording — every click grabs a step. StepForge tucks away; use the red tray icon to pause or finish.');
} else if (state.intervalSec > 0) {
toast(`Capture session started — auto-capturing every ${state.intervalSec}s (use the REC bar to pause or change).`);
toast(`Recording — a step every ${state.intervalSec}s. StepForge tucks away; use the red tray icon to pause or finish.`);
} else {
toast(hotkey ? `Capture session started — press ${hotkey} or use Shoot in the REC bar.` : 'Capture session started.');
toast(hotkey ? `Recording — press ${hotkey} to grab steps. Use the red tray icon to pause or finish.` : 'Capture session started.');
}
}