Add context menu with Delete option to file tree entries#4069
Open
Add context menu with Delete option to file tree entries#4069
Conversation
Adds a "..." context menu (via BoxelDropdown) to each file row in the code submode file tree. The menu is triggered by hovering/clicking the three-dot button or right-clicking (contextmenu event). The first menu item is Delete, which opens the existing delete confirmation modal. The context menu is only shown when the user has write access to the realm. Test coverage added for all cases: delete flow, cancel flow, right-click trigger, and read-only realm suppression. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Preview deployments |
Host Test Results 1 files ± 0 1 suites ±0 4h 35m 38s ⏱️ + 3h 1m 48s For more details on these errors, see this check. Results for commit 9faf8b2. ± Comparison against base commit 61ceac3. ♻️ This comment has been updated with latest results. |
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.
Summary
ContextButtonor right-clicking the file rowChanges
directory.gts: Wraps each file in a.file-rowdiv; addsBoxelDropdownwith hiddenContextButtontrigger and "Delete"Menuitem; right-click (contextmenu) programmatically opens the dropdown via aMap<LocalPath, BoxelDropdownAPI>file-tree.gts: Threads newonDeleteFileprop through toDirectorycode-submode.gts: AddscanWriteToRealmgetter anddeleteFileInTreeaction; conditionally passes@onDeleteFiletoFileTreefile-tree-test.ts: 4 new acceptance testsTest plan
can delete a file from file tree context menu— full delete flow via "..." buttoncan cancel delete from file tree context menu— cancel flow preserves filecan delete a file via right-click in file tree— contextmenu event triggers dropdownfile tree does not show context menu in read-only realm— no trigger shown for read-only realms🤖 Generated with Claude Code