Repository navigation
Studio: dismiss the llama.cpp update toast once the job finishes - #9199
danielhanchen merged 18 commits into
Conversation
A late /update-status poll that left while the job was still running could land after success and re-pin the Updating toast, which has no close button. Ignore that stale snapshot, serialize the polls, and drive the progress UI from the job state. Co-authored-by: Cursor <[email protected]>
|
The update itself succeeded. By the time the toast was stuck, What's stuck is the in-progress UI: On the tag mismatch: What actually pins it: /update-status can be slow , and the banner polls every 500ms with overlapping fetches. A poll that went out while the job was still running can land after a later poll already saw success, flip applying back on, and stop the timer. No dismiss button, so it sits there until reload. Opened #9199 for this — serialize the polls, ignore a late running snapshot once we've already adopted the job as finished, and drive the progress UI off job.state so a stale applying flag can't pin the card |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Cursor <[email protected]>
|
@danielhanchen done—dropped banner override + updated test; kept hook-only fix |
This comment has been minimized.
This comment has been minimized.
Recheck availability after terminal jobs, order status responses by a client-side request sequence, and bound each serialized request so polling cannot remain latched.
Keep the job poll active when the immediate post-terminal status read fails, then stop only after a valid reconciliation arrives without repeating completion effects.
Assign each backend operation an opaque ID and key terminal reconciliation to it so a distinct job cannot be mistaken for a retry of an earlier terminal snapshot.
Apply the client-side deadline only to serialized active-job polling while initial, reminder, and force-refresh discovery checks retain the backend timeout.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@danielhanchen, can you please review this change to determine whether this PR is still required? |
This comment has been minimized.
This comment has been minimized.
Per review, drop the /update-job-status endpoint, the poll-orchestration source test, and the unrelated project-source-save comment edits. Keep the late-running-snapshot guard in the update hook.
|
@danielhanchen — narrowed this per your suggestion. Kept only the hook guard: a late Dropped from this PR:
Rebased onto current |
|
Review record for #9199, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#470. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
Problem
Clicking Update on the llama.cpp toast installs the new prebuilt, but the toast can stay on "Updating llama.cpp..." with a half-filled bar and no close button, even though the backend job already reports
success. Reported in #9196.The job poll is a 500 ms
setIntervalwith an async body, so fetches overlap. A poll that left while the job was stillrunningcan resolve after a later poll already sawsuccessand cleared the timer. It then setsapplyingback to true, and nothing is left polling to clear it.Fix
Each poll checks it still belongs to the live timer before touching state; a response from a cleared or replaced poller is dropped. 5 lines in
use-llama-update-check.ts, backend unchanged.Verification
tests/llama-update-poll-race.test.tsdrives the real hook with stubbed React and controlled fetch ordering (running poll resolves after the success poll). It fails on main (applyingendstrue) and passes here.Fixes #9196