Skip to content

feat(sidebar): add multi-select & drag-drop to file tree - #2999

Merged
bajrangCoder merged 6 commits into
mainfrom
feat/file-tree-multi-select
Oct 28, 2026
Merged

bajrangCoder merged 6 commits into
mainfrom
feat/file-tree-multi-select

Conversation

@bajrangCoder

@bajrangCoder bajrangCoder commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Adds multi-select, drag to move and folder header actions to the sidebar file tree.

  • Long-press menu → Select to start selecting; tap to toggle, long-press (or Shift-click) to select a range. Ctrl/Cmd/Shift-click start selection directly with a mouse.
  • Floating selection bar with copy, cut, delete and more (select all, copy relative paths, rename, open).
  • Bulk delete with a single confirmation; paste handles multiple entries.
  • Clipboard is shared across open folders, so entries can be pasted into another root.
  • Back button / Esc exits selection; works on older WebViews.
  • Drag to move: long-press and drag an entry (or the whole selection) onto a folder. Closed folders open on hover, the list auto-scrolls at the edges, and holding still (or releasing in place) opens the menu instead.
  • Folder header actions: New file, New folder, Refresh and Collapse all show on hover with a mouse; on touch a "⋮" opens the folder menu (same as long-press), which now includes Refresh and Collapse all.

Select files and folders in the sidebar and act on them together:
copy, cut, delete, copy relative paths, open and rename. The clipboard
is now shared across open folders and pastes multiple entries.
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; both numbered findings are fixed, and no new blocking issue was found.

Summary

Adds multi-select, drag-to-move, and folder header actions to the sidebar file tree.

  • The files sidebar lets people select several entries and act on them together.
  • People can drag one or more file entries into a folder to move them.
  • Folder headers offer quick actions for creating, refreshing, and collapsing folders.

No new actionable issues were found in the changes since the previous review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Select file tree entries] --> B[Selection bar]
  B --> C[Copy or cut]
  C --> D[Shared clipboard]
  D --> E[Paste into another folder]
  A --> F[Drag onto folder]
  F --> G[Move entries]
  E --> H[Update files and tree]
  G --> H
Loading

Reviews (4) · Last reviewed commit: "fix(sidebar): check exclusions before re..." · Reviewed by Greptile

Comment thread src/lib/openFolder.js Outdated
Comment thread src/lib/openFolder.js Outdated
Comment thread src/lib/openFolder.js
Comment thread src/lib/openFolder.js Outdated
Comment thread src/sidebarApps/files/selection.js
- Long-press and drag entries (or the whole selection) onto a folder to
  move them; closed folders open on hover and the list scrolls at edges.
- Open folder headers get New file, New folder, Refresh and Collapse all:
  shown on hover with a mouse, behind a single "+" on touch.
- Paste keeps skipped or failed entries in the clipboard and continues
  past failures.
- Pasting across servers or storage transfers through both providers.
- Open and copy path keep entries selected inside a selected folder.
- Folder-into-itself warnings no longer block the paste.
- Closing an open folder drops its entries from the selection.
- Mock the new sidebar modules in the file icon sidebar test.
@bajrangCoder bajrangCoder changed the title feat(sidebar): add multi-select to file tree feat(sidebar): add multi-select & drag-drop to file tree Oct 28, 2026
@bajrangCoder

This comment was marked as outdated.

Tapping "+" now reveals the actions as an inline strip in the header
instead of a popup menu; it closes after an action or a tap elsewhere.
Comment thread src/sidebarApps/files/dragMove.js
Comment thread src/lib/openFolder.js Outdated
Comment thread src/lib/openFolder.js Outdated
- Header button opens the folder's select menu, which now also has
  Refresh and Collapse all.
- Size open folders on every expand and measure real header heights, so
  the tree can scroll to its last entry.
- Holding still after a long press opens the menu without lifting; a
  drag needs a deliberate move.
- Release touch listeners after a drag ends.
- Replacing an existing entry works when pasting across connections.
@bajrangCoder

This comment was marked as outdated.

Comment thread src/lib/openFolder.js Outdated
Comment thread src/lib/openFolder.js
Opening another folder mid-drag collapsed the source folder, which then
collapsed the new one back, and detached the touched row so the drag
stopped receiving touch events. Size folders only when they expand,
listen for touch events on the touched row too, and cancel a drag on any
stray touch.
…e sizing

- Cross-connection copies skip excluded entries before deleting an
  existing destination.
- Size a folder only if it's still open once the files app has loaded.
@bajrangCoder

This comment was marked as outdated.

@bajrangCoder
bajrangCoder added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit dd64970 Oct 28, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Oct 28, 2026
@bajrangCoder
bajrangCoder deleted the feat/file-tree-multi-select branch October 28, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant