Skip to content

(changes): add a list/tree toggle to the Changes list (#828) - #1129

Merged
devsuitup merged 3 commits into
mainfrom
fix/828-changes-tree-view
Nov 20, 2026
Merged

devsuitup merged 3 commits into
mainfrom
fix/828-changes-tree-view

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Closes #828

The Changes toolbar gains a persisted list/tree toggle. Tree mode sorts folders first, compacts single-child folder chains, keeps folds per tab, and applies the same presentation to subagent groups.

  • A path Git reports twice (e.g. git rm --cached: a staged deletion and an untracked file) keeps both rows in the tree.
  • A fold survives a refresh that compacts or splits the folder chain it was made on.

Ports the tree view idea from doctly#98 by Vincenzo Favara (c380d18).

A long list of changed files reads better grouped by folder. The Changes
toolbar gains one icon button switching between the flat list, which stays
the default, and a tree with collapsible folders, folders first, single-child
chains compacted into one row. The choice persists under
localStorage.changesListView like the editor's changesDiffMode; folds are
kept per tab and survive a refresh. Subagent groups render in the same view
with folders of their own.

Ported from upstream c380d18 (doctly#98, Vincenzo Favara); the
tree builder moved from project-git-view.js into file-panel.js since the fork
has no Git tab.
… the tree view (#828)

Review of the tree view found two losses. A leaf was keyed by its name, so the
two records git reports at one path after `git rm --cached f` (a staged
deletion and an untracked file) collapsed into one, hiding the deletion and
its diff; the leaf key now carries the record's index, so the tree shows what
the flat list shows. Folds were keyed by the compacted display path, so a
refresh that compacted `src` into `src/nested` lost the fold made on `src`;
a compacted row now stands for every folder in its chain and is collapsed
when any of them is folded, and unfolding clears the whole chain.
@devsuitup
devsuitup merged commit fd1694c into main Nov 20, 2026
6 checks passed
@devsuitup
devsuitup deleted the fix/828-changes-tree-view branch November 20, 2026 08:11
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.

(changes): list/tree toggle in the Changes list

1 participant