fix(platform): seed enterprise sso form select/switch with defined defaults (#2095)#2099
fix(platform): seed enterprise sso form select/switch with defined defaults (#2095)#2099larryro wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 33 minutes and 5 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Desk Review — READY TO MERGE ✅Reviewed the full implementation on branch CIAll checks green for head Tests
Correctness & completeness
EleganceThe Non-blocking observation (pre-existing, out of scope)
Verdict: READY TO MERGE. |
Desk Review — #2095 (uncontrolled→controlled warnings on Enterprise SSO form)Verdict: READY TO MERGE. Reviewed branch CIAll required checks green ( TestsRan the project's own UI suite for the changed file: The new regression test (
Findings
The fix fully resolves the reported issue (all 5 warnings eliminated) with no blocking issues found. READY TO MERGE. |
Summary
Fixes #2095 — the Enterprise SSO settings form logged five React/Radix
uncontrolled→controlledwarnings on load.While the parent config query is loading, the seeded
dataisundefined, so eachController'sfield.valueisundefined. The RadixSelectandSwitchcontrols therefore mounted uncontrolled, then flipped to controlled once the config hydrated — Radix'suseControllableStateemits aconsole.warnon that transition (2 Selects + 3 Switches = 5 warnings).Fix
Provide a defined fallback at each render point so the controls are controlled from the first render:
protocol,defaultRole):value={field.value ?? ''}pkce,autoRole,autoTeam):checked={field.value ?? false}editor.isLoading(which drives the disabled/loading state) still derives fromdata === undefined, so the loading behaviour is unchanged — only the per-field control values gain a defined default.Test
Added a regression test that mounts the form with
config={undefined}, resolves it, and asserts nouncontrolled→controlledwarning is logged (spying onconsole.warn, which is where Radix reports it). Verified it fails without the fix and passes with it.Verification
vitest --project client(form test file): 9 passedoxlint --type-aware: 0 warnings, 0 errorstsc --noEmit: clean