Skip to content

chore: glue "Returns" to siblings#8934

Open
avivkeller wants to merge 1 commit into
mainfrom
signature-glue
Open

chore: glue "Returns" to siblings#8934
avivkeller wants to merge 1 commit into
mainfrom
signature-glue

Conversation

@avivkeller
Copy link
Copy Markdown
Member

@avivkeller avivkeller commented Jun 1, 2026

image

Copilot AI review requested due to automatic review settings June 1, 2026 19:03
@avivkeller avivkeller requested a review from a team as a code owner June 1, 2026 19:03
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

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

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Jun 1, 2026 7:04pm

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Jun 1, 2026

PR Summary

Low Risk
Presentation-only changes to Signature/FunctionSignature with no auth, data, or API impact; main risk is minor doc UI regressions if container detection (!name && !type) misclassifies edge cases.

Overview
Returns rows in function signatures now render in the same grouped Signature container as parameters instead of being split into a separate block, so CSS can treat them as a footer attached to the items above.

New SignatureItem styles apply to top-level kind="return" items (not nested under .children): full-bleed negative horizontal/bottom margins, flat top corners, and a top divider. FunctionSignature drops the loop that partitioned items into attributes vs returns and always maps all items under one titled Signature.

Signature now treats missing name and type as the grouping root (optional title), replacing the previous title-only branch. SignatureRoot only renders the title heading and wires aria-labelledby when a title is present.

Reviewed by Cursor Bugbot for commit bc10063. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.29%. Comparing base (c582f6e) to head (bc10063).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ 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>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

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) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bc10063. Configure here.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 FunctionSignature to always render a single Signature group containing all items (including returns).
  • Update SignatureRoot to conditionally render the title element and only set aria-labelledby when title exists.
  • Add CSS to style a top-level return item as a full-bleed footer attached to preceding items, and adjust Signature to treat “root vs item” based on name/type rather than title.

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) {
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