Skip to content

fix(workflow): stop the coloured knob leaving a barb at each shoulder tip - #6632

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/handle-svg-cleanup
Aug 12, 2026
Merged

fix(workflow): stop the coloured knob leaving a barb at each shoulder tip#6632
waleedlatif1 merged 1 commit into
stagingfrom
fix/handle-svg-cleanup

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • The connection knob is a recolour of one stretch of the card outline, so its path has to be the outline's own path. It wasn't: the span was cut at the point the bulge falls under the visibility threshold — not one of the points the silhouette sampled — so the knob sat on a grid of its own, and a span clamped its end control points to the bare perimeter tangent while the silhouette derives every control point from the samples either side of it.
  • The knob was left flat where the silhouette had already begun its descent, and the uncovered sliver of dark stroke read as a small spur poking off the shoulder. Clearest on the Error output's outer shoulder, against the card's bottom-right corner.
  • Measure the span against the interval the silhouette resamples the bulge over instead of in whole pixels, and sample a step wide on each side before trimming back so every emitted segment has the neighbours the silhouette had.
  • Painted footprint is unchanged — the knob starts and ends within 0.2px of where it did.

Type of Change

  • Bug fix

Testing

Dumped the real painted path from a mounted WorkflowBlockBorder and rendered it at 175x, before and after — the spur is gone from both shoulders and the shape is otherwise identical.

Two tests pin the invariant that every coloured knob's bezier commands appear verbatim in the silhouette. Both fail on the unfixed code. The second covers merged resample intervals and an odd tab length, where measuring the span in whole pixels would still have landed half a step off.

Known limit, unchanged by this PR: a knob is painted from its own bulge alone while the silhouette takes the max over all of them, so two bulges tall enough to overlap genuinely part company. No port layout the editor builds puts them that close.

Not yet checked on a running canvas — only in the extracted path render.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

… tip

The connection knob is a recolour of one stretch of the card outline, so its
path has to be the outline's own path. Two things pulled it off:

Its span was cut at the exact point the bulge falls under the visibility
threshold, which is not one of the points the silhouette sampled — so the knob
sat on a grid of its own. And a span clamped its first and last control points
to the bare perimeter tangent, where the silhouette derives every control point
from the samples either side of it, so those two segments bowed differently
from the curve they were painted over. The knob was left still flat where the
silhouette had already begun its descent, and the uncovered sliver of dark
stroke read as a small spur poking off the shoulder. It is clearest on the
Error output's outer shoulder, against the card's bottom-right corner.

Measure the span against the interval the silhouette resamples the bulge over
rather than in whole pixels, and sample a step wide on each side before
trimming back, so every emitted segment has the neighbours the silhouette had.
The knob's commands now come out identical to the silhouette's, which the tests
pin — including for merged intervals and odd tab lengths, where measuring in
whole pixels would still have landed half a step off. The painted footprint is
unchanged.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 12, 2026 6:32pm

Request Review

@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped to workflow block border SVG geometry and mount tests; visual alignment fix with sub-pixel footprint intent and no auth or data changes.

Overview
Fixes a visual defect where coloured connection knobs showed a dark barb at each shoulder because their SVG path was not the same curve as the card outline they recolour.

visibleBulgeHalf now snaps knob span limits to the silhouette’s resample grid (via shared bulgeIntervalHalf), instead of cutting at the mathematical visibility crossing on a different grid. buildSpanPath samples one step beyond each end of the span and trims so Bézier segments match the outline command-for-command, rather than clamping end controls to bare perimeter tangents.

Mount tests add expectKnobsOnSilhouette, asserting every knob’s cubic commands appear verbatim in the main silhouette path—including crowded ports with merged resample intervals.

Reviewed by Cursor Bugbot for commit d43332c. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns colored connection-knob paths with the workflow-block silhouette’s sampling grid and control points, preventing dark stroke remnants at knob shoulders.

  • Centralizes the bulge resampling interval calculation.
  • Builds knob spans with neighboring samples before trimming to matching silhouette commands.
  • Adds tests for ordinary and merged resampling intervals.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/workflow-renderer/src/workflow-block/workflow-block-border.tsx Updates bulge-boundary quantization and span construction so colored knob Bézier segments match the underlying silhouette.
packages/workflow-renderer/src/workflow-block/workflow-block-border-mount.test.tsx Adds regression coverage asserting that knob Bézier commands occur verbatim in the silhouette across normal and merged intervals.

Reviews (2): Last reviewed commit: "fix(workflow): stop the coloured knob le..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 merged commit 7022e2e into staging Aug 12, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/handle-svg-cleanup branch August 12, 2026 18:38
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.

1 participant