Repository navigation
Feature: Improve run command (Ctrl+Shift+P) - #3644
Merged
Merged
Conversation
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>
- 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>
- 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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
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>
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>
- 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>
- 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>
- 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>
- 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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
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.
Changes proposed in this pull request
Run command (Ctrl+Shift+P)
DNS Lookup
Navigation (refactoring)
Bug fixes in existing code
Refactorings
Tests
Docs
Related issue(s)
To-Do
Contributing
By submitting this pull request, I confirm the following: