Skip to content

#461: Files in the root on top instead of mixed with directories#519

Open
BowlOfSoup wants to merge 1 commit into
modem-dev:mainfrom
BowlOfSoup:fix/sidebar-root-files-first
Open

#461: Files in the root on top instead of mixed with directories#519
BowlOfSoup wants to merge 1 commit into
modem-dev:mainfrom
BowlOfSoup:fix/sidebar-root-files-first

Conversation

@BowlOfSoup

@BowlOfSoup BowlOfSoup commented Jul 9, 2026

Copy link
Copy Markdown

When using hunk I couldn't make a distinction between files in the root and files in directories. This was also stated in issue #461. I didn't solve it as proposed, because that would still mix directory files and root files (except the root files wouldn't be indented). The root files are now 'hoisted' to the top, while still adhering to the original VCS sorting.

I would be fine by exactly implementing the proposal in #461, but I settled on the current fix.

Thanks in advance!

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@benvinegar

Copy link
Copy Markdown
Member

Thanks for tackling #461 — I reproduced the ambiguity and agree that root files need a clearer boundary.

We tried an alternative that keeps the original VCS or agent-provided review order intact: emit a synthetic ./ group header whenever the ordered sidebar stream enters a run of repo-root files.

nested/
 M file.ts
./
 M zzz-root.ts

This makes the root transition explicit without hoisting files or changing the main review stream and navigation order. We have a small working patch with helper and rendered-component coverage.

Since maintainer edits are enabled, I’m happy to push the follow-up onto this branch, or you can adapt the PR yourself if you prefer. Would you be comfortable pivoting #519 to this presentation?

This comment was generated by Pi using OpenAI GPT-5.2

@BowlOfSoup

Copy link
Copy Markdown
Author

Since maintainer edits are enabled, I’m happy to push the follow-up onto this branch

Sure, go ahead. A few questions about the alternate proposal:

  • Does it mean that indentation is always happening, for all directories and the root ./? On split screen terminals this might lead to space issues.
  • The navigation order: why is it important to keep the VCS order, and not e.g. an alphabetical order?
  • The proposed navigation order: does it mean that the list is scattered with ./ if there are lots of root directory changes? Hoisting (and alphabetically, but I didn't to that either) would give a better overview imo.

@benvinegar

Copy link
Copy Markdown
Member

Does it mean that indentation is always happening, for all directories and the root ./? On split screen terminals this might lead to space issues.

The indentation accommodates the (M)odified indicator and the active file indicator. It's always there.

The navigation order: why is it important to keep the VCS order, and not e.g. an alphabetical order?

Because we're just trying to do the default thing everyone is used to.

does it mean that the list is scattered with ./ if there are lots of root directory changes?

There would just be one?

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