Skip to content

Conversation

@JammingBen
Copy link
Contributor

fixes #524

@JammingBen JammingBen self-assigned this Oct 1, 2025
Copilot AI review requested due to automatic review settings October 1, 2025 13:47
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 fixes issue #524 by automatically cleaning up failed file uploads when the upload overlay is closed. The fix ensures that failed files are removed from the uppy service when no uploads are running and the user closes the overlay.

  • Refactored UploadInfo component to use composition API for uppy service access
  • Added safeguards to prevent negative item counts during upload progress tracking
  • Implemented automatic cleanup of failed uploads when overlay is closed

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/web-runtime/src/components/UploadInfo.vue Migrated from this.$uppyService to composition API pattern and added failed file cleanup logic
packages/web-pkg/src/services/uppy/uppyService.ts Added removeFailedFiles() method to clean up failed uploads from uppy state

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if (!file.meta.isFolder) {
if (!file.meta.relativeFolder) {
if (!file.meta.relativeFolder && this.itemsInProgressCount > 0) {
Copy link

Copilot AI Oct 1, 2025

Choose a reason for hiding this comment

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

The condition this.itemsInProgressCount > 0 is added to prevent negative counts, but this could mask underlying issues where the count becomes inconsistent. Consider adding logging or debugging information to track when this condition prevents a decrement, which would help identify root causes of count mismatches.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, this is just a quick fix for an edge case scenario where a retry of a failed file would not be added to the count but subtracted eventually => counter can become <0. Solving this the properly would mean quite some refactoring, I'd rather not touch this now.

@JammingBen JammingBen force-pushed the fix/clean-upload-overlay branch from 4ee54db to 8463c0c Compare October 1, 2025 13:56
@JammingBen JammingBen merged commit 1ea3acc into main Oct 2, 2025
28 checks passed
@JammingBen JammingBen deleted the fix/clean-upload-overlay branch October 2, 2025 08:11
@openclouders openclouders mentioned this pull request Oct 2, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI glitch when using policies

3 participants