refactor(ui): re-pull label, textarea, separator and skeleton from the registry - #38302
Merged
yuneng-berri merged 1 commit intoAug 26, 2026
Conversation
…e registry
These four primitives still wrapped their body in React.forwardRef, which
the dashboard has not needed since it moved to React 19: a function
component receives ref as an ordinary prop and the existing {...props}
spread already hands it to the DOM node.
Re-pulling each from base-vega drops the wrapper and its displayName.
These four were picked because the ref plumbing is their only divergence
from current upstream, so the class strings, data-slot values and exports
are untouched and nothing renders differently. The other seven primitives
that still carry forwardRef have also drifted on their class strings, so
re-pulling them would ship a visual change alongside the cleanup and they
are left alone here.
Textarea is the one with real ref call sites, roughly seventeen of them
through react-hook-form's field.ref, and ref-forwarding.test.tsx did not
cover it. Add that case next to the Label, Separator and Skeleton ones
already there.
Contributor
Greptile SummaryThis PR replaces four legacy
Confidence Score: 5/5The PR appears safe to merge with ref behavior preserved and directly covered for every changed primitive. The dashboard uses React 19, each component keeps ref in its spread props, and the tests verify that all four refs resolve to their rendered DOM elements.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/ui/label.tsx | Replaces the forwardRef wrapper with a React 19-compatible function while continuing to spread the ref and other props onto the label. |
| ui/litellm-dashboard/src/components/ui/ref-forwarding.test.tsx | Adds a Textarea case to the existing DOM-ref tests without weakening the Label, Separator, or Skeleton assertions. |
| ui/litellm-dashboard/src/components/ui/separator.tsx | Converts the Base UI separator wrapper to ref-as-prop while preserving orientation, styling, attributes, and primitive props. |
| ui/litellm-dashboard/src/components/ui/skeleton.tsx | Simplifies the skeleton to a plain function component while preserving its DOM structure, classes, and prop forwarding. |
| ui/litellm-dashboard/src/components/ui/textarea.tsx | Converts Textarea to React 19 ref-as-prop semantics while preserving the textarea DOM node and react-hook-form ref contract. |
Reviews (1): Last reviewed commit: "refactor(ui): re-pull label, textarea, s..." | Re-trigger Greptile
yuneng-berri
enabled auto-merge
August 26, 2026 06:03
ryan-crabbe-berri
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
React.forwardRefref-forwarding.test.tsxnever coveredTextarea, the one with real ref call sitesHow it solves it:
displayNameTextareacase to the existing ref testUser Flow
This is a no-op refactor, so the two lists are identical by design. The primitives render the same markup and still hand their ref to the DOM node, so react-hook-form keeps focusing the right field
Before: an admin fills in a form that has a required textarea and leaves it blank
After: the same admin sees exactly the same three things
Relevant issues
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Setup: start the proxy with
python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reload, then runnpm run devinui/litellm-dashboardand sign in at http://localhost:3000Before (e300822)
Textarea keeps its ref, so a blank required field still gets focused
Label, Separator and Skeleton render unchanged
After (d2aea2d)
Textarea keeps its ref, so a blank required field still gets focused
Label, Separator and Skeleton render unchanged
Type
🧹 Refactoring
Caveats (if any)
Low
forwardRef:avatar,breadcrumb,card,chart,combobox,input,table. Each has also drifted from upstream on its class strings, so re-pulling them is a visual change and belongs in its own PRui/ui-loading-spinner.tsxhas one too, but it is not a registry item and is already slated for replacement by a much smaller local SpinnerFinal Attestation