Repository navigation
Revert "Studio: keep a Downloads entry when the list is empty" - #10298
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9917da7120
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export function __resetDownloadManagerForTests(): void { | ||
| runtimeRegistry.reset(); | ||
| resetDownloadApiAdapterState(); | ||
| resetHydrationState(); | ||
| setState(createDownloadManagerInitialState()); |
There was a problem hiding this comment.
Restore the web-session download reset
When a web user logs out or another tab changes the auth session, this removal leaves the previous session's runtime registry, hydration flag, persisted active jobs, and queued storage writes intact. On the next login, hydrateDownloadManager() remains short-circuited by its stale hydrated flag, while the new account can see or control rows retained from the prior account. Keep the auth-session listeners and storage-clearing reset even though failed/cancelled resume rows are being removed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in e5b3c96: restored web-session download reset and added same-tab and cross-tab regression coverage.
UI evidenceTested merge base
Observed result matches the intended revert. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5b3c96d06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| if (status.state === "idle") { | ||
| handleIdleAfterProgress(rt, key, madeProgress, progressResp); | ||
| handleIdleAfterProgress(rt, key, madeProgress); |
There was a problem hiding this comment.
Retire explicitly missing idle targets immediately
When a live poll reports state === "idle" together with target_present: false or a measured missing cache, this call no longer passes the progress response through the existing idleProbeVerdict check. The job therefore remains running until the 60-second IDLE_EVICT_GRACE_MS expires, during which hasActiveOrPendingStart blocks the user from starting the now-missing variant again and the panel falsely shows an active download. Keep the explicit "gone" verdict ahead of the grace-period logic; only ambiguous or still-present idle targets need the delay.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 25a6e05: live idle polls now apply the explicit missing-target verdict before the grace period, with regression coverage.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Two regressions in the bottom-right overlay rail shipped to main and had to be undone by hand. Neither failed a test on the way in. #9849 dropped `jobKeys.length === 0` from the Downloads panel's early return, so a fresh install carried a download FAB on the corner with nothing behind it. Reverted by #10298. #10117 copied the desktop updater's min-h floor onto the llama.cpp banner while making its changelog render only once opened, so the card reserved 204.2px and painted 147.3px and the stack sat 64.9px off the corner. Fixed by #10229. Both suites ran on #10117 and both passed. No fixture produced the empty-notes state; every geometric check read the outer slot, which is the element carrying the floor; and the source suite was edited in the same commit to assert the floor was present, turning the bug into a pinned contract. Adds two fast node tests that run on every frontend PR on ubuntu and windows, inside the existing npm test step, for about a second between them: - download-panel-not-permanent.test.ts matches the guard through the AST and evaluates the whole condition three-valued with the empty test pinned true, so an inverted or partial guard cannot satisfy it. - overlay-rail-floor-gating.test.ts enumerates the rail's children out of provider.tsx and applies a rule rather than a spelling: a floor may only be reserved when the thing it protects is on screen. Both gates resolve against the components that actually render the shared notes layout root. In the browser suite the dead-space probe now runs over every flowed card instead of two named banners, the corner is measured off the bottom-most painted surface rather than the rail's padding box, and the Downloads overlay is checked absent by exact card count. Both rails carry a data-testid so the probe can find the rail when no banner is up. Every check was verified to fail at the commits that shipped the bugs, and seven mutations across two review rounds are confirmed caught.

Summary
Reverts the merged commit from #9849 in full. Restores the earlier Downloads behavior: the panel only appears when jobs exist, and cancelled or failed downloads are removed
instead of being retained for Resume.
Changes
studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx:193).studio/frontend/src/features/hub/download-manager/download-manager-state.ts:302).studio/frontend/src/features/hub/download-manager/poll-loop.ts:269).Related
Reverts #9849