Skip to content

recording: node-editor tutorial sweep — voiced, self-verifying, with data-flow pulses#26

Merged
borisbat merged 4 commits into
masterfrom
bbatkin/node-editor-first-graph-tutorial
Jun 4, 2026
Merged

recording: node-editor tutorial sweep — voiced, self-verifying, with data-flow pulses#26
borisbat merged 4 commits into
masterfrom
bbatkin/node-editor-first-graph-tutorial

Conversation

@borisbat

@borisbat borisbat commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Brings the node-editor tutorials onto the same voiced / self-verifying bar as the dasImgui set. Each recording is also its own regression test: every interaction is asserted (record_check_rendered / record_check_value), and a no-op aborts the recording at teardown — no silent duds. Tutorials that involve a link close with (or open on) a flow() pulse, using the data-flow animation as the "highlight" device.

Landing one tutorial at a time, each eyeball-approved before commit.

Included so far

  1. first_graph — guided 6-beat tour of the four constructs (node_editor / node / pin / link); every construct asserted rendered; closes by pulsing the link.
  2. connect_by_drag — the signature gesture; a real synthetic pin-drag MUST commit the link (replacing the old soft "the drag did not land" fallback); closes with a flow pulse.
  3. create_by_drag — drag from a pin into empty canvas; the drag MUST open the create menu, and the menu pick MUST spawn the node + commit the auto-link; closes by pulsing the editor-made wire.
  4. delete_and_select — an A→B→C chain; pulses both links to show it is live, then a real click MUST select B and a real Delete key MUST remove B and cascade both links on its pins.
  5. context_menus — pulses the A→B link, then each right-click MUST open the matching menu; the node menu's Delete node MUST remove A + cascade its link, and the background menu's Node MUST spawn a node at the click point.

(Remaining: groups, clipboard, styling, navigation.)

New rail

ne_flow(s, link_id, backward = false) in imgui_editor_playwright.das — wraps the flow_cmd live command, matching the other ne_* helpers. Categorized under the Actions group in node_editor2rst.das so it passes the uncategorized-gate.

Per-tutorial cleanups

  • Captions decoupled from voice (terse ASCII on screen, natural spoken line drives TTS + dwell).
  • Dropped manual set_user_control toggles (with_node_editor_recording_app owns it) and stray print() debug lines.
  • Each tutorial RST gains a recording note; flow() documented in first_graph.
  • .gitignore: cover the voiceover / music / ffmpeg recording intermediates (only *.apng was covered before).

Notes

Recorded against dasImgui with borisbat/dasImgui#159 (user-control cursor-position bleed) and #160 (prepare_recording --asset-root) applied. The .apng / wavs / manifest / sidecar are gitignored intermediates; only the .mp4 is tracked.

🤖 Generated with Claude Code

Bring the first node-editor tutorial onto the recording bar: voiced (terse
caption decoupled from natural voice), self-verifying (every construct asserted
rendered via record_check_rendered; ok=true, dropped=0), and it does what it
teaches by closing with a real flow_cmd pulse along the link.

- record_first_graph.das: rewritten from narration-only to the voiced/verifying
  model; 6 beats touring node_editor / node / pin / link, closing with a
  continuous data-flow pulse (re-pulsed across the voice dwell so the link
  stays lit, not a one-second blip).
- imgui_editor_playwright.das: add ne_flow(s, link_id, backward) rail wrapping
  the flow_cmd live command, matching the other ne_* helpers.
- first_graph.rst: recording note + flow() documentation.
- first_graph.mp4: fresh voiced recording (51s, 6 voiceovers, -16dB bed).
- .gitignore: cover the voiceover / music / ffmpeg recording intermediates.

Recorded against dasImgui with borisbat/dasImgui#159 (user-control cursor bleed)
and #160 (prepare_recording --asset-root) applied.

Co-Authored-By: Claude Opus 4.8 <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

Updates the first_graph tutorial recording driver to match the newer “voiced + self-verifying” recording style used elsewhere in the repo, and adds a Playwright helper to trigger node-editor link flow pulses.

Changes:

  • Reworks record_first_graph.das into a 6-beat voiced walkthrough with record_check_rendered assertions and a closing link flow pulse loop.
  • Adds ne_flow(...) to imgui_editor_playwright.das as a wrapper over the existing flow_cmd live command.
  • Updates the tutorial docs and .gitignore to reflect the new recording artifacts/workflow.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

File Description
tests/integration/record_first_graph.das Converts the recording driver to voiced + self-verifying beats and demonstrates link flow pulsing.
doc/source/tutorials/first_graph.rst Documents the new voiced/self-verifying recording behavior and adds flow() explanation.
daslib/imgui_editor_playwright.das Adds ne_flow helper wrapping flow_cmd for reuse across recordings/tests.
.gitignore Ignores additional recording intermediates (voiceover/music/ffmpeg sidecars).

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

