Skip to content

Make the list view a tree, as the Finder's - #160

Merged
dhh merged 5 commits into
mainfrom
list-tree
Nov 17, 2026
Merged

dhh merged 5 commits into
mainfrom
list-tree

Conversation

@dhh

@dhh dhh commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Each folder in the list has an arrow: click it (or press →) and its items are listed right under it, a level in; again (or ←) and they go. → on an open folder steps to its first item, ← steps back out to the folder an item is in, and from the top still goes up a folder. ⏎ or a double click goes into a folder, as before. Folders open inside folders, and close with them, letting go of what was selected inside.

The folder's model keeps it all as rows, each with its depth, so selecting, the cursor, file work, dragging and the menu work on them as on any other. A folder opened is read in the background and its rows inserted without resetting the list; a change inside one is read again with the folder. Going to another folder or view closes them all, and a search, Recents, the trash and plugins' views stay flat, → going into a folder there.

Stacked on #159: this PR shows only its own commit.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No separate new issue was found that blocks merging.

Summary

The list now shows folders as an expandable tree.

  • Folders open as nested rows in the list.
  • List arrows move through the open folder tree.
  • File menus and completed work follow nested items by path.

No separate new findings were accepted. Previous threads were supplied without comment numbers, so they receive no numbered ledger entries.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Click arrow or press Right] --> B[FolderModel reads folder]
  B --> C[Insert children with depth]
  C --> D[List shows nested rows]
  D --> E[Shared selection and file actions]
  D --> F[Close folder]
  F --> G[Remove children and their selection]
Loading

Reviews (6) · Last reviewed commit: "Keep a Shift range's start on its own it..." · Reviewed by Greptile

Comment thread src/foldermodel.cpp Resolved
Comment thread src/foldermodel.cpp Resolved
Comment thread src/foldermodel.cpp Resolved
Comment thread src/foldermodel.cpp Resolved
Comment thread src/foldermodel.cpp Resolved
Comment thread src/foldermodel.cpp Resolved
Comment thread src/Selecting.qml Resolved
Base automatically changed from shortcuts-page to main November 17, 2026 15:50
dhh and others added 5 commits November 17, 2026 16:51
Each folder in the list has an arrow: click it (or press →) and its items
are listed right under it, a level in; again (or ←) and they go. → on an
open folder steps to its first item, ← steps back out to the folder an
item is in, and from the top still goes up a folder. ⏎ or a double click
goes into a folder, as before. Folders open inside folders, and close
with them, letting go of what was selected inside.

The folder's model keeps it all as rows, each with its depth, so
selecting, the cursor, file work, dragging and the menu work on them as
on any other. A folder opened is read in the background and its rows
inserted without resetting the list; a change inside one is read again
with the folder. Going to another folder or view closes them all, and a
search, Recents, the trash and plugins' views stay flat, → going into a
folder there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…selected nested items

A folder closed and opened again before its first reading was in got
its items twice: both readings passed the check that it was still open.
Each opening now has its own number, and only the newest one's reading
is used.

A folder that couldn't be read opened as if empty. It now closes again
and says why ("beta: You don't have permission to open this folder."),
when opened and when read again with the folder.

The right-click menu took an item for the selection only if its name was
among the folder's own, so with nested items selected it acted on the
one clicked alone. It now goes by the item's path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…twice

Renaming an item inside a folder opened in the tree lost it: the work
was done in the opened folder, not the one shown, so the pane ignored
it, and once the folder was read again the cursor fell to the item's old
row. The pane now finds the item by its whole path, at once or once the
folder's been read again, and keeps it selected. A new test renames one
so it sorts elsewhere.

A re-read that finished before a folder's own reading (the folder closed
and opened again while the re-read ran) listed its items, and the
reading then listed them again. Its rows are now replaced, never added
twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A folder opening in the tree lists its items above whatever's below it,
so the cursor's row number changed under it, and the list took that for
the cursor moving: it selected just the cursor's item, and Copy or Trash
then acted on fewer files than were selected. The list now tells a move
from rows coming or going around the cursor's item, which leaves the
selection alone and shifts a Shift range's start with the rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The range's start was moved by however far the cursor's row moved when a
folder opened. But the folder can open between the two, moving the
cursor and not the start, so the next Shift-click or Shift-arrow
selected from the wrong item. The start now remembers its item and
finds its row again, as the cursor does. The tree test opens a folder
between the two and Shift-clicks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit 69591b9 into main Nov 17, 2026
2 checks passed
@dhh
dhh deleted the list-tree branch November 17, 2026 16:00
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.

1 participant