fix(ui): allow changing team organization from team settings - #25095
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR replaces the disabled read-only Organization ID Key changes:
The change is well-scoped and the payload logic handles all cases correctly: no change ( Confidence Score: 5/5Safe to merge; the dirty-check and null-coalescing logic are correct for all assignment/clear/no-op paths. No P0 or P1 issues were found. The payload guard correctly skips the field on idempotent saves, and ?? "" correctly triggers the backend unset path when the dropdown is cleared. All previously raised concerns in review threads have been addressed or are pre-existing UX limitations of useOrganizations scope. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/team/TeamInfo.tsx | Replaces disabled Organization ID Input with a searchable Select dropdown; adds a dirty-check guard so organization_id is only sent when it changes; logic handles all null/undefined/string transitions correctly. |
Sequence Diagram
sequenceDiagram
participant U as User (Admin)
participant UI as TeamInfo Form
participant UO as useOrganizations Hook
participant API as LiteLLM Proxy API
UO->>API: GET /organization/list
API-->>UO: [{ organization_id, organization_alias }]
UO-->>UI: userOrganizations[]
U->>UI: Click "Edit Settings"
UI->>UI: form.initialValues { organization_id: info.organization_id }
alt Select new org
U->>UI: Pick org from dropdown
UI->>UI: form value = "new-org-id"
else Clear existing org
U->>UI: Click allowClear X
UI->>UI: form value = undefined
else No change
U->>UI: Submit unchanged
UI->>UI: values.org === info.org, skip field
end
U->>UI: Submit form
UI->>UI: values.organization_id !== info.organization_id?
alt Changed
UI->>API: PATCH /team/update { organization_id: value ?? "" }
API-->>UI: Updated team
else Unchanged
UI->>API: PATCH /team/update (no organization_id field)
API-->>UI: Updated team
end
Reviews (2): Last reviewed commit: "fix(ui): only send organization_id when ..." | Re-trigger Greptile
20077fe
into
litellm_ryan-march-31
…rg-teams fix(ui): allow changing team organization from team settings
Summary
Screenshots
Test plan