Uh oh!
There was an error while loading. Please reload this page.
feat(fleet): allow switching working directory for new runs in Fleet TUI - #479
Merged
Merged
Conversation
Adds a working-directory field to the New Run screen so a launched run can target a different cwd than the TUI's own process. Threads the resolved cwd through launch.py and cli/bg_runner.py, surfaces it in the Runs screen and theme/widgets presentation, and covers the change with new tests across bg_runner, launch, and the TUI actions/new_run/runs screens.
Blocking: - History screen's resume action now forwards FleetApp.launch_dir as cwd to launch_resume, instead of silently ignoring the chosen launch directory on resume. - Replace the inherited PYTHONSAFEPATH=1 env var (which leaked into workflow script-step subprocesses and broke sibling-module imports) with an unconditional -P interpreter flag on the detached child's argv, which is not inherited by descendants. - DirectoryPickerModal._accept now rejects empty/whitespace-only input instead of silently treating it as the process cwd. Recommendations applied: - Relative input in the directory picker now anchors on the tree's root directory rather than the process cwd. - _spawn_bg_child's cwd guard no longer lets a bare PermissionError escape past its documented RuntimeError contract, and distinguishes "not a directory" from "does not exist". - fleet/launch.py's not-found error no longer claims an absolute reference was resolved against base_dir. - theme.shorten_home compares path components instead of a bare string prefix, fixing a bug that rendered /home/jasonx as ~x under HOME=/home/jason. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Jason Robert (jrob5756)
marked this pull request as ready for review
August 22, 2026 19:58
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 24, 2026
Closed
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 freeto 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.
Summary
Adds a working-directory field to the Fleet TUI's New Run screen so a launched run can target a different cwd than the TUI's own process.
fleet/launch.pyandcli/bg_runner.pydocs/fleet.mdandAGENTS.mdTesting
Adds/updates tests in
test_cli/test_bg_runner.py,test_fleet/test_launch.py,test_fleet/test_tui_actions.py,test_fleet/test_tui_new_run.py,test_fleet/test_tui_runs.py.Closes#477