Repository navigation
fix: honor configured directory for the first terminal - #1089
Open
Aschenbath wants to merge 1 commit into
Open
Aschenbath wants to merge 1 commit into
Aschenbath wants to merge 1 commit into
Conversation
Use the existing cold-start directory fallback when NewTerminal has no explicit working directory. Preserve explicit launch paths. Fixes Kuddev#1081.
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.
Result / 用户结果
The first terminal now starts in the configured startup directory when the launch request has no explicit working directory. An explicit launch directory still takes precedence. Fixes #1081.
Design / 设计边界
The workspace's
NewTerminalstartup arm now uses the existingcold_start_cwdfallback, matching the established directory policy. No settings format, public interface, dependencies, threading, or lifetime behavior changes. Existing invalid-directory fallback remains owned bycold_start_cwd.The regression opens the actual GPUI workspace in an isolated child process, checks the configured-directory case and the explicit-directory override, and inspects the first terminal's working directory. It reuses the existing imported-profile fixture to fail native process creation before a PTY reader can enter the deterministic test executor.
Evidence / 验证依据
Validated on native Windows with Rust 1.97.1. Cargo test/check commands used
--locked --config .github/ci-profile.toml --profile ci.cargo test ... -p pebrel --bin pebrel --features gpui-test-support gpui_shell::workspace::windowing::startup:: -- --nocapture: passed.python scripts/check_architecture.py --base 76f74be115ec0fa75dca9a9fdaf6e682f83e05f5: passed, retaining existing notices and budgets.python -m unittest scripts.tests.test_architecture_budgets scripts.tests.test_architecture_dependencies scripts.tests.test_architecture_governance: 62 passed.cargo test ... -p pebrel-settings: 110 passed.cargo test --manifest-path tools/i18n-contract/Cargo.toml ...: 24 passed, 1 existing ignored.cargo test ... -p pebrel --test file_line_budget: 2 passed.cargo fmt --all -- --check: passed.cargo check ... -p pebrel --bin pebrel --features gpui-shell --tests: passed.The full application suite and other operating systems were not run. There is no visual layout, translated-message, or hot-path change; screenshots/DPI measurements are not applicable. The launch-failure fixture makes terminal construction deterministic; it does not claim to exercise a successful interactive shell session.
Required Review / 必须确认
CONTRIBUTING.md,docs/architecture.md, anddocs/project-constraints.md.python3 scripts/check_architecture.py --base <PR-base-commit>passes; budgets were not inflated to fit the change.