Skip to content

FE-1702: Add experimental automatic arc connections - #9677

Merged
kube merged 5 commits into
codex/fe-1708-petriconfrom
codex/fe-1409-automatic-arc-connections
Sep 15, 2026
Merged

kube merged 5 commits into
codex/fe-1708-petriconfrom
codex/fe-1409-automatic-arc-connections

Conversation

@kube

@kube kube commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Important

Experimental
Adds the Automatic arc connections feature flag in Viewport Settings.

Summary

Arcs attach to place and transition outlines, following the direction between nodes. Hovering a node reveals one outgoing handle; dragging it onto a valid target creates the arc.

The setting is off by default and saved per user. Turning it off restores the previous arc style and fixed handles.

automatic-arc-connections.mp4

Links

Blocked by

Changes

  • Curves meet circles, capsules, and square transition outlines; reciprocal arcs use separate curves
  • Whole-node drop targets support pointer, keyboard, and touch creation, with Escape cancellation
  • Diagonal connections and target highlights match the square corners of both transition styles
  • Weight labels, read and inhibitor markers, and existing subnet port arcs retain their behavior
  • New subnet connections use the existing mode with the experiment off
  • The user guide, Storybook examples, and patch changeset cover the experiment

Known issues

  • Routing follows the endpoint shapes; an arc can cross an intervening node
  • Screenshots pending for Drawing a net › Automatic arc connections and Visual settings › Automatic arc connections; both captures are prepared

Test coverage

  • Geometry tests cover circle and rounded-corner intersections, reciprocal arcs, labels, and coincident nodes
  • Settings tests cover the default and persistence; renderer tests cover switching modes, moving nodes, subnet fallback, and diagonal endpoints at square transition corners in both node styles
  • On 15 September, browser checks passed for whole-node drag creation, reciprocal connections, node movement, keyboard creation, undo, and Escape cancellation
  • The 20-second demo was recorded from the production build of 19e5292c79; its four check frames were inspected, and the recording reported no console or page errors
  • Petrinaut and website builds, unit tests, type checks, and lint passed locally on 19e5292c79 (20 tasks). Both PR commits remain patch-equivalent after the final rebase to 92ac5993d1; formatting and diff checks passed on that head
  • Final CI completed with 47 successful checks and no failures; review threads are resolved
  • Real-input drops at far edges and corners passed for classic and compact targets, alongside keyboard creation, Escape, and empty-canvas cancellation

How to test

  1. Open Viewport Settings and enable Automatic arc connections
  2. Hover a place or transition, then drag its handle onto the opposite node type
  3. Connect the same pair in reverse and move either node
  4. Focus an outgoing handle with Tab, press Enter, then focus a target and press Space
  5. Drop onto empty space or a subnet, or press Escape during a connection
  6. Switch the experiment off and check that fixed handles and the previous arc style return

@kube kube self-assigned this Sep 11, 2026
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Sep 15, 2026 4:14pm UTC
petrinaut Ready Ready Preview Sep 15, 2026 4:14pm UTC
petrinaut-docs Ready Ready Preview Sep 15, 2026 4:14pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 15, 2026 4:14pm UTC

Request Review

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team area/apps > hash.design Affects the `hash.design` design site (app) labels Sep 11, 2026
@kube
kube force-pushed the codex/fe-1409-automatic-arc-connections branch from 329268f to 3510b40 Compare September 11, 2026 23:46
@kube
kube added this pull request to stack #9688 September 12, 2026 01:27
@kube kube changed the title FE-1409: Add experimental automatic arc connections FE-1702: Add experimental automatic arc connections Sep 13, 2026
@kube
kube removed this pull request from stack #9688 September 13, 2026 22:49
@kube
kube changed the base branch from main to claude/fe-1635-default-nodes-compact-styling September 13, 2026 22:51
@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) type/eng > backend Owned by the @backend team area/tests New or updated tests area/apps type/legal Owned by the @legal team labels Sep 13, 2026
@kube
kube force-pushed the codex/fe-1409-automatic-arc-connections branch from 3510b40 to f23d6bb Compare September 13, 2026 22:52
@github-actions github-actions Bot removed area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) labels Sep 13, 2026
@kube
kube removed this pull request from stack #9733 September 15, 2026 14:48
@kube
kube added this pull request to stack #9740 September 15, 2026 14:48
@kube
kube marked this pull request as ready for review September 15, 2026 15:59
@kube
kube force-pushed the codex/fe-1409-automatic-arc-connections branch from f23d6bb to eb3d50e Compare September 15, 2026 16:00
@kube
kube requested a review from CiaranMn September 15, 2026 16:00
@cursor

cursor Bot commented Sep 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches core canvas connection and arc rendering paths in React Flow; behavior is gated behind an experimental default-off setting, but bugs could affect arc creation or layout for users who enable it.

Overview
Adds an off-by-default experimental Automatic arc connections setting in Viewport Settings, persisted as enableAutomaticArcConnections alongside existing arc style preferences.

When enabled, place and transition nodes use a shared NodeHandles layer: fixed side handles are replaced by a hover-only outgoing handle and whole-node drop targets (pointer, keyboard, touch), with Escape cancelling in-progress connections on the React Flow canvas. New arcs are limited to ordinary place↔transition links (not subnet port handles); Arcs rendering is disabled while the experiment is on.

Arc geometry is computed in outline-arcs: endpoints attach to circle/capsule/rectangle outlines, curves update when nodes move, and reciprocal pairs get separated lanes. Existing arcs render via optional outlinePath on edge data; the drag preview uses OutlineConnectionLine. User docs, a changeset, Storybook stories, and unit tests cover settings persistence, outline math, and renderer toggling.

Reviewed by Cursor Bugbot for commit 92ac599. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 92ac599. Configure here.

@kube
kube added this pull request to the merge queue Sep 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Sep 15, 2026
@kube
kube added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit dc002f2 Sep 15, 2026
67 checks passed
Base automatically changed from claude/fe-1635-default-nodes-compact-styling to codex/fe-1708-petricon September 15, 2026 18:20
@kube
kube deleted the codex/fe-1409-automatic-arc-connections branch September 15, 2026 18:20
@hash-release hash-release Bot mentioned this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants