From 0c0d557deb02f9727b519ae3757cd9e9740fa731 Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Sat, 10 Oct 2026 17:37:56 +0200 Subject: [PATCH] Note that every graph snaps from the start (#391) - Behaviors: the magnet is on by default in every graph tab. - Architecture: SnapToggle and GRAPH_SNAPS_AT_FIRST. - Development: the harness switches the magnets off on every load, and 1966 editor checks. Co-Authored-By: Claude Opus 5.5 --- Architecture.md | 2 +- Behaviors.md | 2 +- Development.md | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Architecture.md b/Architecture.md index 0ecac66..4bd5011 100644 --- a/Architecture.md +++ b/Architecture.md @@ -373,7 +373,7 @@ src/editor/graph/ GraphEditor (header, breadcrumb), GraphCanvas and what it the edges); graphView (zoom limits, grid, panAndZoom — shared with NodeBoard and the Tile tab's TileCanvas — and `inView`, which nodes are in the picture, #292), EdgeLayer (curves and fold marks), graphMenus, NodeView (and a face instead of the rows, a widget between the inputs and the outputs, #380: `nodeFace.ts`) + portRow (how an input and an output share one row, #306), NodePalette + paletteEntries (which also ranks a search), folding (hidden links, collapsed nodes), Breadcrumb + trail (the path into nested behaviors), beads (the run's pulses and the clock that launches them), AnnotationView + annotationDrag (groups and comments: what a drag carries, each thing moved once), - SnapToggle (the magnet every tab that snaps carries, the vector art tab included, #194) + SnapToggle (the magnet every tab that snaps carries, the vector art tab included, #194; lit at first in the graph tabs, `GRAPH_SNAPS_AT_FIRST`, #391) src/editor/container/ ContainerEditor (header), ContainerCanvas (a SceneViewport on a template) src/editor/texture/ SheetCanvas (the shell of the Texture, Pixel art and Vector art canvases: ground, clip, hint, a middle or Shift drag that pans, wheel zoom, Fit and the view each document keeps, and the dashed nine-slice and sort lines of a drawing, #308), TextureEditor (header), TextureCanvas (picture + frames), SliceDialog (a FormDialog), GenerateCollisionDialog (#161: the rows, and a summary that traces while the numbers change; the texture library hands it the sheet's pixels), sheetView (the grid maths), ImagePicker + imageGrid (the "+ → Texture" dialog), checker (the transparency board) diff --git a/Behaviors.md b/Behaviors.md index 3737281..ebeed8f 100644 --- a/Behaviors.md +++ b/Behaviors.md @@ -619,7 +619,7 @@ the inspector). the box drawn around them, and a graph holding nothing but a comment would frame the empty origin; `editor/framing.ts`), and the size of the graph as "N nodes · M links". It stops zooming out at 0.125 (0.25 before #387), so a box parked far enough away can still lie outside what a fit can show. -- **Snap** (the magnet in the header, an icon toggle that stays lit while on; off by default): a drag drops each node it carries on the nearest +- **Snap** (the magnet in the header, an icon toggle that stays lit while on; **on by default in every graph tab** since #391, a curve and a vector art still start without it): a drag drops each node it carries on the nearest 24 px grid line — the same grid the background draws. It takes effect on the next drag only, so switching it on never shuffles a graph that is already laid out, and a node nobody drags never moves. Every node of a selection snaps **for itself**, so dragging a group is how you line one diff --git a/Development.md b/Development.md index c018796..6da9b16 100644 --- a/Development.md +++ b/Development.md @@ -19,7 +19,7 @@ php tests/php/accounts.test.php # the API's accoun php tests/php/snapshots.test.php # the snapshot store (#231), the same way php tests/php/releases.test.php # the release store (#266), the same way php tests/php/files.test.php # uploaded files in a folder per account (#344), the same way -node tools/seed-e2e.mjs && node tools/e2e.mjs # 1965 editor checks, screenshots in /tmp/gm-e2e-*.png +node tools/seed-e2e.mjs && node tools/e2e.mjs # 1966 editor checks, screenshots in /tmp/gm-e2e-*.png GM_STEPS=20 node tools/e2e.mjs # or 1-12, or 6,20 — a subset while working on one step ./e2e.sh start [GM_STEPS] # the same run detached, see below ./e2e.sh status # live progress, or the last run's result @@ -93,6 +93,12 @@ scene state and share the CDP driver in `tools/lib/harness.mjs` — `press`, `un `object(id)`, `world()`, `mutate(js)` and friends, so a check reads like the interaction it exercises. +**Every load starts from the same baseline.** After each `navigate()` the harness sets the zoom +transition to 0 and switches the magnet of every graph tab off (#391): the graphs snap by default, +but most checks drag a node to an exact spot. What the magnets started at stays readable through +`graphSnapAtFirst()`, and e2e 06 checks that all eight were on. A step that brings the editor up +some other way (the sign-in in e2e 45) switches them off itself with `__gm.graphSnapping(false)`. + **The suite waits for the editor, not for the clock (#93).** Every action in the harness — `click`, `doubleClick`, `wheel`, `drag`, `press`, `typeText`, `select`, `mutate`, `undo`, `redo`, `showTab` — ends in `settle()`, which waits for two *drawn* frames (~32 ms) through `__gm.afterFrames()` rather