Skip to content

Add recent Connect by IP dropdown#2296

Merged
ten9876 merged 2 commits intoten9876:mainfrom
jensenpat:aether/connect-ip-recent-addresses
May 3, 2026
Merged

Add recent Connect by IP dropdown#2296
ten9876 merged 2 commits intoten9876:mainfrom
jensenpat:aether/connect-ip-recent-addresses

Conversation

@jensenpat
Copy link
Copy Markdown
Collaborator

Summary

  • Replace the Connect by IP text field with an editable drop-down that keeps normal manual entry behavior.
  • Persist the three most recent successful Connect by IP addresses and prefill the newest address on startup.
  • Record addresses only after the routed/manual 4992 probe succeeds, preserving existing VPN source-path profile behavior.

Notes

  • SmartLink is intentionally out of scope for this change.
  • Existing LastRoutedRadioIp settings seed the new list on first launch so current users keep their last manual IP.

Validation

  • git diff --check
  • cmake --build build -j10

👨🏼‍💻 Generated with OpenAI Codex (GPT-5.5 Pro 4/23) and tested by @jensenpat

@jensenpat jensenpat linked an issue May 2, 2026 that may be closed by this pull request
2 tasks
@jensenpat jensenpat marked this pull request as ready for review May 2, 2026 22:43
@jensenpat jensenpat requested a review from ten9876 as a code owner May 2, 2026 22:43
Copy link
Copy Markdown
Contributor

@aethersdr-agent aethersdr-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clean, well-scoped change @jensenpat. This looks good to me — the implementation matches existing conventions and the legacy LastRoutedRadioIp fallback is a nice touch for current users.

A few small notes, none blocking:

  • rememberManualIp does a redundant disk re-read. After saveRecentManualIpSettings(ips) you call loadRecentManualIpSettings() again to repopulate the combo. The same result can come from iterating sanitizeRecentManualIps(ips) (or just ips after save, since it was already sanitized on the way in). Minor — saves a JSON parse on every successful connect.

  • Init flow is correct but worth noting. The QSignalBlocker in loadRecentManualIps() suppresses textChanged, so onManualIpChanged() is not invoked for the prefilled IP — but applySavedSourceSelection(...) is called explicitly right after, and updateActionState() runs further down in the constructor, so the manual Connect button correctly enables for the prefilled IP. Worth a comment if you think future readers might trip on it, but not required.

  • QHostAddress round-trip for normalization also rejects malformed input (which is desirable here) and de-dupes IPv6-style variants. Good.

  • Scope is tight — only the two ConnectionPanel files, no drive-by changes. Appreciated.

Thanks for the contribution!

@ten9876
Copy link
Copy Markdown
Owner

ten9876 commented May 3, 2026

Claude here on Jeremy's behalf — pushed the redundant-disk-re-read fix as bec8f5c4 so the PR is ready to merge as-is.

Change: rememberManualIp now reuses the already-sanitized list it just saved instead of round-tripping through loadRecentManualIpSettings() to repopulate the combo. Saves a JSON parse on every successful connect. +3/−2.

Otherwise the PR was clean — QHostAddress normalization, legacy LastRoutedRadioIp seed, QSignalBlocker pattern, LineEdit extracted from the combo so the existing focus/textChanged/returnPressed wiring keeps working with zero churn. Thanks for the contribution!

73, Jeremy KK7GWY & Claude (AI dev partner)

@ten9876 ten9876 force-pushed the aether/connect-ip-recent-addresses branch from bec8f5c to e296b69 Compare May 3, 2026 00:57
After saveRecentManualIpSettings(ips), the function called
loadRecentManualIpSettings() again to repopulate the combo — same
result comes from the already-sanitized list we just saved, minus
a JSON parse on every successful connect.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@ten9876
Copy link
Copy Markdown
Owner

ten9876 commented May 3, 2026

Re-applied as 80600b1d after a brief rollback while we debugged an unrelated launch-environment issue. Same fix as before — rememberManualIp reuses the already-sanitized list it just saved instead of round-tripping through loadRecentManualIpSettings() to repopulate the combo. +3/−2.

73, Jeremy KK7GWY & Claude (AI dev partner)

Copy link
Copy Markdown
Owner

@ten9876 ten9876 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified clean separation between the new RecentConnectByIpAddresses (UI history) and the existing LastRoutedRadioIp (startup auto-probe key) — both keep working independently. QHostAddress round-trip normalization, legacy first-run seed, and the lineEdit-extracted-from-combo pattern all good. Pushed the redundant-disk-re-read cleanup (80600b1d) on top. Thanks @jensenpat!

@ten9876 ten9876 merged commit 1c5aa97 into ten9876:main May 3, 2026
5 checks passed
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.

Connect IP history

2 participants