borisbat and others added 2 commits June 3, 2026 22:42
ne_flow was added to imgui_editor_playwright in the first_graph commit but
never categorized, so the generated imgui_editor_playwright.rst carried an
"Uncategorized" section and the doc gate failed the build. Add it to the
"Actions" group regex alongside the other ne_* action helpers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…pulse

Second tutorial of the node-editor recording sweep. The legacy driver pointed
at the gesture with a soft if/else fallback ("the drag did not land"); now:

- Voiced — 3 beats (setup / hero drag / committed link), terse ASCII captions
  decoupled from natural voice lines, paced by the wav durations.
- Self-verifying — the real synthetic pin-drag MUST commit the link or the
  recording aborts at teardown (record_check_rendered on link_100, replacing
  the soft fallback). dropped=0, ok=true.
- Does what it teaches — closes by pulsing the new link with flow(), re-pulsed
  across the voice dwell so it stays lit.

The committing drag timeline is verbatim from test_connect_drag (press on the
output pin, travel held, release on the input pin). connect_by_drag.rst gains
the recording note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@borisbat borisbat changed the title recording: first_graph voiced + self-verifying, with a data-flow pulse recording: node-editor sweep — first_graph + connect_by_drag (voiced, self-verifying, flow pulse) Jun 4, 2026
@borisbat borisbat requested a review from Copilot June 4, 2026 05:43

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

Copilot reviewed 6 out of 9 changed files in this pull request and generated 1 comment.

Comment on lines +65 to +67
def public ne_flow(s : EditorSession; link_id : int; backward : bool = false) : JsonValue? {
return post_command(s.app, "flow_cmd", JV((editor = s.handle, id = link_id, backward = backward)))
}
…ulse

Third tutorial of the node-editor recording sweep. The legacy driver narrated
with a single string as both caption and voice, toggled set_user_control by
hand, printed debug lines, and ended on a soft if/else fallback ("the create
did not land"). Now:

- Voiced - 4 beats (setup / drag-to-empty -> menu / pick -> spawn+wire / flow),
  terse ASCII captions decoupled from natural voice lines, paced by the wavs.
- Self-verifying - the drag MUST open the create menu (verifies it landed in
  empty canvas) and the menu pick MUST spawn node_200 + commit the auto-link
  link_100, or the recording aborts at teardown. dropped=0, ok=true.
- Does what it teaches - real synthetic pin-drag into empty canvas, real menu
  click, real enqueue_new_link auto-wire, then a flow pulse on the new link.

Dropped the manual set_user_control (with_node_editor_recording_app owns it) and
the stray prints; switched to ne_open so the flow pulse can run. create_by_drag.rst
gains the recording note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@borisbat borisbat changed the title recording: node-editor sweep — first_graph + connect_by_drag (voiced, self-verifying, flow pulse) recording: node-editor tutorial sweep — voiced, self-verifying, with data-flow pulses Jun 4, 2026
@borisbat borisbat requested a review from Copilot June 4, 2026 05:55

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

Copilot reviewed 8 out of 12 changed files in this pull request and generated 2 comments.

Comment on lines +43 to +46
let c_node1 = widget_center(snap, T_NODE1)
let c_pin11 = widget_center(snap, T_PIN11)
let c_pin21 = widget_center(snap, T_PIN21)
let c_link = widget_center(snap, T_LINK)
Comment on lines +41 to +42
let out_c = widget_center(snap, T_OUT)
let in_c = widget_center(snap, T_IN)
@borisbat borisbat merged commit 2837604 into master Jun 4, 2026
6 checks passed
@borisbat borisbat requested a review from Copilot June 4, 2026 06:07

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

Copilot reviewed 8 out of 12 changed files in this pull request and generated 3 comments.

Comment on lines +65 to +67
def public ne_flow(s : EditorSession; link_id : int; backward : bool = false) : JsonValue? {
return post_command(s.app, "flow_cmd", JV((editor = s.handle, id = link_id, backward = backward)))
}
Comment on lines +66 to +69
``flow(ctx, link_id)`` fires a one-shot data-flow pulse along a link — a marker
that travels the edge and fades over ``style.FlowDuration``. The walkthrough
re-pulses it so the link visibly carries data; from a live host it is the
``flow`` command (``ne_flow`` in the playwright helpers).
Comment on lines +11 to +15
//! Driver: record connect_by_drag.apng - the signature gesture, voiced and
//! self-verifying. A REAL synthetic pin-drag (press on the output pin, travel
//! across, release on the input pin) commits a link; the recording asserts the
//! link committed (a no-op aborts at teardown) and pulses it to show data flow.
//! The headless regression for the same gesture is test_connect_drag.das.

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

Copilot reviewed 8 out of 12 changed files in this pull request and generated 1 comment.

Comment on lines +11 to 15
//! Driver: record first_graph.apng - a guided, self-verifying tour of the four
//! node-editor constructs (node_editor / node / pin / link), closing with a
//! data-flow pulse along the link. Voiced (terse caption + natural voice); every
//! construct is asserted rendered, so a missing one aborts the recording at teardown.

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