Skip to content

refactor: decompose screen_reachability updateConfig nested switch - #250

Closed
youngjinjung-linq wants to merge 1 commit into
DevopsArtFactory:mainfrom
youngjinjung-linq:refactor/issue-205-reachability-update-config
Closed

refactor: decompose screen_reachability updateConfig nested switch#250
youngjinjung-linq wants to merge 1 commit into
DevopsArtFactory:mainfrom
youngjinjung-linq:refactor/issue-205-reachability-update-config

Conversation

@youngjinjung-linq

Copy link
Copy Markdown

Summary

Implements #205: updateConfig in screen_reachability.go handled field navigation, protocol selection, character input validation, and submission in one nested switch.

  • The key switch now dispatches to focused helpers: configMaxField() (single source of truth for the manual-IP extra field), adjustConfigProtocol(), deleteConfigChar(), appendConfigChar() (digit/IP charset validation unchanged), and submitConfig() (advance from the protocol field, run analysis from input fields).
  • Behavior is unchanged; the duplicated maxField computation that appeared three times is gone.

Testing

  • go test ./... passes; new unit tests cover max-field derivation, protocol clamping (including no-op off the protocol field), port/IP character validation with backspace, and enter-advance vs. analysis-start.
  • make build passes.

Closes #205

Split the nested-switch updateConfig into focused helpers:
configMaxField (manual-IP destinations expose an extra field),
adjustConfigProtocol, deleteConfigChar, appendConfigChar (with the
existing digit/IP charset validation), and submitConfig (advance from
the protocol field, start analysis from input fields). Key handling
behavior is unchanged and each piece now has direct unit tests.

Closes DevopsArtFactory#205

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BFhLrnpVxivu62cC3k9NZB
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 5 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ea52633d-b674-4c64-800e-140790c6440e

📥 Commits

Reviewing files that changed from the base of the PR and between 744b139 and dfeea19.

📒 Files selected for processing (2)
  • internal/app/screen_reachability.go
  • internal/app/screen_reachability_config_test.go

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.

@YoungJinJung

Copy link
Copy Markdown
Contributor

Recreated as #263 from an in-repo branch under the maintainer account; this PR is superseded.

@youngjinjung-linq
youngjinjung-linq deleted the refactor/issue-205-reachability-update-config branch August 13, 2026 23:52
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.

refactor: decompose screen_reachability.go updateConfig() nested switch

2 participants