Repository navigation
ui: open the context gauge panel on click as a popover - #32685
Merged
allozaur merged 2 commits intoNov 21, 2026
Merged
Conversation
Assisted-by: Claude (Opus 5.5 Medium)
Assisted-by: Claude (Opus 5.5 Medium)
ServeurpersoCom
approved these changes
Nov 21, 2026
Annieren
pushed a commit
to Annieren/llama.cpp-upstream
that referenced
this pull request
Nov 23, 2026
* ui: open the context gauge panel on click as a popover Assisted-by: Claude (Opus 5.5 Medium) * ui: give the context gauge trigger the ghost button hover Assisted-by: Claude (Opus 5.5 Medium)
Nindaleth
pushed a commit
to Nindaleth/llama.cpp
that referenced
this pull request
Nov 26, 2026
* ui: open the context gauge panel on click as a popover Assisted-by: Claude (Opus 5.5 Medium) * ui: give the context gauge trigger the ghost button hover Assisted-by: Claude (Opus 5.5 Medium)
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.
Overview
The context gauge in the chat form opens its details on click instead of on hover, and closes on a click outside or Escape, so it no longer pops up while the pointer passes over it.
Demo
Recorded at c4e839e; click the preview for the full video.
Additional information
What changed
Popover.Triggerfrom@ggml-org/llama-ui/ui/popover, and the panel is itsPopover.Content(sidetop). bits-ui handles the toggle, outside click, Escape, focus and placement, so the hand-made hover card goes away: the pointer handlers and grace timer ingauge-popup.svelte.ts, the documentpointerdownlistener, the measured position andcontext-gauge-popup.constants.ts.<button>with the accessible name "Context usage". bits-ui gives the content no role, so it getsrole="dialog"andaria-label="Context"to match the trigger'saria-haspopup="dialog".ContextGaugePopup.svelteis split intoContextGaugePanel.svelte(the content, unchanged in look) andContextGaugeDrawer.svelte(the phone's drawer). The chat form renders the drawer only on phones; the phone's corner key toggles it with a tap, as before.gauge-popup.svelte.tskeeps only the shared open state, used by both the popover and the drawer.Testing
In
ui/apps/chat, afternpm ci:npm run checkandnpm run lintpass.tests/client/context-panel.svelte.test.ts(wascontext-panel-mobile): hover does not open the popover, click does, Escape and a click outside close it; the phone still shows the drawer.ChatFormContextGaugestories open the panel with a click and find it by itsdialogrole. Client (332), unit (850) and ChatForm story tests pass.Demo script
Requirements
Claude (Opus 5.5 Medium)