Skip to content

feat: add upload progress feedback#2960

Merged
premtsd-code merged 3 commits intomainfrom
feat-upload-progress
Apr 9, 2026
Merged

feat: add upload progress feedback#2960
premtsd-code merged 3 commits intomainfrom
feat-upload-progress

Conversation

@premtsd-code
Copy link
Copy Markdown
Contributor

@premtsd-code premtsd-code commented Apr 7, 2026

Summary

  • Pass progress to Upload.Box for real-time progress bars on storage file uploads
  • Add onProgress callbacks to file picker's createFile calls used by CSV/JSON import
  • Show "Uploading X%" on the Select button during file upload in the file picker modal
  • Disable Select button during upload to prevent double-clicks

Dependencies

Upload Progress in Import CSV
image

Upload Progress in buckets add file
image

Pass progress to Upload.Box for real-time progress bars on storage file
uploads. Add onProgress callbacks and percentage display to the file
picker modal used by CSV/JSON import.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 7, 2026

Greptile Summary

This PR wires up real-time upload progress feedback across two upload surfaces: the storage Upload.Box component now forwards file.progress to @appwrite.io/pink-svelte's Upload.Box (enabled by the pink-svelte bump to 8dcaa17), and the file-picker modal shows an "Uploading X%" label on the footer Select button and the small-viewport Upload button during createFile calls, backed by the new onProgress callbacks added to both localFileBucketSelected and bucket-upload code paths.

Key changes:

  • uploadBox.svelte: forwards progress field to Upload.Box — one-line, correct
  • filePicker.svelte: adds uploadProgress state, onProgress callbacks in both createFile branches, progress text in footer and small-viewport button, dismissible={!uploading} on the modal, and disabled={uploading} on Cancel and Select
  • package.json: bumps @appwrite.io/pink-svelte and @appwrite.io/console to commits that expose the required progress prop and onProgress parameter
  • The desktop inline Upload button (inside the file list, {#if !$isSmallViewport}) still shows only "Uploading" without the percentage, unlike its mobile counterpart
  • The Cancel button is now disabled during upload; combined with dismissible={!uploading}, there is no way to abort an in-progress upload

Confidence Score: 5/5

Safe to merge — all remaining findings are P2 style/UX suggestions that do not block functionality.

The core progress-tracking logic is correct and consistent with existing patterns in the uploader store. Both P2 comments (desktop button progress % and Cancel button UX) are improvements, not blockers. No P0/P1 issues found.

src/lib/components/filePicker.svelte — minor inconsistency in progress display and Cancel button UX

Vulnerabilities

No security concerns identified. The progress callbacks only read a numeric value from the SDK response; no user-controlled input flows into security-sensitive paths.

Important Files Changed

Filename Overview
src/lib/components/filePicker.svelte Adds uploadProgress variable and onProgress callbacks to both createFile paths; shows percentage in footer Select button and small-viewport Upload button; disables Cancel + Select during upload and prevents modal dismissal. Two minor issues: desktop inline Upload button omits the progress %, and disabling Cancel leaves no escape from an in-progress upload.
src/lib/components/uploadBox.svelte Passes file.progress through to Upload.Box so the storage upload progress bar renders correctly; depends on the updated @appwrite.io/pink-svelte bump in package.json.
package.json Bumps @appwrite.io/pink-svelte to 8dcaa17 (adds progress prop to Upload.Box, satisfying the declared dependency) and @appwrite.io/console to 467cd21 (exposes onProgress on createFile).

Reviews (3): Last reviewed commit: "fix: prevent modal dismiss during upload..." | Re-trigger Greptile

- Disable Cancel button and set dismissible=false on Modal during upload
- Update @appwrite.io/pink-svelte to 8dcaa17 (progress bar a11y fixes)
@premtsd-code premtsd-code merged commit e4da580 into main Apr 9, 2026
4 of 5 checks passed
@premtsd-code premtsd-code deleted the feat-upload-progress branch April 9, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants