Skip to content

Revert "Studio: keep a Downloads entry when the list is empty" - #10298

Merged
Etherll merged 3 commits into
unslothai:mainfrom
Etherll:revert-pr-9849
Sep 5, 2026
Merged

Etherll merged 3 commits into
unslothai:mainfrom
Etherll:revert-pr-9849

Conversation

@Etherll

@Etherll Etherll commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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

  • Hide the Downloads panel when there are no jobs and restore its expanded default (studio/frontend/src/features/hub/download-manager/download-manager-panel.tsx:193).
  • Remove the Resume control and Downloads-owned transport conflict flow.
  • Persist active downloads only (studio/frontend/src/features/hub/download-manager/download-manager-state.ts:302).
  • Restore automatic cleanup for cancelled and failed rows (studio/frontend/src/features/hub/download-manager/poll-loop.ts:269).
  • Remove the overlay and resumable-download tests introduced by Studio: keep a Downloads entry when the list is empty #9849.
  • Preserve the later Studio: keep download restart toasts job-scoped #10136 job-scoped restart-toast handling.

Related

Reverts #9849

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-04T15:07:07.884324Z 25a6e05 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines 39 to 43
export function __resetDownloadManagerForTests(): void {
runtimeRegistry.reset();
resetDownloadApiAdapterState();
resetHydrationState();
setState(createDownloadManagerInitialState());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e5b3c96: restored web-session download reset and added same-tab and cross-tab regression coverage.

@Etherll

Etherll commented Sep 4, 2026 •

Copy link
Copy Markdown
Collaborator Author

UI evidence

Tested merge base 0ee6cefcfe45538961d0efbc911a016819d8995d against exact PR head 25a6e05d5403f3440bf4e7c03d797a474bd32b10 in isolated Studio installs with the same authenticated empty-download state (Headless Chrome 131, 1500x900).

Before and after: the empty Downloads panel is removed

  • Before: the Downloads control opens an empty panel with No downloads yet and the Model Hub link.
  • After: no Downloads control or panel is present when there are zero rows.
  • Facts: fab_present true -> false, panel_present_after_open true -> false, download_row_count 0 -> 0.

Observed result matches the intended revert.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 25a6e05: live idle polls now apply the explicit missing-target verdict before the grace period, with regression coverage.

@Etherll

Etherll commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@Etherll

Etherll commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

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".

@Etherll

Etherll commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@Etherll

Etherll commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 25a6e05d54

ℹ️ 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".

@Etherll
Etherll merged commit ecb2083 into unslothai:main Sep 5, 2026
37 checks passed
danielhanchen added a commit that referenced this pull request Sep 6, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants