Make capture sessions continuous: click-capture + interval auto-capture
Template tests / tests (push) Failing after 29s
Template tests / tests (push) Failing after 29s
The session previously only listened for the global hotkey, which is unreliable under WSLg/Wayland — users got one screenshot and nothing more. Sessions now layer three triggers: - click-capture via OS adapters (xinput test-xi2 on X11, PowerShell GetAsyncKeyState polling on Windows), debounced, ignoring clicks on StepForge itself - interval auto-capture (3/5/10 s) as the always-works fallback, enabled by default when click detection is unavailable - the existing global hotkey, plus a manual Shoot button The REC bar now shows live count + active trigger with Shoot / Auto / Pause / Finish. New captures and added steps are selected in the editor (explicit reload(stepId) wins over a surviving selection). Capture self-test hook (STEPFORGE_CAPTURE_SELFTEST) verifies 3x hotkey-path captures and interval capture end-to-end. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -125,8 +125,12 @@ class GuideEditor {
|
||||
this.steps = steps;
|
||||
this.stepMap = new Map(steps.map((step) => [step.stepId, step]));
|
||||
if (!this.shellMounted) this.mountShell();
|
||||
if (!this.selectedStepId || !this.stepMap.has(this.selectedStepId)) {
|
||||
this.selectedStepId = stepId && this.stepMap.has(stepId) ? stepId : (steps[0] && steps[0].stepId) || null;
|
||||
// An explicitly requested step (new capture, added step, restored
|
||||
// neighbour) wins; otherwise keep the current selection if it survived.
|
||||
if (stepId && this.stepMap.has(stepId)) {
|
||||
this.selectedStepId = stepId;
|
||||
} else if (!this.selectedStepId || !this.stepMap.has(this.selectedStepId)) {
|
||||
this.selectedStepId = (steps[0] && steps[0].stepId) || null;
|
||||
}
|
||||
this.selectedAnnotationId = null;
|
||||
this.renderAll();
|
||||
|
||||
Reference in New Issue
Block a user