Commit Graph
108 Commits
Author SHA1 Message Date
Tyler bb959a4bb9 Description editor: preserve newlines on export, toggle Quote, highlight active toolbar buttons
Template tests / tests (push) Successful in 1m49s
Template tests / tests (pull_request) Successful in 1m38s
- Enter now starts a new <p> (defaultParagraphSeparator) so line breaks
  in the description box show up as line breaks in HTML/Markdown/Confluence
  exports; htmlToMarkdown also handles <div>-separated paragraphs.
- Clicking Quote while already in a blockquote toggles back to a paragraph.
- Toolbar buttons (Bold, Italic, Bullet, Number, Quote) turn blue to
  reflect the formatting state at the current cursor/selection.
2026-06-13 21:08:31 -05:00
Tyler 46d12cc829 Insert markdown-style [text](url) links from the Link toolbar button
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m40s
Previously this wrapped the selection in a real <a> tag via
createLink. Now it inserts literal [text](url) markdown syntax,
using the selection as the link text or prompting for it if nothing
is selected.
2026-06-13 20:47:16 -05:00
Tyler 8e2e1f41fb Show "Make substep of…" as a hover submenu listing all steps
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
Replaces the number-entry prompt with a scrollable side panel (so
large guides don't overflow the screen) listing every eligible step;
clicking one immediately re-parents the step. Context menus now
support submenu items in general via contextMenu().
2026-06-13 20:33:29 -05:00
Tyler a58607f029 Add a "Make substep of…" option to the step context menu
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m39s
Lets a step be re-parented under another step by entering that step's
displayed number, moving it (with its own substeps) to the end of the
target's substeps and updating the numbering accordingly.
2026-06-13 20:23:31 -05:00
Tyler be88434e44 Prompt for a name and save before creating a manual snapshot
Template tests / tests (push) Successful in 1m38s
Template tests / tests (pull_request) Successful in 1m42s
Clicking Snapshot now opens a named-prompt dialog (matching the app's
modal styling) and flushes the current step/guide first, so the
snapshot reflects unsaved edits and is easy to identify later.
2026-06-13 20:07:55 -05:00
Tyler 1776089c08 Remove the guide-link panel button; Save now syncs linked archives
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
For linked guides, "Save now" now also writes back to the linked
.sfgz archive (reporting a lock conflict if another session holds it),
making the dedicated link/share button in the Guide panel redundant.
The toolbar Share button and More > Linked guide… menu still cover
one-off exports and archive management.
2026-06-13 19:50:22 -05:00
Tyler 31bdbea7b5 Replace the disabled "Local guide" label with a "Share as file" action
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
The guide panel's link button was a dead disabled control for local
guides. It now shares the guide as a .sfgz archive instead, while
linked guides keep the existing archive-management dialog.
2026-06-13 19:38:05 -05:00
Tyler 9e88991f46 Clarify the style-copy buttons' scope with a heading and richer tooltips
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
Renamed "Style → step/guide" to "This step"/"Entire guide" under a
heading naming the annotation type, with hover text spelling out that
it overwrites every matching annotation's style in that scope.
2026-06-13 19:14:30 -05:00
Tyler 014b92675d Show only relevant settings per annotation type, drop redundant delete button
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
The annotation editor always rendered every style field regardless of
type and a "Delete annotation" button duplicating Delete/Backspace.
2026-06-13 18:37:24 -05:00
TylerandClaude Sonnet 4.6 b39fe553b2 Allow Backspace to delete the selected annotation
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-13 18:24:33 -05:00
TylerandClaude Sonnet 4.6 602e70a7e1 Linearize focused-view pan to the available range and flip Pan Y
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m39s
panX/panY now represent 0..1 fractions of the pannable range rather
than absolute image positions, so the slider's full travel always
covers edge-to-edge regardless of zoom level. Pan Y is inverted so
sliding right moves the view up. Updated both the editor canvas and
core/raster.js export so they stay in sync.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-13 18:21:00 -05:00
TylerandClaude Sonnet 4.6 f23b49c0d1 Make the focused-view crop live in the editor canvas
Template tests / tests (push) Successful in 1m39s
Template tests / tests (pull_request) Successful in 1m40s
The annotation canvas now renders as a viewport into the focused-view
crop region, matching what core/raster.js produces on export. Sliders
update the canvas live; annotation data stays in full-image-normalized
coordinates and remains correctly positioned, sized, and editable.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-06-13 18:09:17 -05:00
Tyler 91495a3614 small text changes
Template tests / tests (push) Successful in 1m40s
2026-06-13 16:16:56 -05:00
Tyler ce9bd41e72 Merge branch 'fix/issue-9-block-reorder'
Template tests / tests (push) Successful in 1m45s
2026-06-13 16:01:35 -05:00
Tyler 20d69619c2 fix: preserve block editor state on save
Template tests / tests (push) Successful in 1m41s
2026-06-13 15:51:23 -05:00
Tyler 1b16531321 Issue #4: Show recording directions after capture starts
Template tests / tests (push) Successful in 1m39s
Closes #4
2026-06-13 15:37:07 -05:00
Tyler 2274544ed8 Keep block reorder in place 2026-06-13 15:29:44 -05:00
Tyler 6c2c837a83 Remove delayed capture menu item
Template tests / tests (push) Successful in 1m43s
2026-06-13 14:59:27 -05:00
Tyler 356334dd3e Rename editor back button to library
Template tests / tests (push) Successful in 1m41s
2026-06-13 14:58:52 -05:00
Tyler 8c2229633f Simplify capture status label
Template tests / tests (push) Successful in 1m40s
2026-06-13 14:57:33 -05:00
Tyler 4311225d50 Remove auto and finish capture buttons
Template tests / tests (push) Successful in 1m40s
2026-06-13 14:55:41 -05:00
Tyler c7038a151a Remove library auto-start and shoot button
Template tests / tests (push) Successful in 1m40s
2026-06-13 14:40:57 -05:00
Tyler f0611a50b5 Remove issue 4 capture toast
Template tests / tests (push) Successful in 1m40s
2026-06-13 14:35:20 -05:00
Tyler 05b7713efb Sync tests workflow with main
Template tests / tests (push) Successful in 1m45s
2026-06-13 14:31:11 -05:00
Tyler dfd0139dc5 Sync tests workflow with main
Template tests / tests (pull_request) Successful in 1m48s
2026-06-13 14:30:54 -05:00
Tyler 1a0fda71f5 Remove new-capture follow-up toast
Template tests / tests (pull_request) Has been cancelled
2026-06-13 14:25:40 -05:00
Tyler e46f01885b Prompt to start recording for library guides
Template tests / tests (push) Failing after 12m49s
Template tests / tests (pull_request) Has been cancelled
2026-06-13 14:05:10 -05:00
Tyler 85b1f6f143 Use in-app modal for recording start confirmation
Template tests / tests (push) Successful in 2m17s
2026-06-13 13:50:13 -05:00
Tyler 7196a6d95b Update .gitea/workflows/tests.yaml
Template tests / tests (push) Successful in 1m52s
2026-06-12 21:53:14 +00:00
Tyler a998a9eeda Update .gitea/workflows/tests.yaml
Template tests / tests (push) Failing after 23s
2026-06-12 21:37:58 +00:00
Iisyourdad 50fb9927ca Preserve block contents when adding blocks
Template tests / tests (push) Has been cancelled
2026-06-12 14:12:33 -05:00
Tyler 52fba1f81d Merge pull request 'Issue #5: Rename guides from the library' (#12) from tyler/fix/issue-5-library-rename into main
Template tests / tests (push) Has been cancelled
2026-06-12 19:07:45 +00:00
Iisyourdad e8f6e4cd09 Require recording acknowledgment before hide
Template tests / tests (push) Has been cancelled
2026-06-12 13:53:16 -05:00
Iisyourdad f88ff0259e Fix guide editor issues 4-10
Template tests / tests (pull_request) Has been cancelled
Template tests / tests (push) Has been cancelled
2026-06-12 11:07:57 -05:00
Tyler d966ac762d Merge pull request 'Fix/mouse click screenshot align' (#2) from fix/mouse_click_screenshot_align into main
Template tests / tests (push) Has been cancelled
Reviewed-on: Tyler/autodoc#2
2026-06-12 14:41:42 +00:00
IisyourdadandClaude Fable 5 471d5fb8ef Remove stray test.txt accidentally committed during PR testing
Template tests / tests (push) Has been cancelled
Template tests / tests (pull_request) Has been cancelled
Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-12 09:26:03 -05:00
IisyourdadandClaude Fable 5 aafed7eca7 Guard the click-capture pipeline with an automated end-to-end check
Template tests / tests (push) Successful in 2m8s
Template tests / tests (pull_request) Successful in 2m14s
Add tests/checks/test_click_capture_selftest.sh: runs the real Electron
STEPFORGE_CLICK_SELFTEST session and asserts every scenario passes — 3/3
markers at 0.00% offset, 8/8 burst clicks kept on finish, the first armed
click captured (warmup click ignored), and the debounce (4/4). Picked up
automatically by tests/run_test.sh. Skips cleanly when the host has no
capture environment so it never falsely fails CI, but fails the suite on any
real regression in click->screenshot->step behavior.

Document the guard in ARCHITECTURE.md and CHANGELOG.md.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-12 09:25:39 -05:00
IisyourdadandClaude Fable 5 f2c5831315 Fix restarted recordings dropping clicks / stopping after one click
Template tests / tests (push) Successful in 1m51s
Template tests / tests (pull_request) Successful in 1m51s
Root cause: warm-before-hide kept the window visible during backend warmup,
and on a restart that warmup could take several seconds (the stream backend
start waits up to 8s). During that visible window, clicks over the app were
skipped by the userIsInApp guard and clicks elsewhere were shot post-click,
so a restarted session looked like it stopped after one click.

- Recording is now 'armed' only after the window is hidden and the buffer is
  primed. A new warmingUp flag makes onOsClick ignore clicks during warmup
  (the window is covering the user's work anyway) instead of mishandling
  them. Cleared on pause/finish.
- armRecording caps the warmup wait (WARMUP_MAX_MS=1500): the window hides
  and the session arms even if the backend start hangs, so it can never sit
  visible for seconds dropping clicks. The backend keeps coming up in the
  background; the first click or two may take the fresh-shot fallback.
- A generation token invalidates an in-flight backend start whose session
  has since finished, so a slow start can't install into a new session or
  leave the starting-guard stuck and block the restart from starting one.

Tests: 4 new behavioral capture tests (warmup ignores clicks; pause/finish
clear it; armRecording warms-then-hides-then-arms; a hung start still arms
within the cap; a stale start is discarded and frees the guard) plus a new
end-to-end self-test scenario (warmup click ignored, first armed click
captured). 152 unit tests + all repo checks pass.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-12 09:17:59 -05:00
IisyourdadandClaude Fable 5 3d0b753205 Add a 200ms click debounce with extensive behavioral tests
Template tests / tests (push) Successful in 2m1s
Template tests / tests (pull_request) Successful in 1m50s
Per request: clicks of the same button closer together than
capture.clickDebounceMs (default 200ms) now collapse into a single step, so
accidental fast/double clicks don't each become a step. It is a leading-edge
debounce measured from the last *accepted* click, so a run of fast clicks
can't push the next deliberate click out — two clicks spaced beyond the
window (e.g. the reported 400-500ms apart) always register.

Replaces the prior 8ms duplicate-delivery suppression (subsumed by the
window). Configurable; 0 captures every click.

Tests (the point of this change is that it can't silently regress):
- 13 behavioral unit tests in capture.test.js that drive real onOsClick
  calls with controlled timestamps and assert which clicks survive — the
  reported 400/450/500ms cases, sub-window collapse, the 200ms boundary,
  per-button independence, configurability, debounce=0, last-accepted (not
  last-dropped) reference, session reset, and a full onOsClick -> queue ->
  store integration check. No keyword/comment assertions.
- A fourth end-to-end self-test scenario (burst of 40ms clicks collapses to
  1; three 300ms-apart clicks each register => 4 total). The marker/drain
  scenarios set debounce to 0 so they keep stressing the frame pipeline.

147 unit tests + all repo checks pass.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-12 09:02:51 -05:00
IisyourdadandClaude Fable 5 0ab29e4ff0 Warm the frame recorder before hiding the window at recording start
Template tests / tests (push) Successful in 1m52s
Template tests / tests (pull_request) Successful in 1m46s
The first screenshot of a session was late while every later one was fine.
Cause: on 'Start recording' the window hid first and the capture backend
started warming up after — creating worker, getUserMedia, first frame takes
~1s. A click in that gap found no buffered frame and took the post-click
fresh shot.

armRecording() now warms the recorder while the window is still visible and
only hides once frames are buffering (with a brief post-hide settle so the
first frame shows the user's screen, not the dismissed app window). Verified
end to end with a new self-test scenario that clicks 250ms after start: the
first click is now served a pre-click frame instead of a post-click shot.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-12 08:48:54 -05:00
IisyourdadandClaude Fable 5 34cc358902 Never take a post-click screenshot when a pre-click frame exists
Template tests / tests (push) Successful in 1m48s
Template tests / tests (pull_request) Successful in 1m55s
The remaining 'captured slightly after the click' reports came from the
fresh-shot fallback, which grabs the screen when the click is processed
(after it). The previous lead change made that fallback *more* likely: a
frame now had to be >=120ms before the click to qualify, so on machines
where the capture stream can't always keep a frame that old buffered, more
clicks fell through to the post-click shot.

Make the click-lead a two-tier preference instead of a hard gate in
selectFrameForClick:
1. newest frame captured at least leadMs before the click (ideal margin), else
2. newest frame captured before the click at all.
Only when no pre-click frame exists does the caller fresh-shot. leadMs is
threaded through the stream backend to the worker so both selection paths
agree. Verified end to end: frames land ~120-170ms before each click,
markers stay at 0.00%, and the 8-click burst still saves all 8.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-12 08:40:33 -05:00
IisyourdadandClaude Fable 5 5b89b5c927 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 <[email protected]>
2026-06-12 08:12:13 -05:00
IisyourdadandClaude Fable 5 951bba7a21 Fix dropped clicks and late screenshots in fast recording
Template tests / tests (push) Successful in 2m13s
Template tests / tests (pull_request) Successful in 1m48s
Root cause of 'I clicked many times but only got two screenshots':
finishing/pausing a session called backend.stop(), which cancelled every
in-flight frame request to null. Clicks whose PNG had not finished
encoding yet were then dropped — only the first few survived.

Fixes:
- Stream backend now *drains* on stop: it stops accepting new requests but
  keeps the worker alive until frames already selected for queued clicks
  finish encoding. stop({ immediate: true }) keeps the old abandon-now
  behavior for an unhealthy worker.
- Two-stage worker reply: a fast 'frame-selected' ack pins the pairing and
  proves liveness; the slow PNG payload follows. A slow encode (seconds on
  software-rendered hosts) is no longer mistaken for a dead worker, which
  had been forcing the post-click fresh-shot fallback (late screenshots).
- Queued clicks carry their guide id and are stored even if the session
  ends while they wait in the queue.
- The tray gesture that stops a session is discarded by matching its
  recorded screen position, not a time window — a fast workflow click near
  the stop is no longer collateral damage. (Replaces the earlier grace
  window, which dropped whole bursts.)
- A click on a display with no ready stream resolves null so the caller
  fresh-shots the correct monitor instead of returning another screen.
- STEPFORGE_CAPTURE_LOG=1 prints one line per click decision; the
  second-instance handler now surfaces the running window instead of
  exiting silently.
- Self-test gains a fast-burst-then-finish scenario (8/8 saved) and the
  marker/coordinate checks remain at 0.00% offset.

Tests: 133 unit + all repo checks passing.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-12 07:56:31 -05:00
IisyourdadandClaude Fable 5 5ca59805dc Make click selftest immune to real mouse input and DPI scaling
Template tests / tests (pull_request) Successful in 1m48s
Template tests / tests (push) Successful in 1m51s
- Stop the live OS click watcher during the selftest so the user's real
  clicks (toast dismissal, terminal focus) can't add extra steps and
  shift the marker comparisons.
- Inject clicks in physical pixels via dipToScreenPoint so the test
  measures correctly on scaled Windows displays.
- Guard the marker report against step-count mismatches instead of
  crashing on out-of-range indexing.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-11 22:01:37 -05:00
Iisyourdad 1a009601a1 test
Template tests / tests (push) Successful in 1m52s
Template tests / tests (pull_request) Successful in 1m54s
2026-06-11 21:43:58 -05:00
IisyourdadandClaude Fable 5 a0b69f8cc7 Rearchitect click capture: strict click-time frames, off-main-process recorder, exact marker coordinates
Template tests / tests (push) Successful in 1m50s
Implements the architecture change from ai_prompts/prompt3.md:

- New app/click-frames.js: shared timestamped frame ring + strict
  click-to-frame pairing (never a frame whose grab started after the
  click); legacy slack behavior kept behind capture.strictClickFrames=false.
- New stream capture backend (app/stream-backend.js + hidden worker
  window): per-display desktop media streams sampled into ring buffers
  and PNG-encoded entirely off the main process, so click delivery is
  never starved by capture work. Auto-degrades to the legacy in-process
  frame loop when streams cannot start or the worker stops answering.
- Clicks are paired with their frame at event time (eager pairing in
  enqueueClickCapture); only the storing is serialized, so slow encodes
  cannot skew later clicks in a fast burst.
- Linux watcher: restored event-time root coordinates from
  xinput test-xi2 and merge raw/regular twin events structurally.
- Replaced the 40ms time debounce with source-aware duplicate
  suppression: fast legitimate clicks are never dropped.
- New app/coords.js: physical-to-DIP conversion with multi-monitor and
  scale-factor handling; Windows keeps screenToDipPoint.
- STEPFORGE_CLICK_SELFTEST end-to-end hook: 3/3 clicks become steps via
  the stream backend with 0.00% marker offset on this host.
- Tests rewritten/added: strict selection, coords, stream backend,
  Linux coordinate parsing, twin merge, burst clicking (126 passing).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-11 21:33:31 -05:00
Iisyourdad c6d0e9e356 added ai prompt
Template tests / tests (push) Successful in 1m48s
2026-06-11 19:44:47 -05:00
Iisyourdad 5b7b075e91 Fixed clicking location part 5 :(
Template tests / tests (push) Successful in 1m51s
2026-06-11 18:46:56 -05:00
Iisyourdad 6682cdae0f Fixed clicking location part 4
Template tests / tests (push) Successful in 1m52s
2026-06-11 16:57:59 -05:00
Iisyourdad 27439b475d Fixed clicking location part 3
Template tests / tests (push) Successful in 1m50s
2026-06-11 16:33:52 -05:00