This was generated by AI during triage.
Summary
Add an optional post-run URL field to RunCommandItem. When set and the command exits with code 0, CodeShellManager opens the URL in the user's default browser automatically.
Motivation
A very common dev workflow is: run a build/dev-server command → wait for it to be ready → open http://localhost:5173 (or similar). Today the user has to manually switch to a browser after the run completes. Automating this mirrors what IDEs like Rider and VS Code do with "open browser on start".
Useful examples:
dotnet run → open http://localhost:5000
npm run dev → open http://localhost:5173
mkdocs serve → open http://localhost:8000
- A deploy script → open a staging URL
Proposed behaviour
Data model
Add PostRunUrl: string? to RunCommandItem. null / empty = no browser launch (default, backwards-compatible).
Runtime
After a run completes (exit code 0 only, unless a future option adds "open even on failure"):
- If
PostRunUrl is set and non-empty, call Process.Start(new ProcessStartInfo(url) { UseShellExecute = true }) to hand it to the OS default browser.
- Show a brief toast: "Opened [url] in browser".
- If the process fails to launch, show a warning toast instead of silently failing.
Editor UI (SessionRunCommandsDialog)
- Add an optional "Open URL" text field below (or beside) the command-line field for each row.
- Placeholder text:
https://localhost:5000 or similar.
- No URL validation beyond "non-empty string" — the OS will handle invalid URLs.
Persistence
PostRunUrl serialises to state.json alongside other RunCommandItem fields.
Out of scope
- Waiting for the server to be ready before opening (health-check polling). That is a separate, more complex feature.
- Opening a URL on non-zero exit.
Summary
Add an optional post-run URL field to
RunCommandItem. When set and the command exits with code 0, CodeShellManager opens the URL in the user's default browser automatically.Motivation
A very common dev workflow is: run a build/dev-server command → wait for it to be ready → open
http://localhost:5173(or similar). Today the user has to manually switch to a browser after the run completes. Automating this mirrors what IDEs like Rider and VS Code do with "open browser on start".Useful examples:
dotnet run→ openhttp://localhost:5000npm run dev→ openhttp://localhost:5173mkdocs serve→ openhttp://localhost:8000Proposed behaviour
Data model
Add
PostRunUrl: string?toRunCommandItem.null/ empty = no browser launch (default, backwards-compatible).Runtime
After a run completes (exit code 0 only, unless a future option adds "open even on failure"):
PostRunUrlis set and non-empty, callProcess.Start(new ProcessStartInfo(url) { UseShellExecute = true })to hand it to the OS default browser.Editor UI (
SessionRunCommandsDialog)https://localhost:5000or similar.Persistence
PostRunUrlserialises tostate.jsonalongside otherRunCommandItemfields.Out of scope