perf(react): reduce SVG path precision - #6839
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 0965452. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR reduces numeric precision in static SVG geometry to decrease icon markup size while preserving component APIs and rendering structure.
Confidence Score: 5/5The PR appears safe to merge because the SVG precision reductions preserve valid geometry and existing component contracts. The changes are limited to static numeric SVG data; command structures, fills, view boxes, exports, and runtime behavior remain intact, with no concrete observable failure identified.
|
| Filename | Overview |
|---|---|
| apps/docs/app/api/og/route.tsx | Rounds the Sim wordmark’s path coordinates without changing the OG image route behavior or SVG structure. |
| apps/docs/components/icons.tsx | Reduces precision across static icon geometry; paths remain valid and no actionable rendering regression was identified. |
| apps/sim/components/icons.tsx | Mirrors the docs icon precision reductions without changing exported component contracts. |
| packages/emcn/src/icons/bubble-chat-delay.tsx | Rounds static path coordinates while preserving the icon component API and SVG command structure. |
| packages/emcn/src/icons/download.tsx | Rounds static path coordinates with no identified functional or rendering defect. |
| packages/emcn/src/icons/duplicate.tsx | Rounds static path coordinates with no identified functional or rendering defect. |
| packages/emcn/src/icons/mic.tsx | Rounds static path coordinates with no identified functional or rendering defect. |
| packages/emcn/src/icons/upload.tsx | Rounds static path coordinates with no identified functional or rendering defect. |
Reviews (1): Last reviewed commit: "perf(react): reduce SVG path precision" | Re-trigger Greptile
Summary
SVG assets now use two-decimal coordinates where extra precision is not visible. This reduces shipped source size while preserving rendered geometry, and React Doctor's SVG precision warnings fall from 8 to 0.
This is stack PR 1 of 3. It is followed by #6840 for stable list keys and #6841 for module-scope constants.
The Circleback pattern keeps its exact
1/280image scale because rounding that structural value to zero would hide the image.Type of Change
Testing
npx react-doctor@latest --verbose: 3,532 findings;rendering-svg-precisionis 0@sim/app,@sim/emcn, anddocsChecklist
Screenshots/Videos
Not applicable. This PR changes numeric precision without an intended visual change.
Post-Deploy Monitoring & Validation