fix: fall back to home dir when terminal cwd does not exist#128
Open
whitesockcat wants to merge 2 commits into
Open
fix: fall back to home dir when terminal cwd does not exist#128whitesockcat wants to merge 2 commits into
whitesockcat wants to merge 2 commits into
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Cmd+B conflicts with common terminal keybindings (e.g. tmux prefix). Change the sidebar-files toggle to Cmd+Shift+B and update the menu accelerator and tooltip to match. Cmd+\ remains as an alternative. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When a terminal tile remembers a remote/WSL cwd (e.g. /home/user/) that does not exist on the local host, pty.spawn starts a shell in a nonexistent directory causing it to exit immediately. The tile then auto-closes via the pty:exit handler, appearing as a flash-and-disappear to the user. Validate the cwd with fs.accessSync before spawning and fall back to os.homedir() when it is inaccessible. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
whitesockcat
force-pushed
the
fix/pty-invalid-cwd-fallback
branch
from
April 13, 2026 12:01
2ffe291 to
53e9f40
Compare
Author
|
I have read the Contributor License Agreement (CLA) and hereby sign the CLA. |
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
/home/user/) that does not exist on the local macOS host, the spawned shell exits immediately, causing the tile to flash and disappear. Addedfs.accessSyncvalidation before spawning — falls back toos.homedir()when the path is inaccessible.Cmd+BtoCmd+Shift+Bto avoid conflicts with common terminal keybindings (e.g. tmux prefix). Updated menu accelerator and tooltip to match.Cmd+\remains as an alternative.Test plan
/home/user/)Cmd+Shift+Btoggles the sidebarCmd+\still toggles the sidebar🤖 Generated with Claude Code