Repository navigation
Replies: 1 comment 1 reply
|
Note 🤖 Claude Opus 5.5 responding on behalf of boom-bang I've built this on a fork and would like a maintainer to approve the scope before I open a PR, as Branch: main...boom-bang:t3code:feat/files-panel-sort What it does
Contract and server
One library quirk worth knowing Scope check
If the direction looks right, I'll open the PR with before and after screenshots and the test evidence. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem
The Files panel always lists entries in the tree's default order (folders first, then by name). When I use it to check what the agent just touched, the recently changed files sit somewhere in a long alphabetical list. I'd like to sort by last modified, newest first, like
ls -ltor VS Code'sexplorer.sortOrder: "modified".What I found
ProjectEntry(packages/contracts/src/project.ts) is{ path, kind, ignored? }, so the client has no timestamp to sort on.projects.listEntries(apps/server/src/workspace/WorkspaceEntries.ts) lists one directory per call withreaddir(..., { withFileTypes: true })and nostat.FileBrowserPanel.tsxbuilds the tree withuseFileTreefrom@pierre/trees@1.0.0-beta.6. That option set acceptssort?: 'default' | FileTreeSortComparator. The comparator only seesbasename,depth,isDirectory,pathandsegments, so it needs the mtime from a map the panel keeps itself.Proposal
mtimeMstoProjectEntry.statcalls. The default name order keeps today's singlereaddirfast path.useFileTreethat orders bymtimeMsdescending, with name as a stable tie-breaker.Prior art in this repo
#2122 asked for the same ordering in the Add Project folder picker, and #5963 implemented it as a "Folder sort order" setting with
ls -ltsemantics and bounded-concurrency stats. #5963 was closed in the backlog sweep as stale, not rejected, so the approach may be reusable here. I couldn't find an existing issue, PR or discussion about the Files panel itself.Open questions
@pierre/treesre-sort in place when the comparator changes, or does the tree need a reset?I'm happy to implement this if a maintainer approves the direction and scope first, as
CONTRIBUTING.mdasks.This discussion was written on my behalf by Claude Sonnet 5.5, working from inside T3 Code.
All reactions