Skip to content

feat(file-manager): resizable directories sidebar - #1396

Open
maxser0v wants to merge 7 commits into
Termix-SSH:dev-2.8.0from
maxser0v:feature/file-manager-resizable-sidebar
Open

feat(file-manager): resizable directories sidebar#1396
maxser0v wants to merge 7 commits into
Termix-SSH:dev-2.8.0from
maxser0v:feature/file-manager-resizable-sidebar

Conversation

@maxser0v

@maxser0v maxser0v commented Sep 5, 2026

Copy link
Copy Markdown

Stacked on #1415. Only feat(file-manager): resizable directories sidebar (fd5b890) is new here — please review that commit alone. Will rebase onto dev-2.8.0 once #1415 merges.

Overview

Resizable directories sidebar. (The sidebar toggle and the sticky-header fix that used to be in this PR were split out — see #1415.)

  • Added: the Trash/Directories sidebar can be resized by dragging its right edge (160px minimum, up to 40% of the row). Double-click the handle restores the default 224px. The width is remembered (usePaneWidth).
  • Updated: the local pane divider reuses the same PaneResizeHandle and persisted-width hook, replacing its inline implementation.

Changes Made

  • New PaneResizeHandle component and usePaneWidth hook with tests.
  • Two new i18n keys in en.json.

Rebased on current dev-2.8.0.

Related Issues

Screenshots / Demos

image image

Checklist

  • Code follows project style guidelines
  • Supports mobile and desktop UI/app (if applicable) — mobile overlay behaviour unchanged
  • I have read Contributing.md
  • This is not a translation request. See docs

@ZacharyZcR ZacharyZcR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is described as stacked on #1395, but it targets , repeats all lower-stack changes, contains unresolved references, and is currently conflicting. Please retarget it to (or rebuild it as an isolated delta). Also split the sticky-header/sidebar-toggle fix from the resizable-sidebar feature if both are meant to remain independently reviewable. Rebase only after #1392's blocking transfer-boundary issues are resolved.

@ZacharyZcR
ZacharyZcR dismissed their stale review September 7, 2026 01:43

Superseded because shell quoting removed branch names from the review body.

@ZacharyZcR ZacharyZcR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is described as stacked on #1395, but it targets dev-2.8.0, repeats all lower-stack changes, contains unresolved #TODO references, and is currently conflicting. Please retarget it to feature/file-manager-column-visibility (or rebuild it as an isolated delta). Also split the sticky-header/sidebar-toggle fix from the resizable-sidebar feature if both are meant to remain independently reviewable. Rebase only after #1392's blocking transfer-boundary issues are resolved.

@maxser0v

maxser0v commented Sep 8, 2026

Copy link
Copy Markdown
Author

Restacked as requested: this PR is now only the resizable sidebar (fd5b890, one commit on top of #1415). The sidebar-toggle part is split into #1415; the sticky-header fix itself is gone since dev-2.8.0 removed the sticky list header. All descriptions now link the real PR numbers instead of #TODO, and the whole stack is rebased on current dev-2.8.0 (after #1392's blocking issues were addressed there).

GitHub won't let a PR against Termix-SSH/Termix use a fork branch as base, so each PR is an isolated delta on top of its predecessor with the new commit named in the description. Happy to close and reopen sequentially instead if you prefer.

@maxser0v
maxser0v force-pushed the feature/file-manager-resizable-sidebar branch from fd5b890 to b738a57 Compare September 9, 2026 05:43
Max and others added 7 commits September 9, 2026 18:58
…and-drop transfers (desktop)

Renderer side of the dual-pane file manager, built on the local filesystem
bridge added in the previous PR. Desktop app only; the web build is
unchanged (the toggle is hidden when `window.electronAPI.localFs` is absent).

- New Local pane (LocalFilePane) next to the remote grid, toggled from the
  toolbar (Laptop icon); path, visibility and width are remembered in
  localStorage (`termix:file-manager:local-pane:*`). Grid and list views,
  hidden files toggle, breadcrumb navigation, New Folder.
- Drag files/folders from the Local pane onto the remote grid to upload,
  and from the remote grid onto the Local pane to download. Both directions
  stream through the main process (`useLocalTransfers`) with a single
  progress toast per batch (speed, ETA, cancel). Finder drops onto the
  remote grid keep working as before.
- Collision policy for downloads: destinations are checked first; if any
  exist the user is asked Replace / Skip for the batch. Skip, dismiss and
  timeout all mean skip - nothing is ever replaced without an explicit
  click, and the main process enforces the same rule (`EEXIST` unless
  `overwrite` is set).
- Drag MIME contract: `application/x-termix-local-files` for local drags,
  `application/x-termix-remote-files` marker on the remote grid's internal
  drags, so each pane can tell the two apart from Finder drops.
- Transfer targets are described as `{ origin, route, deviceId }`
  (`getSessionOrigin` in main-axios) - the renderer never hands the main
  process a URL.
- i18n: new `fileManager.local*` keys in en.json only (other locales via
  Crowdin).
- Tests: LocalFilePane rendering/navigation, local-transfer-utils
  (relative-path planning, size formatting).
Mirrors the remote grid's menu for the user's own disk. On an entry (or
the current multi-selection): Open / Open folder, Upload to server,
Reveal in Finder/Explorer, Rename (inline, F2), Copy Path, Move to Trash
(confirmation toast, Del). On the background: New Folder, New File,
Reveal, Show/Hide hidden files, Refresh (F5). Enter opens, Cmd/Ctrl+A
selects all, Escape clears the selection.

Deletion goes through shell.trashItem so it lands in the OS Trash and is
recoverable; rename and create refuse names containing path separators
and never overwrite an existing entry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Bn6K6xNAihgWZ5fMVWt1W
Drag the boundary at the left edge of a column header (Modified, Owner,
Size, Permissions on the remote grid; Modified, Size, Kind in the local
pane) to change its width; the Name column takes whatever is left.
Double-click a handle to reset that column. Widths are remembered per
pane in localStorage. Finishing a drag over a sortable header no longer
toggles the sort.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Bn6K6xNAihgWZ5fMVWt1W
Both the remote grid (list, grid and empty-folder states) and the local
pane show a Termius-style ".." row pinned above the entries whenever the
current folder has a parent. Double-clicking it goes up one level. It is
also a drop target: local files dropped on it upload into the parent
folder, remote rows dragged onto it move there, and remote items dropped
on the local pane's ".." download into the parent folder.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Bn6K6xNAihgWZ5fMVWt1W
Right-click a list-view header (remote grid or local pane) to open a
Columns menu and tick/untick Modified, Owner, Size, Permissions (remote)
or Modified, Size, Kind (local). Hidden columns leave the grid template
entirely so the Name column gets the space back; at least one optional
column always stays on. The choice is remembered per pane alongside the
column widths.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Bn6K6xNAihgWZ5fMVWt1W
The toolbar's sidebar button now shows/hides the directories panel on
desktop (persisted), while below md it still opens the mobile overlay.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Bn6K6xNAihgWZ5fMVWt1W
The Trash/Directories sidebar can now be resized by dragging its right
edge (160px minimum, up to 40% of the row); double-click the handle to
restore the default 224px. The width is remembered. The same handle and
persisted-width hook now also drive the local pane divider, replacing the
inline implementation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Bn6K6xNAihgWZ5fMVWt1W
@maxser0v
maxser0v force-pushed the feature/file-manager-resizable-sidebar branch from b738a57 to 87d43f2 Compare September 9, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants