Skip to content

Restore connection highlighting in runs - #2977

Merged
Mbeaulne merged 4 commits into
MB/properties-title-spacingfrom
MB/run-connection-highlighting
Nov 2, 2026
Merged

Mbeaulne merged 4 commits into
MB/properties-title-spacingfrom
MB/run-connection-highlighting

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Intent

Help people follow a connection to its source while inspecting a run.

Current behavior

In Run View v2, clicking a connection or a task handle leaves the connection gray. Pipeline input and output handles do not select their connections, and their cards do not show the editor’s connection highlight.

What changes

Clicking a connection or a connected task, input, or output handle highlights the connection and its endpoints in purple. Other connections fade, and clicking empty canvas clears the highlight. When zoomed out, each shared task handle highlights the connections for all ports on that side, including when an unconnected port overlaps a connected one. Run handles remain available for inspection without starting new connections; adding, reconnecting, and deleting connections remain disabled.

The change reuses the existing handle selection hook and the editor’s node highlight presentation. This PR is stacked on #2975.

How to test

Prerequisite: open Run View v2 for a run whose pipeline has a pipeline input connected to a task and a task output connected to a pipeline output.

  1. Click a connection. It should turn purple, both endpoint cards should have a purple outline, and the other connections should fade.
  2. Click the task’s input handle, its output handle, the pipeline input handle, and the pipeline output handle in turn. Each should highlight its corresponding connection and endpoints.
  3. Click empty canvas. The purple highlight and fading should clear. Click another handle; only its connections should be highlighted.
  4. Zoom out until the simplified cards appear. Repeat the handle clicks and confirm their connections still highlight.
  5. Try dragging from a run handle and pressing Delete with a connection selected. No new connection should start or disappear, and the pipeline should remain unchanged.
  6. Open the pipeline in the editor. Confirm handle/edge highlighting still works, and that connections can still be created while editing in the detailed view.

Related Issue and Pull requests

Depends on #2975. Base: MB/properties-title-spacing.

Type of Change

  • Bug fix

Line Breakdown

Category Added Removed
Production code 170 76
Tests 197 0
Total 367 76

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Connection and handle highlights were visually checked in a local browser preview.

Test Instructions

Actual verification at 7221999af:

  • Browser: direct edge clicks, task input/output handles, pipeline input/output handles, and blank-canvas clearing passed. Simplified task and output handles also passed, including an unconnected port overlapping a connected port. Run connection drag/delete attempts left the graph unchanged. Editor input/edge highlighting and detailed handle connectability were checked on a sample pipeline.
  • Full Vitest suite: 479 files passed; 5,194 tests passed, with 2 existing todo tests.
  • ESLint, Knip, and formatting checks for changed files passed.
  • CI passed on this commit: full tests, browser tests, typechecking, linting, formatting, Knip, security analysis, and the extension checks.
  • Local typechecking is blocked by five existing errors from the installed Tangent SDK: missing RemoteResourceInput and remote resource methods in unrelated files. No dependency or generated files were changed. CI typechecking passed with the locked dependencies on this commit.

Additional Comments

Run editing restrictions are preserved. Staging verification has not been performed.

@Mbeaulne
Mbeaulne requested a review from a team as a code owner November 2, 2026 19:05
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: MB/run-connection-highlighting/7ed23fb

@Mbeaulne
Mbeaulne added this pull request to stack #2976 November 2, 2026 19:08

@maxy-shpfy maxy-shpfy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM.

@camielvs camielvs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

works well

<div
className={effect?.className}
style={
effect?.opacity !== undefined ? { opacity: effect.opacity } : undefined

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can this be part of classname via cn?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The opacity comes in as a number from the overlay settings (callers pass e.g. opacity: 0.3), so Tailwind can't turn it into a class at runtime. This is the same inline style the wrapper used in TaskNode.tsx before; I only moved it into a shared file. Switching to classes would mean changing the overlay settings to take something like className: "opacity-30". Happy to do that as a follow-up if you'd like.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

that was an AI bot. I will clean it up now

@Mbeaulne
Mbeaulne enabled stacked auto-merge (squash) November 2, 2026 21:55
Mbeaulne and others added 4 commits November 2, 2026 17:29
Clicking handles in a run could leave edges faded after the highlight was
cleared: the handle click replaced every edge with React Flow's display copy,
overlay styles included, and the run canvas kept that as its edge state. The
click now sends select changes, only for edges whose selection flips.

Turning a highlight on or off also remounted the node card, because the effect
wrapper rendered a bare child without an effect and a div with one. A collapsed
task's expanded inputs closed again. The wrapper now always renders its div.

On a collapsed task with hidden outputs, the outputs section toggled in the
capture phase, so its output handles never got their own click. It now toggles
on bubble, like the inputs section.

Handles force pointer events only when they can't connect. On a connectable
handle that override defeated React Flow's rule that lets a drag pass through
handles it can't end on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Overlays now dim cards by passing a Tailwind class such as "opacity-30"
through className, so the card wrapper no longer needs an inline style.
Connections keep their numeric opacity, which is applied to the line's
style.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stacked auto-merge was automatically disabled November 2, 2026 22:34

Pull Request is not mergeable

@Mbeaulne
Mbeaulne force-pushed the MB/run-connection-highlighting branch from 7ea11a6 to 7ed23fb Compare November 2, 2026 22:49
@Mbeaulne
Mbeaulne enabled stacked auto-merge (squash) November 2, 2026 22:52
@Mbeaulne
Mbeaulne merged commit 5276fcb into master Nov 2, 2026
18 checks passed
@Mbeaulne
Mbeaulne deleted the MB/run-connection-highlighting branch November 2, 2026 22:57
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.

3 participants