Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Oct 10, 2025

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

@JammingBen JammingBen self-assigned this Oct 10, 2025
@JammingBen JammingBen force-pushed the feat/resource-fetch-after-upload branch 3 times, most recently from ec2775b to 89faee0 Compare October 13, 2025 10:47
@JammingBen JammingBen force-pushed the feat/resource-fetch-after-upload branch from 89faee0 to 7811c6e Compare October 13, 2025 10:50
@JammingBen JammingBen marked this pull request as ready for review October 13, 2025 11:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JammingBen JammingBen force-pushed the feat/resource-fetch-after-upload branch 2 times, most recently from f464d1a to daff9ec Compare October 13, 2025 11:14
@JammingBen JammingBen marked this pull request as draft October 15, 2025 12:28
@JammingBen JammingBen force-pushed the feat/resource-fetch-after-upload branch from daff9ec to 7d23154 Compare October 29, 2025 11:59
@JammingBen JammingBen changed the title feat: proper resource fetch after upload feat: add single resources to store after uploading 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)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@JammingBen JammingBen force-pushed the feat/resource-fetch-after-upload branch from 7d23154 to 03fb9a4 Compare October 29, 2025 12:06
@JammingBen JammingBen marked this pull request as ready for review October 29, 2025 13:57
@JammingBen JammingBen requested a review from kulmann October 29, 2025 14:00
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 💪

@kulmann kulmann merged commit 9e14b44 into main Oct 30, 2025
28 checks passed
@kulmann kulmann deleted the feat/resource-fetch-after-upload branch October 30, 2025 13:31
openclouders pushed a commit that referenced this pull request Oct 30, 2025
…upload

feat: add single resources to store after uploading
@openclouders openclouders mentioned this pull request Oct 30, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tiles view is missing highlight on newly uploaded resources Don't always reload entire folder content after upload

3 participants