Open symlinked directories, and re-read ssh_config when asked - #14
Merged
Conversation
Two things reported together, both about a pane showing something other than what is there. **A symlinked directory could not be opened.** `~/data -> /mnt/vdb` on a server is a row that swallowed every double-click. SFTP's readdir reports a link's type the way lstat does, so it arrives as `symlink`, and the pane only walked into rows typed `directory`. The browser now follows each link with a stat — one per link, and only for links, since a listing is mostly ordinary files — and records what is behind it. A link to a directory opens, sorts with the directories, draws as a folder in the link colour rather than as a chain, and shows no byte size. A link whose target cannot be stat'd stays unopenable, which is the honest answer for a broken one. Navigation goes to the link's own path, not the resolved target: the server resolves it when it lists, and the breadcrumbs keep saying where the user thinks they are. **The host list was read once at startup.** A host removed from ~/.ssh/config stayed in the picker for the life of the window, and one added to it never appeared at all. Opening the picker now re-reads both lists. Verified against a real server: on seed2, `data` resolves to a directory target, the pane's rule calls it navigable, and listing it returns its contents; `.tmux.conf`, a link to a file, correctly stays unopenable. Rendered headless in both themes to confirm the row sorts and draws as a folder. 9 new tests, including a stubbed SFTP layer where readdir and stat disagree, which is the whole shape of the bug. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTQ3RzTAey9nT6r1kbGBCd
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.
Two reports, both about a pane showing something other than what is there. A third report in the same batch turned out not to be a bug — see the end.
A symlinked directory could not be opened
~/data -> /mnt/vdbon a server was a row that swallowed every double-click. SFTP'sreaddirreports a link's type the waylstatdoes, so it arrives assymlink, and the pane only walked into rows typeddirectory.The browser now follows each link with a
stat— one per link, and only for links, since a listing is mostly ordinary files — and records what is behind it. A link to a directory opens, sorts with the directories, draws as a folder in the link colour rather than as a chain, and shows no byte size. A link whose target cannot be stat'd stays unopenable, which is the honest answer for a broken one.Navigation goes to the link's own path, not the resolved target: the server resolves it when it lists, and the breadcrumbs keep saying where the user thinks they are.
Verified against a real server (
seed2):The host list was read once at startup
sshConfigHosts()was fetched on mount and never again, so a host removed from~/.ssh/configstayed in the picker for the life of the window — and one added to it never appeared at all. Opening the picker now re-reads both lists.Checks
pnpm test— 323 passed, 30 files (9 new)pnpm typecheck— clean—for sizeThe new SFTP test stubs a layer where
readdirandstatdisagree, which is the whole shape of the bug.Not a bug: seed1
Reported alongside these as "can't connect to seed1". It is the host refusing our credentials, not the app failing to offer them:
No code change here can help; that key needs to be authorised on the host.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GTQ3RzTAey9nT6r1kbGBCd