Repository navigation
feat(file-browser): mark symbolic links and open links to folders - #1294
Merged
smart-ssh-coordinator[bot] merged 5 commits intoNov 10, 2026
Merged
smart-ssh-coordinator[bot] merged 5 commits into
smart-ssh-coordinator[bot] merged 5 commits into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
12 tasks
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
12 tasks
There was a problem hiding this comment.
Review
Verdict: changes requested
Review level: elevated
Blocking
- Acceptance criterion "Recursive delete, chmod/chown and folder download do not descend into
link-dir(… add one for the folder-download walk if none covers it)": no test covers the folder-download walk with a link.DownloadTreeVisitor::visit(crates/app-shell/src/commands/sftp/download.rs:256) and the walk insftp_ops.rsrely on lstat-basedis_dir, but nothing asserts that a folder containing a link to a folder is downloaded without descending into the link. The PR body itself says "partially". Add a test (fake tree with a symlinked directory, assert the target's content is not visited / downloaded). - Acceptance criterion "Works through the elevated channel and the local pseudo-server (unit tests with the respective fakes …)": the local pseudo-server has a test, but the elevated channel (
crates/app-shell/src/commands/elevation/sftp_impl.rs, newread_linkdelegation) has none. Without it, dropping the override would silently make every link in elevated modelinkTarget = null. Add a test with the elevated fake session.
Non-blocking
crates/app-logic/src/file_browser.rs: the doc comment ofsort_remote_entriesis now attached toresolve_symlinks(new function inserted between comment and function).- Properties dialog (link type + target) has no dedicated test.
Verified
- counter-proof: not applicable (feature, not a bug fix)
- tests run locally:
npx vitest run FileBrowserPanel.links.test.tsx remotePath.test.ts fileSort.test.ts src/locales→ 133 passed (executed). Rust tests could NOT be run (toolchain install not permitted in container); relied on CI, which is green on all jobs. - callers checked: frontend
isDiruses (delete/chmod/chown →isRealDir, menu, sort, download, move-collision) → ok (read); backend recursive ops unchanged and use core lstatis_dir(read) - edge cases: dangling link →
Broken,read_link/staterrors do not fail the listing (read:resolve_symlinks); long target truncated to 200 chars in tooltip (read) - UI: Playwright specs not run locally; CI
Browser Testsgreen. Vitest above covers the three link kinds. - files read: all changed logic/test files in the Rust diff and frontend components.
Timing analysis
- vitest/Rust tests added are deterministic by reading (no timers/sleeps found); no timing dependency found.
Spec
- visible behaviour changed: link marker, folder-like links, tooltip target, properties
- spec searched (
rg -il 'symbol|symlink|link' docs/specs/), spec covering it: 0020 §7 — updated and matches the code - verdict: spec change present and matches the code
Security checks
- Recursive delete/chmod/chown keep lstat semantics; core
RemoteEntry.is_dirunchanged; only the DTO is changed; UI usesisRealDirfor destructive recursion options. Only read-only stat/readlink added. Threat-model note present. Loosening: none found. Link target rendered as text only.
Follow-ups
- None.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
Review points: (1) folder-download walk test — fixed in HEAD: |
There was a problem hiding this comment.
Review
Verdict: approved
Review level: elevated
Blocking
- None.
Non-blocking
- Properties dialog (link type + target) still has no dedicated test.
Verified
- Delta since a555dc6 (single commit e19567b) read:
test_walk_tree_does_not_descend_into_a_symlinked_directory(sftp_ops/tests.rs) asserts the target folder is never listed;test_elevated_channel_delegates_read_link_to_the_elevated_sessionreturns the elevated session's target ("/root/x", not the normal one's), so it fails if the override is dropped (reasoned from the trait default, read). - doc comment of
sort_remote_entriesmoved back (read). - counter-proof: not executed (Rust toolchain not installable in the container); walk test guards existing lstat behaviour.
- tests run locally: none for Rust (toolchain unavailable); relied on CI, all checks green on e19567b (
gh pr checks). - UI: unchanged since last round; CI Browser Tests green.
- previous findings 1, 2 and the doc-comment nit: fixed.
Timing analysis
- no timing patterns in the added tests (no timers, deterministic fakes); no timing dependency found.
Spec
- spec 0020 §7 updated earlier, unchanged in this delta; matches.
Security checks
- Delta touches only tests/mock/doc comment; no loosening. Recursive ops keep lstat semantics.
Follow-ups
- None.
smart-ssh-coordinator
Bot
deleted the
issue-1291-file-browser-open-symbolic-links-to
branch
November 10, 2026 22:30
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.
Closes #1291
Summary
Symbolic links in the file browser are marked (small glyph after the name, screen-reader label, target on hover). A link to a folder is listed and sorted with the folders, opens like a folder by its logical path (no realpath), and gets the folder menu. Links to files stay files; broken links are de-emphasised and not navigable. The listing resolves each link with one
stat+ oneread_link; failures never fail the listing. Recursive delete/chmod/chown keep lstat semantics (the UI also no longer treats a link as a folder for those).Acceptance Criteria
isSymlink,linkTarget,linkKind= dir|file|broken),ipc.tsregenerated: metsftp_ops/tests.rs:test_resolve_symlinks_classifies_links_with_one_stat_and_readlink_eachFileBrowserPanel.links.test.tsx(wide, narrow),remotePath.test.ts(parentPath of link path)FileBrowserPanel.links.test.tsxlocaleKeyParity.test.tsgreentest_delete_recursive_never_descends_into_a_symlinked_directory,test_chown_recursive_skips_symlinks_below_the_root; no new folder-download walk test (not covered: partially, the walk uses unchanged lstat-basedis_dir/is_symlinkfrom core)local_sftp.rs:test_links_are_listed_as_links_and_read_link_returns_the_target; elevated delegatesread_linkto the inner session (no separate test);sshd_exec_sftp.rs:listing_with_symlinks_unicode_and_spacesextended withread_link(not run here, needs the sshd fixture)Tests
Counter-proof not run for the new tests (they are feature tests); the vitest file was run 10× without failure.
Assumptions
linkKind(issue recommendation).read_linkdefault onSftpSessionreturns an error →linkTarget = null.isRealDir(notisDir) for delete preview, chmod/chown recursive options and toasts so links to folders are never offered recursion.Spec
updated 0020
Threat model: no change – only adds read-only SFTP READLINK/STAT on entries the server already listed; no new boundary, recursive operations unchanged.
Manual test steps
ln -s /tmp d,ln -s /etc/hostname f,ln -s /nope xin one folder.dshows 📁 ↪ among folders,fshows 📄 ↪,xis dimmed; hover shows-> target.d: path field shows<folder>/d; Up returns to<folder>.d: only the link is removed.Follow-ups
None.
🤖 Generated with Claude Code