Summary
`updateConfig()` in `internal/app/screen_reachability.go` is a 68-line function with 3-level nesting handling 13 key cases that manage protocol selection, port input, IP input, and form navigation simultaneously. Tracing a single key event requires reading the entire function.
Details
- Switch-within-switch-within-switch structure makes control flow hard to follow
- All 13 input cases live in one function, mixing orthogonal concerns
- Adding a new form field requires understanding all existing cases
Checklist
References
- `internal/app/screen_reachability.go:415-483`
Raised from senior code review (2026-05-12).
Summary
`updateConfig()` in `internal/app/screen_reachability.go` is a 68-line function with 3-level nesting handling 13 key cases that manage protocol selection, port input, IP input, and form navigation simultaneously. Tracing a single key event requires reading the entire function.
Details
Checklist
References
Raised from senior code review (2026-05-12).