Skip to content

fix: CodeRabbit round 2 — scope the insecure-HTTP probe flag + accessible toggle row#22

Open
fabiodalez-dev wants to merge 1 commit into
mainfrom
fix/coderabbit-round2
Open

fix: CodeRabbit round 2 — scope the insecure-HTTP probe flag + accessible toggle row#22
fabiodalez-dev wants to merge 1 commit into
mainfrom
fix/coderabbit-round2

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

Two CodeRabbit findings from the #21 review I had missed.

  • pendingAllowInsecureHttp never reset (Major)AuthRepository.discover() set the transient flag but never cleared it. The NetworkModule OkHttp 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 concurrent discover() calls could race on the shared flag. Now wrapped in try/finally that always resets it; commitInstance() still persists the real per-instance flag on a successful connect.
  • Accessible toggle row (Trivial) — moved the toggle interaction to the parent Row (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 + testDebugUnitTest pass.

…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.
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@fabiodalez-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b2e11a2-c38c-44fb-8ace-18ee8041f41d

📥 Commits

Reviewing files that changed from the base of the PR and between a9f9187 and 4125f74.

📒 Files selected for processing (2)
  • app/src/main/java/com/pinakes/app/data/repository/AuthRepository.kt
  • app/src/main/java/com/pinakes/app/ui/screens/onboarding/OnboardingScreen.kt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/coderabbit-round2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant