[Feature]: Load project file trees one directory at a time #9454
burnmandont
started this conversation in
Ideas
Replies: 0 comments
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.
Problem
Opening the Files panel currently loads the project's complete indexed file tree before it can render. That is convenient for small repositories, but large monorepos can make the initial response, client state, and tree construction much larger than the part of the workspace the user is actually browsing. The cost is especially noticeable over remote connections.
Proposed direction
Add a project-scoped directory-listing RPC and have the Files panel request only the root directory initially. Expanding a folder would load that folder's immediate children on demand.
Each directory response could include:
Search and content search would remain backed by the existing workspace index, so users could still find unopened files without recursively expanding the tree.
For compatibility, clients could fall back to the existing full-tree endpoint when connected to an older server.
Why this shape
This keeps the normal Files-panel payload proportional to what the user opens, avoids eagerly transferring and materializing an entire monorepo, and preserves the current full-project search experience. It should benefit local use, but the primary motivation is predictable behavior for large projects over remote connections.
Questions
All reactions