Repository navigation
Commit efdf21b
Feature: Improve run command (Ctrl+Shift+P) (#3644)
* Refactor: NavigationManager with typed application requests
Replaces the EventSystem (Models), which passed a single string, with
NavigationManager in the main project:
- ApplicationRequest (target or profile) with derived requests for
options: DNSLookupRequest (DNS server, query type), PortScannerRequest
(ports), RDAPRequest (query type).
- Host views implement IApplicationRequestHandler; MainWindow passes the
request to the shown view instead of a switch per application.
- Profile actions of the tools are public (e.g. ConnectProfile(profile))
so a request can run a profile.
- Web Console accepts a URL (connect dialog), like the other remote tools.
- All callers migrated (IP Scanner, Traceroute, Network Interface, RDAP,
open settings). Traceroute > RDAP > AS number queries with type ASN.
- The application search is cleared before a request, so a filtered
application list doesn't make the request fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Feature: Run command parser with unit tests
- RunCommandParser (Models): "command target [argument] [type]" or
"command @Profile". Whitespace around ";" is removed, so lists can be
typed with spaces; a type keyword and the second argument (e.g. ports,
DNS server) can be in any order; the rest after "@" is the profile
name (names can contain spaces).
- First test project of the solution (NETworkManager.Tests, xUnit v3)
with tests for the parser. dotnet test uses Microsoft.Testing.Platform
(global.json).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Feature: Run command dialog with arguments, profiles and suggestions
- The run command (Ctrl+Shift+P) opens a dialog instead of the flyout:
type e.g. "ping 10.0.0.1", "dns borntoberoot.net 1.1.1.1 aaaa" or
"rdp @server01" and press Enter. Esc closes the dialog.
- Suggestions: recent commands, applications (with aliases like ping,
dns, rdp, ssh), profiles of the application (@name) and type values.
Up/Down select, Tab completes, Enter runs the selection (the input as
typed is preselected).
- The target is validated with the validators of the application's
input fields before the application is opened.
- Only visible applications are offered.
- Run command history (setting RunCommand_History).
- Removed the flyout and the unused RunCommandComboBox.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Docs: Run command page and changelog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix: Scroll to the selected application in the application list
The application list only scrolled to the selected application on
startup and after clearing the search. An application opened from
somewhere else (dashboard, another application, run command) could stay
out of view.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refactor: Update input histories in place
ListHelper.Modify works on the ObservableCollection itself: an existing
entry is moved to the top, a new one inserted, and the oldest ones are
removed. Replaces the pattern copy/clear/refill (with a workaround to
restore the input text after the clear) and replacing the collection
in 34 places in 22 view models. Unit tests for the helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refactor: Inline the AddXToHistory methods
The 34 AddXToHistory methods only called ListHelper.Modify and were each
called once. ListHelper.Modify now ignores default values (null, 0) and
empty strings, which the remote tools checked in their methods, so the
call sites call it directly. PuTTY keeps its check for port and baud,
which are converted to strings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refactor: Profile target and enabled check in ProfileInfo
ProfileInfo.IsEnabled(application) and GetTarget(application) (the
tool's host, IP range, domain, URL, ...) replace the IsProfileEnabled
and GetSearchableField overrides of 16 view models. The profile panel
and the run command use the same mappings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Refactor: Wait for the view to be loaded without polling
WaitForLoadedAsync (Utilities.WPF) completes on the Loaded event (or
immediately if the view is already loaded) and replaces the
"while (!_loaded) await Task.Delay(250)" loops of the remote tools.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix: Run command review findings
- Suggestions: exact command/alias first (e.g. "lookup" no longer opens
DNS Lookup), exact profile name first in "@" mode, recent commands of a
command before its profiles, the tool's target of a profile (e.g. RDP
host) instead of the general host.
- DNS servers: configured servers as suggestions, matched by name
case-insensitively; values with spaces can be quoted ("Google Public
DNS").
- DNS Lookup uses PTR for IP addresses from any request (run command,
IP Scanner, Traceroute, profiles); shortened IPv4 forms like "10" are
host names.
- A failed suggestion (e.g. a recent command with an ambiguous profile
name) is put into the input to correct it.
- Syntax hints use resource strings; history entries are parsed once.
- Docs: quotes, DNS servers, duplicate profile names, "@" only at the
start of the target.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix: Run command second review findings, IP Geolocation and Wake on LAN
- Enter runs what was typed: no preselected suggestion for an empty
input or an unknown command with arguments (e.g. "pin 10.0.0.1");
completing a command keeps the arguments.
- "@": a profile is only preselected if exactly one matches, so
duplicate names show the error and the profiles to select.
- Parser: a list that is being typed ("10.0.0.1; ") stays the target,
";" in quotes is kept, quotes around "@name" are removed.
- Web Console requests require the WebView2 runtime.
- The run command "settings" keeps the open settings page.
- History and profiles are loaded once per dialog.
- New commands: ipgeolocation (geo) and wakeonlan (wol <MAC>
[broadcast]).
- Application list: removed a redundant scroll on startup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix: Run command third review findings
- Run command "settings" with a filtered application list no longer
crashes (the search is cleared first).
- The dialog has a title bar with a close button.
- The DNS server argument is validated (configured name or IP address /
host with a domain); a mistyped type like "aaa" is reported.
- A request is only passed to the application if it is shown.
- After running a suggestion with the mouse, the focus isn't taken back
by the closing dialog.
- History: entries of hidden applications are not shown; commands are
stored case-insensitively (ListHelper.Modify with a comparer).
- Text after a quoted profile name is an unknown argument.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix: Run command final review findings
- The suggestion list is limited to 340 px, so it fits into the dialog
(max. 500 px) and the selected entry is always visible.
- WaitForLoadedAsync stops waiting after 5 seconds, so a request to a
view that wasn't shown doesn't run later when the view is opened.
- Completing a command uses the shortest matching name ("pin" → "ping").
- Profile names are compared like they are parsed (trimmed, without
quotes), so recent commands with such names work.
- Empty DNS server list entries ("1.1.1.1; ") are ignored.
- Commands without arguments use the last word for the suggestions.
- Command names are computed once per dialog; one close function for
the run command dialog.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Docs: Add PR #3644 to changelog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 2309fc2 commit efdf21b
90 files changed
Lines changed: 3016 additions & 1557 deletions
File tree
- Source
- NETworkManager.Localization/Resources
- NETworkManager.Models
- EventSystem
- RunCommand
- NETworkManager.Profiles
- NETworkManager.Settings
- NETworkManager.Tests
- RunCommand
- Utilities
- NETworkManager.Utilities.WPF
- NETworkManager.Utilities
- NETworkManager
- Controls
- ViewModels
- Views
- Website/docs
- changelog
- faq
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4857 | 4857 | | |
4858 | 4858 | | |
4859 | 4859 | | |
| 4860 | + | |
| 4861 | + | |
| 4862 | + | |
| 4863 | + | |
| 4864 | + | |
| 4865 | + | |
| 4866 | + | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
| 4870 | + | |
| 4871 | + | |
| 4872 | + | |
| 4873 | + | |
| 4874 | + | |
| 4875 | + | |
| 4876 | + | |
| 4877 | + | |
| 4878 | + | |
| 4879 | + | |
| 4880 | + | |
| 4881 | + | |
| 4882 | + | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
| 4888 | + | |
| 4889 | + | |
4860 | 4890 | | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
0 commit comments