openstack-uicore-foundation 4.2.28-beta.1 → 4.2.28-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ Created: 2026-04-22
4
4
  Author: smarcet@gmail.com
5
5
  Status: COMPLETE
6
6
  Approved: Yes
7
- Iterations: 0
7
+ Iterations: 2
8
8
  Worktree: No
9
9
  Type: Bugfix
10
10
 
@@ -67,6 +67,14 @@ Type: Bugfix
67
67
 
68
68
  **Note:** Build fails with pre-existing PostCSS/SCSS error in schedule-print/styles.module.scss (unrelated to dropzone fix). All 97 tests pass.
69
69
 
70
+ **Iteration 1 Fix:** Added polling guard (`file._pollingActive`) to prevent multiple intervals when server returns 202 for every chunk (not just the final one). Without this, each 202 chunk spawned a separate polling loop, causing request flood.
71
+
72
+ **Iteration 2 Fix:** Fixed request flood (216 HTTP 200 requests for single file) and resource leak on upload cancellation:
73
+ 1. **Root cause**: `file._asyncProcessing = true` was being set for EVERY 202 response. Server behavior: intermediate chunks return HTTP 200, final chunk returns HTTP 202 with `file_id`. The original Iteration 1 code set the flag at line 340 (before the `else if(xhr?.status == 202)` check), causing the flag to be set even for 200 responses, which deferred `chunksUploaded` for all uploads.
74
+ 2. **Fix**: Move `file._asyncProcessing = true` inside the `else if(xhr?.status == 202)` branch AND guard it with `if (fileId)` check. Now the flag is only set when we receive the final 202 chunk with `file_id`.
75
+ 3. **XHR tracking**: Added `this.activeXHRs` Map to track all active XHR requests per file.
76
+ 4. **Cancellation support**: Cancel pending XHRs when file is removed or component unmounts, preventing resource waste.
77
+
70
78
  ## Tasks
71
79
 
72
80
  ### Task 1: Write Reproducing Test (RED)