From 9b1daba07ae6bb37c6995da6329dac53458bea38 Mon Sep 17 00:00:00 2001 From: Roland Date: Sun, 2 Aug 2026 19:21:49 -0600 Subject: [PATCH] ui: size the five modals that had never been sized These five carried no `size` at all, so they rendered at Mantine's 440px default -- a width nobody had chosen, inherited from the library rather than decided. Roland audited them: FileBrowser rename small (440, unchanged) FileBrowser move large (620) FileBrowser ignore small (440, unchanged) FileBrowser make directory large (620) Files filter small (440, unchanged) The three "unchanged" ones are written down rather than left implicit, so the decision lives in the source and a future change to Mantine's default cannot move them. Roland asked for `medium` on the ignore dialog and there is no such modal size: the vocabulary is mini/tiny/small/large/fullscreen, and Mantine has no token between 440 and 620. An unknown name would have passed through untranslated, rendered at 440 anyway, and left the source claiming otherwise -- which is what the size guard in ui.test.js was added to catch. Asked rather than guessed; `small` was the answer, and the guard would have failed the build either way. Verified in the browser rather than from the props: move 620, make directory 620, ignore 440, rename 440. Move and ignore need a selection before they can be opened, so a directory was selected first. 1134 jest / 64 suites, clean npm run build. The full suite needs `--maxWorkers=2` on this machine at the moment: at load average 38 four unrelated suites (ControllerPage, CollectionReorganizeModal, CollectionTagModal, Flasher) time out and the run takes 183s instead of 5s. They pass in isolation and with reduced parallelism; nothing in this change touches them. --- app/src/components/FileBrowser.js | 10 ++++++---- app/src/components/Files.js | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/components/FileBrowser.js b/app/src/components/FileBrowser.js index 705ac6b2..1c6ca81b 100644 --- a/app/src/components/FileBrowser.js +++ b/app/src/components/FileBrowser.js @@ -643,7 +643,8 @@ export function RenameModal({open, onClose, path, onSubmit, onPending}) { setValue(pathName(path)); }, [path]); - return @@ -710,7 +711,7 @@ export function MoveModal({open, paths, onClose, onSubmit}) { {destination ? fileCell(destination + '/' + pathName(i)) : fileCell(pathName(i))} ); - return @@ -775,7 +776,8 @@ export function IgnoreDirectoryModal({open, onClose, onSubmit, directory, ignore onClick={handleIgnore} >{ignored ? 'Un-ignore' : 'Ignore'}; - return + // Audited: `small` (440px), which is the width it already had. + return {header} {content} @@ -812,7 +814,7 @@ export function MakeDirectoryModal({open, onClose, parent, onSubmit}) { } } - return + return Make Directory
diff --git a/app/src/components/Files.js b/app/src/components/Files.js index 5530fd8e..55338212 100644 --- a/app/src/components/Files.js +++ b/app/src/components/Files.js @@ -398,7 +398,8 @@ export function SearchFilter({filters = [], modalHeader, size = 'medium'}) { if (filters && filters.length > 0) { return <> - setOpen(false)} closeIcon> + {/* Audited: unchanged at `small` (440px), recorded so the default cannot move it. */} + setOpen(false)} closeIcon> {modalHeader || Filter}