Fix issue 2751#2767
Conversation
GSSoC Label Checklist 🏷️@Umbrella-io — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
# Conflicts: # src/app/dashboard/page.tsx
|
Closing this PR. It does not fix the issue it claims to address. The issue (#2751) is about a TypeScript/Next.js file — this project has no C# files. The three C# files added ( Additionally, the bulk of this PR (+274 lines) is an unrelated new feature ( Please submit genuine bug fixes or contribute to the ongoing cleanup sprint. See the discussion: #2651 |
Summary
This PR replaces the hardcoded 10-minute timeout in
DefaultProcessRunnerwith a configurable timeout parameter. It also adds a background progress task that periodically reports the elapsed time while long-running processes (likewingetinstallations) are executing, preventing the terminal from appearing frozen.Closes #2751
Type of Change
What Changed
TimeSpan.FromMinutes(10)with an optional parameterTimeSpan? customTimeoutinRunProcessAsyncinsidesrc/Services/System/DefaultProcessRunner.cs.Taskinside aCancellationTokenSourcescope that loops while the process is active, logging the execution status and elapsed time every 5 seconds.OperationCanceledExceptionis now cleanly caught. The code forcefully kills the stalled process (if it hasn't exited) and throws a descriptiveTimeoutExceptionwith the exact duration limit.How to Test
config.yaml(e.g.,winget: visual-studio).winhome applyand monitor the terminal.[ProcessRunner] 'winget.exe' is still running... (Elapsed: 02:15)periodically instead of going silent.TimeoutExceptionis thrown.Expected result: The terminal provides continuous feedback during long-running tasks, and timeout failures are correctly handled and reported rather than freezing silently.
Screenshots / Recordings
[ProcessRunner] ... is still running... (Elapsed: xx:xx)logs every 5 secondsChecklist
console.log, debug code, or commented-out blocksnpm run lintpasses locallynpm run type-check)Accessibility (UI changes only)
Additional Context
This resolves UX issues where
winhome applyusers are unsure if their network dropped or an application installer crashed in the background. Future enhancements could optionally map this status back to a UI spinner or dynamic progress bar.