Repository navigation
Fix watched-range validation, lift the 1,000-port cap, show scan progress - #12
Merged
Merged
Conversation
- Watched-range inputs are now text fields with numeric input mode.
WebKit's type=number accepted values such as 4.000, 4e3 and 4000.0
that the server then rejected, so a range that looked valid failed
with "Choose a valid range of up to 1,000 ports". The server accepts
plain digits or grouped thousands and reports specific errors
(:invalid_range_bound, :reversed_range); submitted values stay in
the fields after an error.
- Remove the 1,000-port limit from Settings and config/runtime.exs.
Bounds stay 1..65535 with start <= end. The scanner keeps 16
concurrent probes with a 3.5 s timeout each (full port space scans
in about 13 s locally), and Monitor still schedules the next scan
only after the current one finishes.
- Scanner reports cumulative checked ports about 100 times per scan.
Monitor broadcasts {:scan_progress, %{checked, total, scanning}} and
includes it in snapshots. The dashboard shows "Scanned X / Y" with a
native <progress> element at the top.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sallaumen
added a commit
that referenced
this pull request
Nov 6, 2026
The scan progress total from #12 skips the dashboard's own port, so the range caption now reports the same number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
type=number. WebKit treats values such as4.000,4e3and4000.0as valid numbers and submits them, but the server only accepted plain digits, so a range that looked valid failed with "Choose a valid range of up to 1,000 ports". I reproduced this in WebKit (4000.0→ error). The fields are nowtype=text inputmode=numeric. The server accepts plain digits or grouped thousands (4.000,4,000,4 000) and returns specific errors (:invalid_range_bound,:reversed_range) with matching copy. The fields keep the submitted values after an error and setaria-invalid/aria-describedby.Settings,config/runtime.exs, the settings copy and the README. Bounds stay 1–65535 with start ≤ end.Scannerkeeps 16 concurrent probes with a 3.5 s kill timeout each, and now runs unordered. A local scan of 1–65535 took about 13 s.Monitorstill schedules the next scan only after the current one finishes and ignores:scan/refresh while a scan runs. A new test covers this.Scanner.scan/3takeson_progress:and reports cumulative checked ports about 100 times per scan, always ending at the range size.Monitorbroadcasts{:scan_progress, %{checked, total, scanning}}(stale scans are ignored) and addsprogressto snapshots. The dashboard shows "Current scan / Last scan · Scanned 1,240 / 61,535" with a native<progress>(aria-valuetext) at the top. The new component is inScanProgress, and the CSS is appended at the end ofapp.cssto limit conflicts with the parallel UI work.Verification
mix test(53 tests, 0 failures),mix format --check-formatted,mix compile --warnings-as-errors.PORT=4102 mix phx.serverwith an isolated config and range 1–65535: progress counts up live (5,895 / 65,534→11,135 / 65,534…). Checked desktop 1440 px and 375 px in light and dark, with no horizontal overflow. Error and success states were exercised in Settings. The only console entries were the dev live-reload server log (TLS probe notices), with no page errors.Notes
type=numbermismatch. It is not changed here.1-65535range also probes privileged and ephemeral ports. Each scan is about 65k loopback connects.🤖 Generated with Claude Code