UX: in-app name dialog, drag-and-drop upload, empty-folder fix (#69, #70, #71) #72

Merged
Cordy merged 1 commit from feat/ux-fixes into main 2026-07-30 03:03:09 +00:00
Owner

Three dogfood findings from Nikola (2026-07-30).

#71 — empty folder threw Cannot read properties of null (reading 'length'). Root cause was server-side: an empty directory produced a nil slice, so GET /api/v1/files emitted "items": null and the client blew up on items.length. Fixed at the source (normalise to []) and defensively in the client (?? []), plus a proper "This folder is empty" status instead of a silent blank table.

#69 — native prompt() replaced with a branded dialog. New folder, Rename, and Move now use an in-app <dialog> matching the share/settings styling: prefilled input with the basename preselected (extension stays visible), Enter/Escape, and inline validation for empty names, /, and name-already-taken — caught before the request instead of surfacing as a failed API call.

#70 — drag-and-drop upload. Dropping files anywhere in the app uploads them to the current directory through the existing pipeline (direct POST under 16 MiB, TUS with progress and resume above it, per-destination in-flight guard). An overlay shows the destination path while dragging. Armed only in the files view — a new currentView flag keeps it off in Shares/Deleted/search — and the document-wide handler stops the browser from navigating away when a stray drop lands outside the target. The upload loop is now shared with the file picker rather than duplicated.

New i18n strings in all four languages. gofmt/vet/build/test + node --check on the extracted UI script green on the runner.

Three dogfood findings from Nikola (2026-07-30). **#71 — empty folder threw `Cannot read properties of null (reading 'length')`.** Root cause was server-side: an empty directory produced a nil slice, so `GET /api/v1/files` emitted `"items": null` and the client blew up on `items.length`. Fixed at the source (normalise to `[]`) *and* defensively in the client (`?? []`), plus a proper "This folder is empty" status instead of a silent blank table. **#69 — native `prompt()` replaced with a branded dialog.** New folder, Rename, and Move now use an in-app `<dialog>` matching the share/settings styling: prefilled input with the basename preselected (extension stays visible), Enter/Escape, and inline validation for empty names, `/`, and name-already-taken — caught before the request instead of surfacing as a failed API call. **#70 — drag-and-drop upload.** Dropping files anywhere in the app uploads them to the current directory through the existing pipeline (direct POST under 16 MiB, TUS with progress and resume above it, per-destination in-flight guard). An overlay shows the destination path while dragging. Armed only in the files view — a new `currentView` flag keeps it off in Shares/Deleted/search — and the document-wide handler stops the browser from navigating away when a stray drop lands outside the target. The upload loop is now shared with the file picker rather than duplicated. New i18n strings in all four languages. gofmt/vet/build/test + `node --check` on the extracted UI script green on the runner.
feat(ui): in-app name dialog, drag-and-drop upload, empty-folder fix (#69, #70, #71)
All checks were successful
ci / test-and-build (pull_request) Successful in 22s
3c564fe6db
Cordy merged commit 12106b14e6 into main 2026-07-30 03:03:09 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#72
No description provided.