Skip to content

fix: file browser shows newest files first, bump limit to 5000#2856

Draft
JustHereToHelp wants to merge 1 commit intowavetermdev:mainfrom
JustHereToHelp:fix/file-manager-limit
Draft

fix: file browser shows newest files first, bump limit to 5000#2856
JustHereToHelp wants to merge 1 commit intowavetermdev:mainfrom
JustHereToHelp:fix/file-manager-limit

Conversation

@JustHereToHelp
Copy link

Summary

Fixes #2830

My screenshots folder has about 1300 files and the file browser was just silently cutting off after 1024 — no error, no "load more", just poof. Took me a while to even realize files were missing.

Two changes:

  • Bumped MaxDirSize from 1024 to 5000
  • Sort by mtime descending before truncation so the most recent files always show up first

The sort uses DirEntry.Info() instead of os.Stat() to avoid the extra syscall overhead on large directories.

Test plan

  • Open a folder with 1000+ files in the file browser
  • Verify recent files appear at the top
  • Verify no performance regression on large dirs

Sort directory entries by mtime descending before truncation so the
most recent files always appear when a directory exceeds the limit.
Bumped MaxDirSize from 1024 to 5000.

Uses DirEntry.Info() instead of os.Stat() to avoid extra syscalls.

Fixes wavetermdev#2830
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

File browser silently stops showing files after ~1024 items

1 participant