fix(web): self-loops survive the drop click #100

Merged
yuuhikaze merged 1 commit from fix/selfloop-click into master 2026-10-25 19:51:51 -05:00
Owner

Closes #97

  • onnodeclick in FaCanvas.svelte now ignores clicks while editor.pendingConnection is open: a self-loop drag ends with a trailing click on the source node, which previously ran selectState() → clearSelection() and wiped the pending q0 → q0 transition editor before it could be used.
  • Pending connections are still committed with ADD or dismissed via DISCARD / pane click, so nothing is lost.
  • Cross-node drops are unaffected (their trailing click lands on the nodes layer), and plain state selection still works when no connection is pending.
  • TerminalEdge.svelte already renders the self-loop arc; no rendering changes needed.

Verified with playwright (dev server :5176): self-loop drag opens NEW TRANSITION q0 → q0, typing a + Enter commits a labeled self-loop arc on q0, a two-state drag still opens NEW TRANSITION q0 → q1, and clicking a state body still selects it. bun run check clean, 82 tests pass.

Closes #97 - `onnodeclick` in `FaCanvas.svelte` now ignores clicks while `editor.pendingConnection` is open: a self-loop drag ends with a trailing click on the source node, which previously ran `selectState()` → `clearSelection()` and wiped the pending `q0 → q0` transition editor before it could be used. - Pending connections are still committed with ADD or dismissed via DISCARD / pane click, so nothing is lost. - Cross-node drops are unaffected (their trailing click lands on the nodes layer), and plain state selection still works when no connection is pending. - `TerminalEdge.svelte` already renders the self-loop arc; no rendering changes needed. Verified with playwright (dev server :5176): self-loop drag opens `NEW TRANSITION q0 → q0`, typing `a` + Enter commits a labeled self-loop arc on q0, a two-state drag still opens `NEW TRANSITION q0 → q1`, and clicking a state body still selects it. `bun run check` clean, 82 tests pass.
fix(web): self-loops survive the drop click
All checks were successful
ci / web (pull_request) Successful in 1m39s
ci / rust (pull_request) Successful in 4m39s
ci / image (oven/bun:1.4.2-debian=docker-image://git.yhkze.net/actions/bun:1.4.2-debian node:22-bookworm-slim=docker-image://git.yhkze.net/actions/node:22-bookworm-slim , web, web.Dockerfile, rgxr-web) (pull_request) Has been skipped
ci / image (rust:1-slim-bookworm=docker-image://git.yhkze.net/actions/rust:1-slim-bookworm debian:bookworm-slim=docker-image://git.yhkze.net/actions/debian:bookworm-slim , ., api.Dockerfile, rgxr-api) (pull_request) Has been skipped
c7583ee0b2
Finishing a self-loop drag ends with a trailing click event on the
source node itself, which onnodeclick turned into selectState() and
cleared the pending connection before the editor could open (issue
#97). Node clicks are now ignored while a pending connection is open;
the pending editor is committed with ADD or dismissed via DISCARD /
pane click. Cross-node drops and plain state selection are unchanged.

Closes #97
yuuhikaze merged commit ccbf36fb39 into master 2026-10-25 19:51:51 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
k8s-services/rgxr!100
No description provided.