feat: add single resources to store after uploading#1361
Merged
Conversation
ec2775b to
89faee0
Compare
2 tasks
89faee0 to
7811c6e
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the resource fetching behavior after file uploads by implementing selective resource fetching instead of always reloading the entire file list. When 5 or fewer files are uploaded, the system now fetches them individually, reducing server load and eliminating UI flickering.
Key changes:
- Replaced forEach loop with traditional for loop in UppyService for file removal
- Added logic to selectively fetch individual resources vs. full reload based on upload count threshold
- Enhanced test coverage for the new upload completion behavior
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web-pkg/src/services/uppy/uppyService.ts | Replaced forEach with for loop for file removal |
| packages/web-app-files/tests/unit/components/AppBar/CreateAndUpload.spec.ts | Added comprehensive test cases for new upload completion logic |
| packages/web-app-files/src/views/spaces/GenericSpace.vue | Removed Number type from itemId prop |
| packages/web-app-files/src/composables/resourcesViewDefaults/useResourcesViewDefaults.ts | Added extra nextTick call for item highlighting |
| packages/web-app-files/src/components/AppBar/CreateAndUpload.vue | Implemented selective resource fetching logic with upload threshold |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Outdated
Show resolved
Hide resolved
packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Outdated
Show resolved
Hide resolved
packages/web-app-files/src/composables/resourcesViewDefaults/useResourcesViewDefaults.ts
Outdated
Show resolved
Hide resolved
f464d1a to
daff9ec
Compare
daff9ec to
7d23154
Compare
JammingBen
commented
Oct 29, 2025
Comment on lines
+266
to
+268
| for (let i = 0; i < result.successful.length; i++) { | ||
| this.uppy.removeFile(result.successful[i].id) | ||
| } |
Member
Author
There was a problem hiding this comment.
For performance reasons, there may be several thousand files.
Instead of reloading the entire file list. This results in an improved UX and performance. Also, fixes the highlighting of new resources in the files list.
7d23154 to
03fb9a4
Compare
openclouders
pushed a commit
that referenced
this pull request
Oct 30, 2025
…upload feat: add single resources to store after uploading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instead of reloading the entire file list. This results in an improved UX and performance. Also, fixes the highlighting of new resources in the files list.
closes #1358
fixes #1364