fix(stems): surface archive job timeouts on mobile - #14539
Open
dylanjeffers wants to merge 1 commit into
Open
Conversation
DownloadTrackArchiveDrawer keyed hasError off jobState.state === 'failed' alone, so a stems archive that never leaves `waiting` spun forever with no error and no retry affordance. #14535 added STEMS_ARCHIVE_POLL_TIMEOUT_MS to useGetStemsArchiveJobStatus and wired the resulting isTimedOut into the web modal, but the mobile drawer was not updated — it destructured only `data`, dropping both isTimedOut and isError. That gap is not hypothetical. During the 2026-07-28 archiver outage the worker lost its Redis locks and held every concurrency slot, leaving 24 jobs parked in `waiting` for ~7 hours. `waiting` is a perfectly valid non-terminal state, so mobile users got an indeterminate spinner that could never resolve, while web users at least got an error and a retry link after 15 minutes. Fold isError and isTimedOut into hasError, matching web exactly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14536.
Problem
DownloadTrackArchiveDrawerkeyedhasErroroffjobState.state === 'failed'alone:A stems archive job that never leaves
waitingis reported as a valid non-terminal state forever, so the drawer spun indefinitely — no error, no retry affordance, no way for the user to tell it would never finish.#14535 added
STEMS_ARCHIVE_POLL_TIMEOUT_MStouseGetStemsArchiveJobStatusand wired the resultingisTimedOutinto the web modal, but the mobile drawer was never updated. It destructured onlydata, dropping bothisTimedOutandisError.Why this isn't hypothetical
During the 2026-07-28 archiver outage the worker lost its Redis locks when
archiver-rediswas recreated, kept all five concurrency slots, and 24 jobs sat inwaitingacross 15 tracks for ~7 hours (AudiusProject/pedalboard#77). Web users got an error and a retry link after 15 minutes. Mobile users got a spinner that could never resolve.Change
Destructure
isErrorandisTimedOutfrom the shared hook and fold them intohasError, matching the web modal exactly:The
!!jobIdguard mirrors web — job-status errors only count once a job actually exists, so a pending create isn't reported as a failed download.No hook changes; the timeout and flag already existed and were simply unused here.
Scope
Deliberately narrow. The error copy shown on both platforms is still the hardcoded "check your connection" string even when the archiver returns a real
failedReason— that's #14537 and unchanged here.Testing
tsc --noEmitclean; confirmed via--listFilesthat the drawer is actually in the checked program.eslint --ext=ts,tsx src/components/download-track-archive-drawer/clean.🤖 Generated with Claude Code