Skip to content

Render lines with round joins - #229

Merged
seveibar merged 1 commit into
agent/add-line-join-reprofrom
agent/round-line-joins
Aug 12, 2026
Merged

Render lines with round joins#229
seveibar merged 1 commit into
agent/add-line-join-reprofrom
agent/round-line-joins

Conversation

@seveibar

@seveibar seveibar commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • emit stroke-linejoin="round" for lines in generated SVGs
  • use round line joins in canvas and PNG rendering paths
  • assert that every generated line polyline carries the round join
  • update the acute-polyline SVG snapshot from a pointed miter to a rounded bend

Stack

  • Base/repro: Add SVG snapshot for acute line joins #230 adds a focused toMatchSvgSnapshot fixture and captures the current pointed miter
  • This PR applies the renderer fix and contains the resulting SVG snapshot diff

Why

Exported SVG lines fell back to SVG's miter join default, even though the interactive renderer already used rounded joins. Canvas rendering likewise only configured rounded end caps. This makes line appearance consistent across renderers and avoids sharp spikes at polyline corners.

The stacked snapshot uses a thick, acute V-shaped polyline. Before accepting the new snapshot, the matcher produced a visual diff highlighting the old triangular miter beyond the new rounded bend.

Validation

  • bun test (69 passing)
  • bun run format:check
  • bun run build
  • git diff --check

@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)
graphics-debug Ready Ready Preview Aug 12, 2026 6:33pm

Request Review

@seveibar
seveibar force-pushed the agent/round-line-joins branch from 84603ca to 9416fa8 Compare August 12, 2026 18:19
@seveibar
seveibar changed the base branch from main to agent/add-line-join-repro August 12, 2026 18:19
@seveibar
seveibar force-pushed the agent/add-line-join-repro branch from 048c3cd to bcb1ff4 Compare August 12, 2026 18:33
@seveibar
seveibar force-pushed the agent/round-line-joins branch from 9416fa8 to 1c22e51 Compare August 12, 2026 18:33
@seveibar
seveibar marked this pull request as ready for review August 12, 2026 18:39
@seveibar
seveibar merged commit bde3d88 into agent/add-line-join-repro Aug 12, 2026
3 checks passed
@seveibar
seveibar deleted the agent/round-line-joins branch August 12, 2026 18:39
seveibar added a commit that referenced this pull request Aug 12, 2026
* Add line join SVG repro

* Render lines with round joins (#229)
@tscircuitbot

Copy link
Copy Markdown

Thank you for your contribution! 🎉

PR Rating: ⭐⭐
Impact: Minor

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

2 participants