Skip to content

Studio: stop the llama.cpp update banner flickering and show the download size - #6338

Merged
danielhanchen merged 4 commits into
mainfrom
studio-llama-banner-reappear-fix
Jun 18, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
studio-llama-banner-reappear-fix

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Jun 15, 2026 •

Copy link
Copy Markdown
Member

Problem

The llama.cpp update banner flickered: a brief flash when it appears, and again when dismissing it (X) or snoozing it ("Remind me later").

Cause

The banner animated in and out with a motion opacity + scale + translate transition. That transform/opacity transition promotes a GPU compositing layer whose first and last frame can flash for a moment on a real display. It never reproduces headless (the opacity ramps cleanly there), only on actual GPU compositing, which is why it showed up on the desktop/browser but not in automated capture.

Fix

  • Drop the enter/exit animation and render the banner as a plain conditional mount. It now appears and leaves cleanly with no compositing layer to flash, on both appear and dismiss/snooze. Verified frame-by-frame: it renders at opacity:1, transform:none from the first frame, and on dismiss the node is removed within a frame at steady opacity (no fade ramp).

  • Surface the download size. GET /api/llama/update-status now reports update_size_bytes: the size of the prebuilt that Update would fetch (the latest-release asset matching this host's bundle, e.g. linux-x64-cuda13-newer). The banner shows it as whole MB next to the no-restart note, so the cost of the update is clear before clicking.

Notes

  • The size lookup fails open to null (offline, or no matching asset), consistent with the rest of the freshness module; the banner simply omits the size in that case.
  • tsc -b clean on the frontend; backend test_llama_cpp_freshness, test_llama_cpp_update, and test_llama_route all pass.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the useLlamaUpdateCheck hook in use-llama-update-check.ts to stop resetting the visible state when the update check is disabled. This change prevents the banner from blinking during transient state flips (such as brief route or authentication changes) while still stopping the progress animation. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

…load size

The banner animated in and out with a motion opacity + scale + translate
transition. That transform/opacity transition promotes a GPU compositing
layer whose first and last frame can flash for a moment on real displays,
which reads as a flicker on appear and again on dismiss/snooze. Drop the
animation and render the banner as a plain conditional mount: it appears
and leaves cleanly with nothing to flash.

Also surface the download size. update-status now reports the size of the
prebuilt that Update would fetch (the latest-release asset matching this
host's bundle), and the banner shows it as whole MB next to the no-restart
note, so the cost of the update is clear before clicking.
@danielhanchen
danielhanchen force-pushed the studio-llama-banner-reappear-fix branch from c4682fc to 3aca6f7 Compare June 16, 2026 11:00
@danielhanchen danielhanchen changed the title Studio: stop the llama.cpp update banner from blinking on load Studio: stop the llama.cpp update banner flickering and show the download size Jun 16, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@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: b77d40cfb2

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

return None
# The platform suffix is tag-independent (e.g. "linux-x64-cuda13-newer.tar.gz"),
# so derive it from the first platform token rather than stripping the tag.
m = re.search(r"-((?:linux|windows|macos|darwin)-.*)$", installed_asset)

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 Include upstream asset names in size matching

For upstream installs the marker records asset names like llama-...-bin-ubuntu-x64.tar.gz and llama-...-bin-win-cpu-x64.zip (the installer builds those names in studio/install_llama_prebuilt.py:1463 and studio/install_llama_prebuilt.py:1526), and those installs still surface this update banner. Because this regex only accepts suffixes starting with linux, windows, macos, or darwin, update_download_size_bytes() returns None before checking the latest release assets for those supported paths, so the new size label never appears even though the asset exists. Please include the upstream ubuntu/win forms or derive the lookup from the actual marker asset name.

Useful? React with 👍 / 👎.

# Size of the prebuilt that Update would download, for the banner. Only when
# an update is offered; fails open to None (offline / no matching asset).
update_size_bytes = None
if update_available:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Populate the size for source-build updates

When the active install is markerless but _source_build_status() offers a prebuilt, get_update_status() returns that src response before reaching this new size lookup, and LlamaUpdateStatusResponse then defaults the missing update_size_bytes to null. In that source-build update path the resolver already knows the exact asset that the Update button will fetch, but the banner still omits the download size, so the new size display does not work for a supported update scenario.

Useful? React with 👍 / 👎.

update_download_size_bytes now accepts the upstream ggml-org ubuntu-/win-
asset suffixes and falls back to the marker's binary_repo, so the size
resolves for CPU/ROCm prebuilts (the fork publish repo only carries the
app-* and macOS bundles). The source-build update path now populates
update_size_bytes from the resolved asset, matching the marker path.

Both fail open to null. Adds regression tests for the upstream and
source-build size lookups and the route field round-trip.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@danielhanchen

Copy link
Copy Markdown
Member Author

Pushed a follow-up (d118bb7) to surface the download size in two cases where it was being skipped:

  • Upstream prebuilts: update_download_size_bytes now accepts the ubuntu-* and win-* asset suffixes and falls back to the marker's binary_repo. The fork publish repo only carries the app-* and macOS bundles, so the ggml-org CPU/ROCm prebuilts (which still show the banner) were resolving no size.
  • Source builds: the markerless update path now populates update_size_bytes from the resolved asset, matching the marker path.

Both still fail open to null (offline, or no matching asset). Added regression tests for the upstream and source-build lookups plus the route field round-trip. tsc -b clean; test_llama_cpp_freshness, test_llama_cpp_update, and test_llama_route pass (95).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@danielhanchen
danielhanchen merged commit 6c02af8 into main Jun 18, 2026
28 of 34 checks passed
@danielhanchen
danielhanchen deleted the studio-llama-banner-reappear-fix branch June 18, 2026 04:28
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