Gallery folder creation uses window.prompt instead of an in-app dialog #73
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#73
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?
Where:
src/pages/Gallery.tsx:362-385(New Folder button).Bug: The button calls
window.prompt('Enter folder name:')(line 365). Native prompt is blocking, unstyled, breaks the visual language, and bypasses keyboard focus management.Fix consistent with existing patterns:
Mirror
src/components/gallery/DeleteDialog.tsx. Concretely:src/components/gallery/NewFolderDialog.tsxwith the same prop shape asDeleteDialog(open,onClose,onConfirm(name), plusexistingFolders: string[]for duplicate-name check).Gallery.tsx: addconst [showNewFolder, setShowNewFolder] = useState(false); replace the button onClick with() => setShowNewFolder(true); render<NewFolderDialog open={showNewFolder} onClose={() => setShowNewFolder(false)} onConfirm={handleCreateFolder} existingFolders={folders.map(f => f.name)} />near the existingDeleteDialogmount.Acceptance: the New Folder button opens an in-app modal; Cancel/Confirm/Escape all behave like the rest of the app.