Patch#26
Merged
Merged
Conversation
Lets you verify by sight that a remote update was actually applied on the target machine — the title bar shifts from one version string to another after the user clicks "Restart to apply" (or downloads the new portable zip). Binds to a OneTime AppVersion property on MainViewModel that reads Assembly.GetExecutingAssembly().GetName().Version, so the displayed version is whatever -p:AssemblyVersion stamped at publish time.
AsyncRelayCommand.Execute is async void. Any exception thrown by the awaited task escapes to App.DispatcherUnhandledException, which calls Shutdown(-1) + Environment.Exit(-1) unconditionally — one broken command takes the whole process down. Concrete repro: clicking Trace Caller on a machine where 'powershell' isn't on PATH (Win11 SE, certain MDM-locked configs) makes Process.Start throw Win32Exception, which propagates up async void and exits the app with no diagnostic visible to the user. Reported as 'shut down randomly after we clicked Trace Caller'. Three-layer fix: - AsyncRelayCommand and AsyncRelayCommand<T> catch all exceptions in Execute and Debug.WriteLine them; the command stays disabled-then- reenabled normally instead of killing the process. - TraceOriginAsync wraps its body in a try/catch that logs the failure to AppendLog so the user sees WHY the trace produced no output instead of staring at an empty section. - RunCommandCaptureAsync catches Process.Start failure and returns the error as captured output instead of throwing — the existing 'Could not parse trace output' path then shows it gracefully.
Both Python install paths (winget and python.org fallback) treated "install succeeded but FindPythonAsync didn't immediately locate the binary" the same as "install failed" — they continued the outer loop and installed the NEXT Python version on top of the one that just landed. Each retry fires its own UAC prompt and installer screen, so the user sees the setup "loop around 'install to path'" repeatedly even though Python was already installed after the first attempt. The detection-miss is real: winget can put Python at a path that isn't on the process's inherited PATH yet, and the registry-refresh trick doesn't always pick it up before the next FindPythonAsync runs. But it's a *detection* problem, not an install problem. Both paths now bail after the first successful install code with a clear "restart WRAITH to pick it up" message. The winget path also skips the official-installer fallback when winget itself succeeded (no point downloading python.org's installer to put down a *third* Python).
…ed in path expression' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR improves resilience during command execution and Python bootstrapping, and adds a visible application version to the custom WPF title bar.
Changes:
- Adds fallback exception handling for async commands and trace-origin execution paths.
- Prevents repeated Python installer attempts after a successful install cannot be detected immediately.
- Displays
AppVersionfrom the executing assembly in the title bar.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
WRAITH/ViewModels/MainViewModel.cs |
Adds async command exception guards, trace failure logging, command-start failure handling, and AppVersion. |
WRAITH/Services/BootstrapService.cs |
Stops winget/official installer retry loops after successful-but-undetected Python installs. |
WRAITH/MainWindow.xaml |
Updates the title bar text to include the bound application version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.