Summary
When uploading large files (observed with videos >70MB) to the workspace via the browser interface, the upload silently fails — no error message, no toast, no feedback of any kind. Files under ~70MB upload successfully. Files above that threshold (e.g. 100MB+ video) appear to be accepted by the UI but never land in the workspace.
Steps to Reproduce
- Open the Workspace tab in the browser interface
- Upload a small file (<70MB video) → uploads successfully
- Upload a large file (100MB+ video) → nothing happens — no error, no progress, no confirmation
Expected Behavior
- Large file upload should either:
- Succeed with visible progress feedback and a confirmation once done, OR
- Fail gracefully with a clear user-facing error (e.g. "File too large" or "Upload timed out")
Actual Behavior
- The UI accepts the file selection silently
- No upload progress is shown
- No error is displayed
- No file appears in the workspace
- The user has zero indication of what went wrong
Root Cause Analysis
The file_upload WebSocket message handler in browser_adapter.py passes the entire file as a base64-encoded string in a single WS message payload (content_b64). For large files this causes:
- Browser-side OOM / silent abort — the browser must read the entire file into memory as a base64 DataURL before sending. For 100MB+ files this can silently fail before the WS send even happens.
- No client-side size guard — there is no check before attempting to encode and send; the operation just goes quiet.
- Swallowed exceptions — the
_handle_file_upload method's except block does not broadcast a file_upload_error event back to the frontend, so the UI never learns of the failure.
The WebSocket is initialized with max_msg_size=100 * 1024 * 1024 server-side, but the frontend assembly and encoding step fails well before that limit is reached for very large files.
Suggested Fix
- Add a client-side file size check before attempting to read/encode (configurable hard limit, e.g. 200MB, with a clear error message returned immediately).
- Switch large file uploads to chunked HTTP POST via a dedicated endpoint (e.g.
/api/workspace/upload) instead of embedding the entire file in a WS message. aiohttp supports multipart/streaming natively.
- Always broadcast a
file_upload_error event in the _handle_file_upload except block so the UI can surface the failure to the user.
- Add upload progress feedback (percentage or spinner) so the user knows the operation is in-flight for large files.
Environment
- File type tested:
.mp4 video
- Working threshold: ~70MB
- Failing threshold: ~100MB+
- Interface: Browser (WebSocket via
browser_adapter.py)
Labels: bug, workspace, file-upload, ux
Summary
When uploading large files (observed with videos >70MB) to the workspace via the browser interface, the upload silently fails — no error message, no toast, no feedback of any kind. Files under ~70MB upload successfully. Files above that threshold (e.g. 100MB+ video) appear to be accepted by the UI but never land in the workspace.
Steps to Reproduce
Expected Behavior
Actual Behavior
Root Cause Analysis
The
file_uploadWebSocket message handler inbrowser_adapter.pypasses the entire file as a base64-encoded string in a single WS message payload (content_b64). For large files this causes:_handle_file_uploadmethod'sexceptblock does not broadcast afile_upload_errorevent back to the frontend, so the UI never learns of the failure.The WebSocket is initialized with
max_msg_size=100 * 1024 * 1024server-side, but the frontend assembly and encoding step fails well before that limit is reached for very large files.Suggested Fix
/api/workspace/upload) instead of embedding the entire file in a WS message.aiohttpsupports multipart/streaming natively.file_upload_errorevent in the_handle_file_uploadexcept block so the UI can surface the failure to the user.Environment
.mp4videobrowser_adapter.py)Labels:
bug,workspace,file-upload,ux