Panels, jobs and previews hold Leases; only the pool closes a
connection, after IdleClose without leases or on Close, so concurrent
use and release cannot race (N-P0-8) and a mirror keeps its connection
when the other panel leaves (N-P1-12). Concurrent Acquires of one
user@host:port share a single dial (N-P2-8); Reconnect retries with
backoff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
logx writes slog text records to $XDG_STATE_HOME/vcom/vcom.log (0600, dir
0700), rotates once on start above 5 MiB, takes the level from --debug,
--log-level or VCOM_LOG (default warn) and redacts password/passphrase/
answers attributes. The old UI's log.Printf calls go through an slog
adapter at debug level instead of a new /tmp file per run. main creates
the run dir (sweeping dead ones), quits on SIGHUP/SIGTERM via
program.Send, and after Program.Run always saves the session through the
idempotent Model.Shutdown and removes the run dir.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
state.Save writes session.toml atomically (0600, state dir 0700), drops
cursor-memory entries under cache/temp mounts and caps each pane at 200
entries; Load migrates the old ~/.config/vcom/session.toml once. The old
UI's session functions are aliases over state, and theme selection uses
config.SetKey, so the user's comments and keys survive. config.Save is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keepalive with a per-reply timeout marks a frozen link Lost and closes
it so hung SFTP calls fail with ErrConnLost (N-P1-2). Reconnect installs
a new generation in the same Conn. Exec takes a ctx (SIGKILL + close on
cancel) and an output limit (N-P2-15, N-P1-7).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Load finds the file through paths (no ./vcom.toml), returns defaults plus an
error for a broken file instead of exiting, warns about unknown and
deprecated keys (strict second pass), resets invalid values with a warning,
and aliases center_width_percent to ui.preview_width_percent. New keys from
design §9.2 get defaults. SetKey edits one line keeping comments, order and
unknown keys, appends missing keys/sections, creates the XDG file, refuses
a file that does not parse and verifies the result before an atomic write.
The old UI shows config errors in the status line and survives an unknown
theme name; the reference vcom.toml is documented and current.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The whole handshake (TCP, kex, auth, SFTP init) runs under a deadline
that ctx cancellation cuts short, and a late client is closed (N-P1-3).
HostKeyAlgorithms come from known_hosts (N-P1-4); unknown and changed
keys go to a Prompter (N-P2-14). Auth tries identity files, then agent
keys over one shared agent connection, then default keys, password and
keyboard-interactive through the Prompter (N-P2-1, N-P2-2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paths: config lookup -config → $VCOM_CONFIG → XDG → ~/.config (never the
working directory; StrayCwdConfig only reports one), state/cache/data dirs
of the effective user under sudo (inherited XDG_* ignored for writes),
run-<pid> dir with a sweep of dead processes' dirs (U-P1-15).
atomicfile: temp + fsync + rename + dir fsync; keeps the old file on any
error, writes through symlinks and keeps mode/owner of an existing file.
The trash now takes its home from paths.DataHome.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Items on another volume go to $topdir/.Trash/$uid (real, sticky .Trash only)
or $topdir/.Trash-$uid instead of failing with EXDEV (N-P2-12). The
.trashinfo is reserved with O_EXCL (collisions get a .N suffix and skip
orphans in files/), Path= is URL-encoded, DeletionDate is local time, and
under sudo the effective user's trash is used. The old UI's MoveToTrash now
delegates here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve host aliases through ~/.ssh/config with kevinburke/ssh_config:
HostName defaults to the alias, key=value syntax, Host * defaults,
Include, quotes, several IdentityFile, '#' inside values (N-P1-5).
Endpoint.Key includes the user (N-P2-3). Port the hosts.dat store with
atomic writes and a base64 password field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vfstest.Run checks any writable vfs.FS through the API only (so it also runs
over SFTP): Lstat/Stat/ReadDir with symlinks, Create Excl/Trunc, ReadAt,
Mkdir, Rename in both modes, Remove (file, link, empty and non-empty dir),
RemoveTree on a link to a directory, Chmod/Chtimes, RealPath, Sync and the
error mapping. FaultFS hooks every FS and File method; FailNth and Gate
cover ENOSPC on the n-th write and blocking ReadDir.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One implementation for every FS. Walk and RemoveTree never follow symlinks,
so deleting a link to a directory removes only the link (N-P0-3). DirSize
returns the root error and counts unreadable subdirectories instead of
reporting a silent 0 B (N-P1-14). SameFile compares inodes locally and
RealPath on other volumes, so an alias directory is recognised (N-P0-6);
Within resolves symlinks on both sides and accepts a not-yet-existing child.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReadDir has lstat semantics and resolves symlink targets (NavigableDir for
links to directories, Target=nil + LinkErr for broken links: U-P1-2 at the
data level). Birth time is only computed through BirthTimer. NoReplace falls
back to link+unlink, then to an Lstat check, when renameat2 is unsupported.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Types and interfaces from design §2.1: FS, File, FileInfo, Caps, VolumeID,
RenameMode, CreateMode, PathOps (posix and native), Location.Same, the
optional Trasher/BirthTimer/Execer interfaces and ReadOnly(fs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version in model.go, README, PKGBUILD and flake.nix (which was still at
0.2.6). Tagging/publishing is left to the maintainer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- sshConn/sftpCli are immutable after Connect; Close is serialized, only
sets an atomic closed flag and closes the clients, so concurrent calls
get errors instead of a data race or nil dereference (N-P0-8)
- Acquire/Release user counting: panes own the client from Connect,
mirror and remote copy/delete jobs take a reference, and leaving a host
(goParent at root, re-mirror, exit SSH mode) releases instead of closing
a client another pane or job still uses (N-P1-12, partial)
- ports TestCloseRace; adds a mirror-then-leave UI regression test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CreateArchive refuses an archive path that is a source or lies inside
one (symlinked parents resolved) and writes to a temp file renamed over
the target only on success, so failures/cancels leave no partial file
and keep an existing archive intact
- the UI checks the target before starting and asks before replacing an
existing archive
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Russian-layout translation applies only to command keys; mkdir, rename,
filter and the SSH form receive the typed runes (U-P1-5)
- PgDn is bound (U-P1-6); help text no longer promises an unbound 'b'
- q with the info pane, a filter or a selection closes that layer like
Esc and quits only from the bare browser; q no longer closes the SSH
form while typing (U-P1-16, partial)
- smoke tests for PgDn and Cyrillic mkdir are no longer skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The background-preserving reset was built by slicing lipgloss output,
which is empty without colors (NO_COLOR, dumb terminals). It is now
derived from the active termenv profile and skipped when there are no
colors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- F8 dialog defaults to the trash; permanent deletion only via D/d
- n/N closes confirm and archive-type dialogs, as their notes promise
- behavior.confirm_delete=false now works, and only skips the question
for the trash (remote and permanent deletes still ask)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RemoveRecursive used Stat on the root, so deleting a remote symlink to a
directory walked into the target and deleted its contents. The root is
now examined with Lstat (links are removed with Remove), and Walk also
Lstats its root. Ports the analysts' TestRemoveRecursiveSymlinkToDir onto
the sshtest server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- SSH panes: rename, Enter/open/edit/execute on files, archive and unpack
are refused with a status message instead of acting on the local file
with the same path (N-P0-1, N-P0-2, N-P1-15)
- copy/move/archive/unpack refuse a passive pane that is an archive
mount (temp dir deleted on exit) or the ssh:// host list (canWriteTo;
U-P0-2, N-P2-10); mkdir in the host list is refused too
- startProcess hook so tests can observe xdg-open launches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
m.status was set in ~200 places but never rendered. A single status line
now sits between the panels and the footer, coloured by wording (error /
warning / info); the filter bar takes the same slot instead of growing
the view past the terminal height. Local mkdir now fails on an existing
name instead of silently reporting success.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Makefile targets: build, test, race, fmt-check, vet, vendor-check, lint, ci
- ci.yml runs fmt-check, vet, vendor-check, build and race tests; also on
rework/** branches and callable from release.yml
- gofmt the three files that were not formatted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teadriver feeds keys/mouse to Update, runs returned commands concurrently
(unwrapping Batch and Sequence), feeds results back until quiet, skips
long timers, records Quit and ExecProcess requests, and renders View
without ANSI under an Ascii profile (WithProfile for others).
Smoke tests cover navigation, mkdir, copy, rename, filter and delete on
t.TempDir(); PgDn and Cyrillic input are skipped until task 1.6.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports the analysts' testbed into a reusable package: Start(Options{Password,
AuthorizedKeys, HostKeys, NoExec, Chroot}), NewProxy with SetDelay/Freeze/
CutAfter/KillAll, IsolatedHome, GenKeys. Exec reports exit-status and
stderr; NoExec rejects exec like ForceCommand internal-sftp. All goroutines
stop on t.Cleanup (checked via runtime.NumGoroutine).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
grep for the version bump missed this file since it has no extension.
makepkg pulls sources from the tag named after pkgver, so Arch builds
were still fetching v0.2.6 despite main/the v0.2.7 tag being current.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Audited every copy/move/delete path (local, remote same-host, cross-host)
and fixed:
- Shell command injection in same-host remote cp/mv (unescaped paths
interpolated into exec strings); added remote.ShellQuote.
- Missing guard against copying/moving a directory into its own
subdirectory, locally and on same-host remote transfers (unbounded
recursion / disk fill). New regression tests in ops_test.go.
- Remote-to-remote same-path file copy silently truncating the source
file via Create() before it finished being read.
- Overwrite warning ("N existing target(s)") never shown for remote
destinations, only local ones.
- Remote same-host server-side cp never advancing the file-done counter
(waited on -v output that was never requested).
- Removed a dead "plan-then-confirm" subsystem (5 functions, 2 message
types, 2 unreachable Update() cases) superseded by the current design.
- Remote delete (SFTP) now runs as a cancellable job with the same
progress modal as local delete, instead of a single blocking call.
Also add a CI workflow that runs build/vet/test on every push and PR,
since previously they only ran on release tags.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Replace ssh.InsecureIgnoreHostKey() with TOFU verification against
~/.ssh/known_hosts (accept-new for unknown hosts, hard reject on a
changed key) to close a MITM hole on every SFTP connection.
- Actually connect to a running ssh-agent (SSH_AUTH_SOCK) for auth
instead of only scanning default key files on disk; give a clear
error when an explicit IdentityFile is passphrase-protected.
- Fix SSHClient.walk()/DirectorySize: the internal filepathSkipDir
sentinel leaked out as a real error on stat/ReadDir failures instead
of being swallowed, aborting size calculation on the first
unreadable subdirectory instead of skipping it.
- Skip symlink-to-directory entries in remote directory copies instead
of failing the whole transfer trying to Open() them as regular files.
- Consolidate 5 duplicated sudo-aware home-dir lookups into
internal/homedir, adding a missing os.Geteuid()==0 check before
trusting SUDO_USER.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
src/vcom-0.2.5/ and its .tar.gz were a stale extracted release
snapshot (including its own vendor/ tree) checked in by mistake in
1577ee5. Not referenced by any build script; just repo bloat.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Delete: skip remoteDeletePlanCmd and trashPlanCmd, show dialog immediately
- Copy: skip copyPlanCmd and remoteCopyPlanCmd, show dialog immediately
- CopyStats: no lstat per file, count files via WalkDir only
- Copy: two-phase (count first, then copy with known total + progress bar)
- Progress: file-based ratio, remove Size/Speed display
- Stage: Counting files... → Coping files... (no empty stage)