fix: CodeRabbit round 2 — scope the insecure-HTTP probe flag + accessible toggle row#22
fix: CodeRabbit round 2 — scope the insecure-HTTP probe flag + accessible toggle row#22fabiodalez-dev wants to merge 1 commit into
Conversation
…ible toggle row - AuthRepository.discover(): pendingAllowInsecureHttp was set but never reset. Since the NetworkModule OkHttp client is a shared singleton, a toggle-on discovery that failed or was abandoned left cleartext allowed for EVERY later request for the rest of the process (and concurrent discover() calls could race on the shared flag). Wrap the probe in try/finally and always reset the flag; commitInstance() still persists the real per-instance flag on a successful connect. - OnboardingScreen: make the whole "Allow insecure HTTP" row toggleable (Modifier.toggleable with Role.Switch, Switch onCheckedChange = null) so a screen reader announces the label with the state and the touch target is the full row. Verified: compileDebugKotlin + testDebugUnitTest pass.
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. 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, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Two CodeRabbit findings from the #21 review I had missed.
pendingAllowInsecureHttpnever reset (Major) —AuthRepository.discover()set the transient flag but never cleared it. TheNetworkModuleOkHttp client is a shared singleton, so a toggle-on discovery that failed or was abandoned left cleartext permitted for every later request for the rest of the process, and concurrentdiscover()calls could race on the shared flag. Now wrapped intry/finallythat always resets it;commitInstance()still persists the real per-instance flag on a successful connect.Modifier.toggleable,Role.Switch,Switch onCheckedChange = null) so a screen reader announces the label together with the on/off state and the whole row is the touch target.Verified:
compileDebugKotlin+testDebugUnitTestpass.