chore: glue "Returns" to siblings#8934
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview New SignatureItem styles apply to top-level Signature now treats missing name and type as the grouping root (optional title), replacing the previous Reviewed by Cursor Bugbot for commit bc10063. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8934 +/- ##
==========================================
+ Coverage 73.24% 73.29% +0.05%
==========================================
Files 102 102
Lines 8640 8640
Branches 316 315 -1
==========================================
+ Hits 6328 6333 +5
+ Misses 2311 2306 -5
Partials 1 1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bc10063. Configure here.
| const FunctionSignature: FC<FunctionSignatureProps> = ({ title, items }) => ( | ||
| <Signature title={title}> | ||
| {items.map((param, i) => renderSignature(param, i))} | ||
| </Signature> |
There was a problem hiding this comment.
Empty signature renders bordered box
Medium Severity
When FunctionSignature is called with no title and an empty items array, it still renders a Signature wrapper, which produces an empty bordered container. Previously an empty list rendered nothing.
Reviewed by Cursor Bugbot for commit bc10063. Configure here.
| if (title) { | ||
| // A Signature without its own name or type is the grouping container, with | ||
| // an optional title. Everything else renders as an individual item. | ||
| if (!name && !type) { |
There was a problem hiding this comment.
Missing name and type misroutes
Medium Severity
Routing entries with neither name nor type to SignatureRoot drops description, kind, and optional, and nests a full section inside the list. FunctionSignature items used to always render as SignatureItem because they never carried title.
Reviewed by Cursor Bugbot for commit bc10063. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR refactors the signature rendering components so that “Returns” entries can be rendered inline with other signature items (enabling the new “full-bleed footer” styling), and improves the SignatureRoot markup so it only wires up aria-labelledby (and renders a title element) when a title is actually present.
Changes:
- Simplify
FunctionSignatureto always render a singleSignaturegroup containing all items (including returns). - Update
SignatureRootto conditionally render the title element and only setaria-labelledbywhentitleexists. - Add CSS to style a top-level return item as a full-bleed footer attached to preceding items, and adjust
Signatureto treat “root vs item” based onname/typerather thantitle.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/ui-components/src/Containers/FunctionSignature/index.tsx | Simplifies rendering to a single Signature wrapper for all items. |
| packages/ui-components/src/Common/Signature/SignatureRoot/index.tsx | Makes title and aria-labelledby conditional on title being present. |
| packages/ui-components/src/Common/Signature/SignatureItem/index.module.css | Adds styling to visually “attach” top-level return items to preceding items. |
| packages/ui-components/src/Common/Signature/index.tsx | Changes root-vs-item decision logic to be based on name/type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (title) { | ||
| // A Signature without its own name or type is the grouping container, with | ||
| // an optional title. Everything else renders as an individual item. | ||
| if (!name && !type) { |


Uh oh!
There was an error while loading. Please reload this page.