[Bug] File upload drop target does not accept dropped files reliably #31

Open
opened 2026-07-14 20:08:42 +02:00 by zemion · 3 comments
Owner

Problem / User Need

The file upload drop target currently does not work reliably. Users expect to drag files into the upload area and have them accepted.

Acceptance Criteria

  • Dropping files onto the upload drop target triggers the same upload flow as selecting files manually.
  • Rejected drops show a clear reason.
  • The behavior is covered by a focused UI/component regression test where feasible.
## Problem / User Need The file upload drop target currently does not work reliably. Users expect to drag files into the upload area and have them accepted. ## Acceptance Criteria - Dropping files onto the upload drop target triggers the same upload flow as selecting files manually. - Rejected drops show a clear reason. - The behavior is covered by a focused UI/component regression test where feasible.
zemion added the
type
bug
priority
p1
status
ready
module/files
area/webui
codex/ready
labels 2026-07-14 20:08:42 +02:00
Author
Owner

Codex State: done

Summary

  • Fixed unreliable upload drops by passing the intended file target directly instead of relying on immediate dialog state updates.
  • Upload rejection paths now surface clear errors for missing permission, missing destination, connector targets, and non-file drops.

Changed Files

  • webui/src/features/files/FilesPage.tsx

Verification

  • GOVOPLAN_WEBUI_MODULE_PACKAGES=@govoplan/files-webui npm run build in govoplan-core/webui passed.

Next / Blocked

  • Close after the govoplan-files change is committed and pushed.
## Codex State: done ### Summary - Fixed unreliable upload drops by passing the intended file target directly instead of relying on immediate dialog state updates. - Upload rejection paths now surface clear errors for missing permission, missing destination, connector targets, and non-file drops. ### Changed Files - `webui/src/features/files/FilesPage.tsx` ### Verification - `GOVOPLAN_WEBUI_MODULE_PACKAGES=@govoplan/files-webui npm run build in govoplan-core/webui passed.` ### Next / Blocked - Close after the govoplan-files change is committed and pushed.
Author
Owner

Codex State: done

Summary

  • Follow-up fix: hardened the shared FileDropZone used by the upload dialog so filesystem drops are accepted on dragenter/dragover, propagation is stopped, and files are extracted from DataTransfer.files or DataTransfer.items.
  • Files upload dialog now displays an explicit error when a dialog drop is rejected instead of silently ignoring it.
  • The main file pane also now consumes file drops to avoid the browser opening the dropped file.

Changed Files

  • /mnt/DATA/git/govoplan-core/webui/src/components/FileDropZone.tsx
  • webui/src/features/files/FilesPage.tsx

Verification

  • GOVOPLAN_WEBUI_MODULE_PACKAGES=@govoplan/files-webui npm run build in govoplan-core/webui passed.

Next / Blocked

  • Please hard refresh the running dev page; if the dialog still ignores drops, check the browser console/network panel while dropping because the event path should now either upload or show an error.
## Codex State: done ### Summary - Follow-up fix: hardened the shared FileDropZone used by the upload dialog so filesystem drops are accepted on dragenter/dragover, propagation is stopped, and files are extracted from DataTransfer.files or DataTransfer.items. - Files upload dialog now displays an explicit error when a dialog drop is rejected instead of silently ignoring it. - The main file pane also now consumes file drops to avoid the browser opening the dropped file. ### Changed Files - `/mnt/DATA/git/govoplan-core/webui/src/components/FileDropZone.tsx` - `webui/src/features/files/FilesPage.tsx` ### Verification - `GOVOPLAN_WEBUI_MODULE_PACKAGES=@govoplan/files-webui npm run build in govoplan-core/webui passed.` ### Next / Blocked - Please hard refresh the running dev page; if the dialog still ignores drops, check the browser console/network panel while dropping because the event path should now either upload or show an error.
Author
Owner

Codex State: progress

Summary

  • Extended the upload-dialog drop zone to extract files not only from DataTransfer.files, but also from DataTransferItem.getAsFile(), Chromium file-system handles, and legacy webkit entries.
  • If the browser still exposes only an unreadable URI/path, the warning now says that explicitly instead of asking for a file again.

Changed Files

  • /mnt/DATA/git/govoplan-core/webui/src/components/FileDropZone.tsx
  • webui/src/features/files/FilesPage.tsx

Verification

  • GOVOPLAN_WEBUI_MODULE_PACKAGES=@govoplan/files-webui npm run build in govoplan-core/webui passed.

Next / Blocked

  • Retest after hard refresh. If the red unreadable-file warning remains, the drag source/browser is not exposing file contents to web apps; selecting via the file picker should still work and the remaining work is source/browser-specific diagnostics.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - Extended the upload-dialog drop zone to extract files not only from DataTransfer.files, but also from DataTransferItem.getAsFile(), Chromium file-system handles, and legacy webkit entries. - If the browser still exposes only an unreadable URI/path, the warning now says that explicitly instead of asking for a file again. ### Changed Files - `/mnt/DATA/git/govoplan-core/webui/src/components/FileDropZone.tsx` - `webui/src/features/files/FilesPage.tsx` ### Verification - `GOVOPLAN_WEBUI_MODULE_PACKAGES=@govoplan/files-webui npm run build in govoplan-core/webui passed.` ### Next / Blocked - Retest after hard refresh. If the red unreadable-file warning remains, the drag source/browser is not exposing file contents to web apps; selecting via the file picker should still work and the remaining work is source/browser-specific diagnostics. Suggested status label: `status/in-progress`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-files#31
No description provided.