Gallery folders have no rename or delete — user can only create folders via the + button, no way to rename a misnamed folder or delete a folder that's no longer needed #234
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
src/components/gallery/FolderNav.tsxrenders a list of folders as buttons. The buttons:There's no:
onContextMenuhandler on the folder button)A user who:
…or just live with the misnamed folder. There's no edit affordance.
grep -n 'renameFolder\|deleteFolder' src/returns 0 hits. No reducer actions, no UI.Where
src/components/gallery/FolderNav.tsx(read-only folder chips + create)grep -n 'renameFolder' src/returns 0grep -n 'deleteFolder' src/returns 0src/components/gallery/types.ts:23(id,name)Suggested fix shape
Two options:
onRenameFolderopens a small modal with the current name pre-filled; Save calls aRENAME_FOLDERreducer action.onDeleteFolder(disabled for the 'all' folder) opens a confirmation modal: "Delete folder X? N designs will be moved to 'No folder' (or deleted, your choice)." The confirm dispatchesDELETE_FOLDERwhich either:folderId: nullon all designs in the folder (preserves them in 'all')Both are valid. The right-click menu is more standard for power users; the hover icons are more discoverable for new users.
Severity
Low. The user can work around by recreating folders. Power users with many folders notice.
Discovered by
Gap analysis (2026-10-02) of gallery folder management.
Related
NewFolderDialog) is in place. Rename and delete are the missing CRUD.onFolderDragOver); rename/delete are siblings.folderIdfield is a string; the 'all' folder is a sentinel value (folderId === 'all'), not a real row in thefoldersarray. The 'no folder' state isfolderId === null.Shipped in commit
d8a905eon origin/main.Implementation (chose option 1 from the issue — right-click context menu):
FolderNavnow listens foronContextMenuon each folder chip and shows a small popup with Rename and Delete. The pop-up uses pure DOM (matches the existingRightClickMenupattern for design cards) so the click coordinates stay local.All Designs,Unsorted,Favorites) still open the menu on right-click, but both items render disabled (aria-disabled="true",not-allowedcursor, dim color). The menu opening on every folder avoids the surprise of right-click doing nothing on sentinels; the items inside just refuse the action.RenameFolderDialog(new, mirrorsNewFolderDialog): pre-fills the current name, rejects empty / duplicate names against the rest of the user folders, Save is disabled while the name is unchanged.DeleteFolderDialog(new): confirmation quotes the folder and shows the live design count (0 / 1 design / N designs) plus the moved-to-Unsorted promise. Delete folder button is the destructive red (#DC2626), Cancel is the outline.unsorted, not deleted.handleDeleteFolderreassignsfolderIdtounsortedfor every design that was in the folder, so they remain in theAll Designsview and can be re-foldered later. The active-folder filter resets toallif the deleted folder was selected.Defense in depth:
FolderNavgates the menu items byisDefault, andGallery.tsx'shandleRenameFolder/handleDeleteFolderre-checkisDefaultas a second layer in case the gate is bypassed.Tests: 18 new tests in
src/components/gallery/issue-234-folder-actions.test.tsx— menu wiring, both default-folder gates, dialog pre-fill / disabled-Save / duplicate-name / confirm-payload, and an end-to-end Gallery mount that verifies the delete confirms the design count and the designs survive (withfolderId: unsorted). Full suite green: 1192 passing (was 1174), 96 test files.npm run lintandnpm run buildboth clean. Push toorigin/mainsucceeded (36a56d4..d8a905e).