Repository navigation
Description
Goal
"Open locally" works for remote files whose name starts with a dot (.env.local, .bashrc, .gitignore), on macOS and Linux as on Windows.
Context
Opening the edit copy of .env.local fails on macOS with:
".env.local" could not be opened locally: Not allowed to open path ~/Library/Caches/smart-ssh/edit-sessions/data-…/…/.env.local
The capability allows opener:allow-open-path for $CACHE/smart-ssh/edit-sessions/** (apps/smart-ssh-community/capabilities/default.json, Spec 0054 part 4). The opener plugin builds a tauri::fs::Scope with require_literal_leading_dot from its plugin config (tauri-plugin-opener 2.5.5, src/scope.rs is_path_allowed, src/config.rs), which defaults to true on Unix: */** then never match a path component that starts with .. apps/smart-ssh-community/tauri.conf.json has no plugins.opener section, so every dotfile in an edit session is rejected on macOS/Linux. The edit copies are written by crates/app-shell/src/edit_copies.rs under the original file name (on purpose: editors pick syntax and settings from it). The feature exists since 0.6.0.
Requirements
apps/smart-ssh-community/tauri.conf.jsongets"plugins": { "opener": { "requireLiteralLeadingDot": false } }.- The allowed scope stays exactly
$CACHE/smart-ssh/edit-sessions/**withapp: true; nothing else is widened. Path traversal stays impossible (the fs scope canonicalises the path before matching). - The edit copy keeps the original file name; no renaming of dotfiles.
- Spec 0054 (part 4) states the setting and why (dotfile edit copies).
Acceptance Criteria
-
tauri.conf.jsoncontainsplugins.opener.requireLiteralLeadingDot: false - Test (Rust, no running app needed if possible – e.g.
tauri::fs::Scopebuilt with the same pattern and option): a path…/edit-sessions/<session>/<id>/.env.localis allowed; a path outsideedit-sessions(also a dotfile such as~/.ssh/id_ed25519and…/edit-sessions/../.ssh/x) is still rejected; withrequire_literal_leading_dot: truethe dotfile is rejected (counter-proof) - A config test fails if the
requireLiteralLeadingDotsetting is removed fromtauri.conf.json - Spec 0054 updated
- macOS: opening a remote
.env.localwith "Open locally" opens it in the default editor (manual check) - Relevant automated tests pass
Technical Notes
Security-relevant config (opener scope): the change only lets the existing pattern match dot components inside the edit-session folder. Do not touch capabilities/*.json scopes.
Files: apps/smart-ssh-community/tauri.conf.json, apps/smart-ssh-community/src/ (or tests/), docs/specs/0054-*.md, changelog.d/
Spec impact: update 0054
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
fix(app): allow opening dotfile edit copies locally (#1607)
test(app): allow unwrap in opener scope test (#1607)
test(app): run the opener scope test on Unix only (#1607)
smart-ssh-coder commentedon Nov 27, 2026
Implementation ready for review. PR #1608. Fixed the red Windows job: the new opener_dotfile_scope test binary linked tauri (mock runtime) and aborted at load on Windows (0xc0000139). The scope tests and the tauri dev-dependency are now Unix-only (the leading-dot rule only exists there); config tests still run everywhere. CI is green on the new head.
smart-ssh-reviewer commentedon Nov 27, 2026
Review passed – moving on to merge. Approved. tauri.conf.json sets plugins.opener.requireLiteralLeadingDot: false; the capability scope (edit-sessions/**, app: true) is unchanged. A config test (verified red without the setting), a scope test (dotfile allowed, ~/.ssh and traversal rejected, true rejects the dotfile) and the Spec 0054 Part 4 update are present. CI green. Manual macOS check pending.
Manual testing after the merge:
fix(app): open dotfile edit copies locally on macOS and Linux (#1608)
smart-ssh-coordinator commentedon Nov 27, 2026
Merged and branch deleted: PR #1608 (squash) in release/0.8.0. back-merge PR 1609 opened