-
Notifications
You must be signed in to change notification settings - Fork 133
fix(terminal): scope global terminal key per project#915
Open
jschwxrz wants to merge 1 commit intogeneralaction:main from
Open
fix(terminal): scope global terminal key per project #915jschwxrz wants to merge 1 commit intogeneralaction:main from
jschwxrz wants to merge 1 commit intogeneralaction:main from
Conversation
...ction defaults Global terminal key now falls back to projectPath instead of a bare 'global' string, so switching projects gives each project its own global terminals. Terminal selection logic now prefers task terminals when a task is active and global terminals when no task is selected. fixes generalaction#909
@jschwxrz is attempting to deploy a commit to the General Action Team on Vercel.
A member of the Team first needs to authorize it.
Greptile SummaryThis PR fixes a bug where the global terminal stayed stuck in a previous project's working directory when switching between projects. The root cause was that the global terminal store key was a bare
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| src/renderer/components/TaskTerminalPanel.tsx | Scopes global terminal key by projectPath to fix cross-project terminal stickiness; adds selection fallback guards for task-less views. Changes are clean and well-targeted. |
Flowchart
flowchart TD
A["TaskTerminalPanel renders"] --> B{"task.path exists?"}
B -- Yes --> C["globalKey scoped to task path"]
B -- No --> D["globalKey scoped to projectPath"]
C --> E["useTaskTerminals with globalKey"]
D --> E
E --> F{"selectedValue valid?"}
F -- "No selectedValue" --> G{"task exists?"}
G -- Yes --> H["Select first task terminal"]
G -- No --> I["Select first global terminal"]
F -- "Has value" --> J{"No task but task mode?"}
J -- Yes --> K["Redirect to global terminal"]
J -- No --> L{"Terminal still exists?"}
L -- Yes --> M["Keep current selection"]
L -- No --> N{"task exists?"}
N -- Yes --> H
N -- No --> I
Last reviewed commit: 3084e62
Contributor
rabanspiegel
commented
Feb 17, 2026
Thank you for your contribution! I am not sure the global terminal switching between is desired behaviour. Let's discuss in #909
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.
Issue:
The global terminal doesn't update its working directory when switching between projects. It stays stuck in the previous project's directory.
Fix:
Global terminal key now falls back to projectPath instead of a bare 'global' string, so switching projects gives each project its own global terminals.
fixes #909