Replace the inlined New-Folder modal in FolderNav with the shipped NewFolderDialog shadcn component (which has duplicate-name detection the inline form lacks) #134
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#134
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/NewFolderDialog.tsxis a complete, working shadcn/ui modal for creating a new folder in the Gallery. It has duplicate-name detection, input validation, and keyboard handling. It has no importers.src/components/gallery/FolderNav.tsxinlined its own folder-creation modal instead of using this component.The Gallery has TWO implementations of the new-folder modal: the shadcn one (correct) and the inlined one (in
FolderNav.tsx). Consolidating to use the real component is the right fix.Where
src/components/gallery/NewFolderDialog.tsx(95 lines, full shadcn/ui Dialog with Header/Content/Footer, Input, Button, useRef for autofocus, useEffect for reset, isDuplicate detection, isInvalid guard)src/components/gallery/FolderNav.tsx(lines 122-160, the inline<form>for new folder creation)src/components/gallery/issue-112-aria.test.tsx(180-186) already tests thegetByPlaceholderText(/folder name/i)andqueryByPlaceholderTextbehavior on the inlined formSuggested fix shape
Replace the inlined form in
FolderNav.tsxwith<NewFolderDialog>. The component already acceptsopen,onOpenChange,existingFolders,onConfirm— all the props the inlined form needs. The wiring is mechanical:FolderNav.tsx: replace the localuseStatefor "showing the new folder form" with adialogOpenboolean<NewFolderDialog open={dialogOpen} onOpenChange={setDialogOpen} existingFolders={folders.map(f => f.name)} onConfirm={handleAdd} />issue-112-aria.test.tsxto query the new dialog structure (thegetByPlaceholderTextshould still work sinceNewFolderDialoguses<Input placeholder="Folder name...">)The benefits:
NewFolderDialog(currently missing fromFolderNav's inline form — silent name collisions possible)Severity
Medium. The inlined form works but lacks the duplicate-name detection the real component has. Two users creating "Holiday Designs" would silently produce two folders.
Discovered by
Gap analysis (2026-10-02) of unreached components.
Related
src/components/gallery/issue-112-aria.test.tsx— tests the inlined form, will need updating to the dialog structure1788bdc— "fix(gallery): replace window.prompt 'New Folder' with an inline modal" — that fix was correct (window.prompt was worse), but the inlined version is now superseded by the real component.Closed by commit
a6741adon origin/main (fix(gallery): use shipped NewFolderDialog shadcn component instead of inlined form).Replaced FolderNav's inlined new-folder form with the shipped NewFolderDialog component (the one that already existed but had no importers). The new dialog adds the duplicate-name detection that the inline form was missing.
Tests:
Full vitest suite: 539/559 pass — 20 remaining failures are pre-existing (ExportDialog getThreadCatalog mock gap, SettingsModal thread-library count assertions, issue-128 right-panel testids) unrelated to #134.
role="dialog"andaria-modal="true"but no focus management, so Tab can move focus to the underlying page #168