Skip to content

recording: drag_tools (grab and drag the handles)#14

Merged
borisbat merged 1 commit into
masterfrom
bbatkin/drag-tools-recording
Jun 7, 2026
Merged

recording: drag_tools (grab and drag the handles)#14
borisbat merged 1 commit into
masterfrom
bbatkin/drag-tools-recording

Conversation

@borisbat

@borisbat borisbat commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Sixth tutorial recording. drag_tools carries three drag tools — a draggable point, a vertical threshold line, and a rectangle region — and the interaction it teaches is the grab-and-drag: press on a handle and move it, and its bound value updates live every frame. Driven beat by beat with real synthetic input, each beat self-verifying that the gesture changed the bound payload field (drag_through_voicerecord_check_changed), so a missed grab or a frozen handle aborts at teardown.

The region gets two beats, because DragRect has two modes (caught in review):

  • body — grab near the center to move the whole rectangle (all four bounds travel together). Targets the bbox center.
  • corner — grab a corner to resize it (only that corner moves). Targets the bbox's bottom-right corner (z,w) directly, since a center press would only move it again.

Files

  • tests/integration/record_drag_tools.das — the voiced driver (intro + point + line + rect-move + rect-resize), each a real grab from the handle's registered screen bbox.
  • doc/source/tutorials/drag_tools.rst.. video:: drag_tools.mp4 + a Walkthrough section spelling out the move-vs-resize modes.
  • doc/source/_static/tutorials/drag_tools.mp4 — the recording (1.18 MB, 53.3 s, 1436 frames, 0 dropped, Emma voice + −16 dB bed).

Verification

  • ok:true, 1436 frames, 0 dropped; all five self-verification gates passed (bbox-exists + point x + line value + rect-move x_min + rect-resize x_max all changed).
  • Eyeballed across all five beats: the resize moves only the dragged corner while the opposite corner stays put.

The headless guard is the existing test_drag_tools.das.

🤖 Generated with Claude Code

Sixth tutorial recording. drag_tools carries three drag tools - a draggable point, a
vertical threshold line, and a rectangle region - and the interaction it teaches is the
grab-and-drag: press on a handle and move it, and its bound value updates live every
frame. Driven beat by beat with REAL synthetic input, each beat self-verifying that the
gesture changed the bound payload field (drag_through_voice -> record_check_changed), so
a missed grab or a frozen handle aborts at teardown.

The region gets TWO beats, because DragRect has two modes (caught in review): grab the
body near the center to MOVE the whole rectangle (all four bounds travel together), or
grab a CORNER to RESIZE it (only that corner moves). The body beat targets the bbox
center; the resize beat targets the bbox's bottom-right corner (z,w) directly, since a
center press would only move it again.

- tests/integration/record_drag_tools.das: the voiced driver (intro + point + line +
  rect-move + rect-resize), each a real grab from the handle's registered screen bbox.
- doc/source/tutorials/drag_tools.rst: + .. video:: drag_tools.mp4 and a Walkthrough
  section spelling out the rect's move-vs-resize modes.
- doc/source/_static/tutorials/drag_tools.mp4: the recording (1.18 MB, 53.3s, 1436
  frames, 0 dropped, Emma voice + -16 dB bed).

The headless guard is the existing test_drag_tools.das.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the sixth narrated tutorial walkthrough for drag tools by introducing a new integration recording driver that performs real synthetic grab-and-drag interactions (point, threshold line, and rect move/resize) with per-beat self-verification, and documents the walkthrough with an embedded video.

Changes:

  • Added a new integration recording driver that drags the point, threshold line, ROI body (move), and ROI corner (resize) while asserting the bound payload fields change.
  • Extended the drag_tools tutorial page with a “Walkthrough” section and embedded drag_tools.mp4.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/integration/record_drag_tools.das New voiced, self-verifying synthetic-input recording for the drag_tools tutorial (point/line/rect move+resize).
doc/source/tutorials/drag_tools.rst Adds a Walkthrough section with an embedded tutorial video and a short interaction description.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +75 to +77
var sr2 = snapshot(app)
let bb = find_widget(sr2, roi)?["bbox"]
let crn = (bb?["z"] ?? 0.0f, bb?["w"] ?? 0.0f)
@borisbat borisbat merged commit 2281143 into master Jun 7, 2026
6 checks passed
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.

2 participants