Repository navigation
feat: scope terminal shell history per worktree - #620
Merged
Merged
Conversation
Each worktree gets its own HISTFILE so ArrowUp only surfaces commands from the current worktree. Integrates with the new LocalPtyProvider architecture: history env injection runs after buildSpawnEnv but before spawnShellWithFallback, and onBeforeFallbackSpawn keeps HISTFILE in sync when the shell falls back.
Add missing command field to PtyApi.spawn in index.d.ts to match the runtime index.ts signature, fixing TS2769 overload conflict.
The deleteWorktreeHistoryDir import pulls in electron's app module. Add a vi.mock so the test doesn't hit the real electron export.
Contributor
Author
|
looking into it |
Contributor
Author
|
thanks for reporting. looking into it |
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
* feat: scope terminal shell history per worktree Each worktree gets its own HISTFILE so ArrowUp only surfaces commands from the current worktree. Integrates with the new LocalPtyProvider architecture: history env injection runs after buildSpawnEnv but before spawnShellWithFallback, and onBeforeFallbackSpawn keeps HISTFILE in sync when the shell falls back. * fix: align preload type declaration with implementation Add missing command field to PtyApi.spawn in index.d.ts to match the runtime index.ts signature, fixing TS2769 overload conflict. * chore: remove terminal-history-scope-design.md from tracked files * fix: mock terminal-history in worktrees test The deleteWorktreeHistoryDir import pulls in electron's app module. Add a vi.mock so the test doesn't hit the real electron export.
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.
Summary
LocalPtyProviderarchitecture: history env injection runs afterbuildSpawnEnvbut beforespawnShellWithFallback, andonBeforeFallbackSpawnkeeps HISTFILE in sync when the shell falls backterminalScopeHistoryByWorktreesetting (defaults totrue) for users who prefer shared global historyworktreeIdthrough the renderer → preload → main IPC chain to enable history scopingTest plan
terminal-historyscoping interminal-history.test.ts