Add virtualized flat-list TreeView component and preview sandbox#2972
Merged
Add virtualized flat-list TreeView component and preview sandbox#2972
Conversation
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Deploying waveterm with
|
| Latest commit: |
874b1a0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3c9f9206.waveterm.pages.dev |
| Branch Preview URL: | https://copilot-add-virtual-file-exp.waveterm.pages.dev |
Copilot
AI
changed the title
[WIP] Add virtual file explorer widget for preview
Add virtualized flat-list TreeView component and preview sandbox
Mar 4, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Review NotesThe TreeView implementation is solid with:
The code follows the project's conventions and handles edge cases appropriately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new frontend TreeView widget intended for VSCode-style explorer use cases, without backend wiring yet. It provides a reusable, backend-agnostic API with virtualization, flat visible-row projection, and preview coverage under
frontend/preview.What this adds
TreeViewcomponent infrontend/app/treeview/treeview.tsxdesigned around:visibleRowsprojection withdepth(not recursive render)frontend/preview/previews/treeview.preview.tsxwith async mocked directory loading and width controls.frontend/app/treeview/treeview.test.tsfor projection/sorting/synthetic-row behavior.Tree model + projection behavior
TreeNodeDatawrapper (separate from directFileInfocoupling) with:id,parentId,isDirectory,mimeType, flags,childrenStatus,childrenIds,capInfovisibleRowsfromnodesById + expandedIdsand injects synthetic rows for:loadingerrorcapped(“Showing first N entries”)Interaction model implemented
onOpenFileSorting + icon strategy
Example usage
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.