Skip to content

[backport cloud/1.36] feat: add polling fallback for stale asset downloads#7981

Merged
DrJKL merged 1 commit intocloud/1.36from
backport-7926-to-cloud-1.36
Jan 13, 2026
Merged

[backport cloud/1.36] feat: add polling fallback for stale asset downloads#7981
DrJKL merged 1 commit intocloud/1.36from
backport-7926-to-cloud-1.36

Conversation

@DrJKL
Copy link
Contributor

@DrJKL DrJKL commented Jan 13, 2026

Backport of #7926 to cloud/1.36

┆Issue is synchronized with this Notion page by Unito

@DrJKL DrJKL requested a review from a team as a code owner January 13, 2026 02:43
@DrJKL DrJKL added the backport Backporting a PR onto a release candidate label Jan 13, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 13, 2026
@github-actions
Copy link

github-actions bot commented Jan 13, 2026

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 01/13/2026, 03:27:26 AM UTC

📈 Summary

  • Total Tests: 510
  • Passed: 498 ✅
  • Failed: 2 ❌
  • Flaky: 2 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 488 / ❌ 2 / ⚠️ 1 / ⏭️ 8
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 7 / ❌ 0 / ⚠️ 1 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/13/2026, 03:21:13 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@DrJKL DrJKL added the preview label Jan 13, 2026
Adds a polling fallback mechanism to recover from dropped WebSocket
messages during model downloads.

When downloading models via the asset download service, status updates
are received over WebSocket. Sometimes these messages are dropped
(network issues, reconnection, etc.), causing downloads to appear
"stuck" even when they've completed on the backend.

Periodically poll for stale downloads using the existing REST API:

- Track `lastUpdate` timestamp on each download
- Downloads without updates for 10s are considered "stale"
- Poll stale downloads every 10s via `GET /tasks/{task_id}` to check if
the asset exists
- If the asset exists with size > 0, mark the download as completed

- Added `lastUpdate` field to `AssetDownload` interface
- Use VueUse's `useIntervalFn` with a `watch` to auto start/stop polling
based on active downloads
- Reuse existing `handleAssetDownload` for completion (synthetic event)
- Added 9 unit tests covering the polling behavior

- All existing tests pass
- New tests cover:
  - Basic download tracking
  - Completion/failure handling
  - Duplicate message prevention
  - Stale download polling
  - Polling error handling

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7926-feat-add-polling-fallback-for-stale-asset-downloads-2e36d73d3650810ea966f5480f08b60c)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@DrJKL DrJKL force-pushed the backport-7926-to-cloud-1.36 branch from d81b57b to d732c1d Compare January 13, 2026 03:19
@DrJKL DrJKL merged commit 7f83af3 into cloud/1.36 Jan 13, 2026
23 of 25 checks passed
@DrJKL DrJKL deleted the backport-7926-to-cloud-1.36 branch January 13, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate preview size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant