Skip to content

Make defaults match across the CLI, TUI, desktop app and MCP server - #503

Merged
fstubner merged 2 commits into
mainfrom
fix/consistent-defaults
Oct 3, 2026
Merged

fstubner merged 2 commits into
mainfrom
fix/consistent-defaults

Conversation

@fstubner

@fstubner fstubner commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Found by reading every default for every operation across the four interfaces and the core constants.

Changed

  • Desktop scan and inspect scanned 22,80,443,8080,8443; everything else scans the core's 22,80,443. Now the same.
  • MCP inspect and sweep pinged with 500 ms (others 1,000) and gave DNS 500 ms (others 1,500); MCP discover gave DNS 1,000. One ops_config() helper: a client timeout still applies to every step, and without one each step keeps the core default. Two tests pin both cases.
  • MCP schemas advertised defaults the code ignores: DNS type A (applies all types), subnet 192.168.1.0/24 (applies the local subnet), start_pcap_capture outputFile: capture.pcap (applies a per-job name). Replaced with descriptions of what happens.
  • Ping count: TUI unbounded, Tauri clamp 64, desktop form max 50. All now MAX_PING_COUNT (256).
  • Desktop inspect ignored the concurrency preference (Ops::default()); now passes it like scan/discover/sweep.
  • Desktop pcap duration 5 s → 10 s, matching core and MCP.

Left alone on purpose

  • MCP ping count defaults to 1 (documented: one summary for a model).
  • Desktop 1,000-packet cap (the results table is not virtualised).
  • Desktop resolves hostnames on discover/sweep (a UI choice; the CLI keeps it opt-in because it is slower).
  • mDNS minimum timeout varies (100/250/500 ms). These are harmless input bounds.

Checks: cargo clippy -D warnings and tests for netscli-mcp, netscli and netscli-gui pass locally. The desktop JS lint and unit tests did not run locally (incomplete node_modules); CI runs them. Two desktop tests that pinned the five-port list are updated.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Site preview: https://pr-503.netscli-site-preview.pages.dev

Built from e6e7b2b with NETSCLI_PREVIEW=1 — noindex, and analytics disabled so it does not report into netscli.com's numbers.

Production is unaffected: netscli.com is served from GitHub Pages via pages.yml, which is manual-only.

- Desktop scan and inspect default to the core's 22,80,443 instead of a
  five-port list of their own; sweep reuses the same constant.
- MCP: one ops_config() helper. Without a client timeout each phase keeps
  the core default (ping 1000, scan 500, DNS 1500) instead of the tool's
  single advertised default standing in for all three.
- MCP schemas stop advertising defaults the code does not apply (dns type
  A, subnet 192.168.1.0/24, start_pcap_capture outputFile).
- Ping count capped at MAX_PING_COUNT in the TUI (was unbounded), the
  Tauri command (was 64) and the desktop form (was 50). The MCP mDNS clamp
  uses MAX_MDNS_TIMEOUT_MS instead of a literal.
- Desktop inspect passes the concurrency preference through.
- Desktop pcap duration defaults to 10 s like the core.

Left alone on purpose: MCP ping count defaults to 1 (single summary for a
model, documented in schemas.rs), the desktop keeps its 1,000-packet cap
(its results table is not virtualised), and the desktop resolves
hostnames on discover and sweep (a UI choice; the CLI keeps it opt-in for
speed).
@fstubner
fstubner force-pushed the fix/consistent-defaults branch from 1fe3c04 to 55f86c5 Compare October 3, 2026 19:41
@fstubner
fstubner merged commit 31cd9e5 into main Oct 3, 2026
16 checks passed
@fstubner
fstubner deleted the fix/consistent-defaults branch October 6, 2026 18:28
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