Skip to content

fix(ui): distinguish root files in sidebar#519

Merged
benvinegar merged 3 commits into
modem-dev:mainfrom
BowlOfSoup:fix/sidebar-root-files-first
Jul 23, 2026
Merged

fix(ui): distinguish root files in sidebar#519
benvinegar merged 3 commits into
modem-dev:mainfrom
BowlOfSoup:fix/sidebar-root-files-first

Conversation

@BowlOfSoup

@BowlOfSoup BowlOfSoup commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Label each run of repository-root files with an in-place ./ sidebar header.
  • Preserve the existing VCS or agent-provided review order.
  • Keep root files visually distinct from the preceding folder group.

Closes #461

This PR description was generated by Pi using OpenAI GPT-5.2

@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
Contributor 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?

@benvinegar benvinegar changed the title #461: Files in the root on top instead of mixed with directories fix(ui): distinguish root files in sidebar Jul 23, 2026
@benvinegar
benvinegar merged commit dcf66e8 into modem-dev:main Jul 23, 2026
8 checks passed
@benvinegar

Copy link
Copy Markdown
Member

Thank you!

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.

Visually distinguish files of different levels in the sidebar

2 participants