Skip to content

fix(downloads): show error when stems archive job polling fails#14519

Open
dylanjeffers wants to merge 3 commits into
mainfrom
fix/stems-archive-polling-error
Open

fix(downloads): show error when stems archive job polling fails#14519
dylanjeffers wants to merge 3 commits into
mainfrom
fix/stems-archive-polling-error

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Problem

The "Download All" stems zip modal (DownloadTrackArchiveModal) could get permanently stuck showing "Zipping files" — no error, no way out.

Root cause: isError from useGetStemsArchiveJobStatus was never included in the modal's hasError check. When the polling query fails or the backend stalls, TanStack Query preserves the last-known { state: 'active' } data, so hasError stays false and the spinner loops forever.

Changes

  • DownloadTrackArchiveModal.tsx — destructure isError from useGetStemsArchiveJobStatus and add (!!jobId && isJobStatusError) to the hasError expression, so a failing poll surfaces the existing error UI (with a "Try again" action).
  • useDownloadTrackStems.ts — add a hard 5-minute timeout to the refetchInterval callback so polling stops even if the job never transitions out of active, preventing runaway polling on a stalled job.

Testing

Not exercisable in a local preview (requires the archiver backend and a failed/stalled job). Logic verified by inspection.

🤖 Generated with Claude Code

dylanjeffers and others added 3 commits July 2, 2026 11:05
OverrideProperties<Event, {eventData}> loses the optional permalink
property because type-fest's Merge/Simplify chain doesn't fully
distribute through the doubly-nested intersection that Event resolves to.

Intersect Pick<Event, 'permalink'> explicitly so the type survives and
ContestScreen can access contest.permalink without a TS2339 error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
permalink was speculatively added to EventSDK and the common Event model
but the API does not return it. Remove it from both the SDK type and the
common model, revert the useRemixContest Pick<Event, 'permalink'> patch,
and drop contest?.permalink from ContestScreen's useCallback dep array.

Fixes TS2339 and the exhaustive-deps lint warning in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The "Download All" stems zip modal could get permanently stuck showing
"Zipping files" with no error and no way out. When the polling query
failed or the backend stalled, TanStack Query preserved the last-known
{ state: 'active' } data, so hasError stayed false and the spinner
looped forever.

- Include isError from useGetStemsArchiveJobStatus in the modal's
  hasError check so a failing poll surfaces the error UI.
- Add a hard 5-minute timeout to the refetchInterval so polling stops
  even if the job never transitions out of 'active'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f2f37dc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

1 participant