Skip to content

webui: fix flicker issue on dismiss animation on overlay primitives#22773

Merged
allozaur merged 2 commits into
ggml-org:masterfrom
vignesh191:primitivesFlickerIssue
May 7, 2026
Merged

webui: fix flicker issue on dismiss animation on overlay primitives#22773
allozaur merged 2 commits into
ggml-org:masterfrom
vignesh191:primitivesFlickerIssue

Conversation

@vignesh191

@vignesh191 vignesh191 commented May 6, 2026

Copy link
Copy Markdown
Contributor

Overview

While working on #22736, I happened to notice that the tooltips on the "+" button flicker on their dismiss animation in ChatFormActionsAdd. This has been an existing issue not related to my changes, but just was a visual annoyance for me. The tooltip fades out, then briefly snaps back to being fully visible before finally unmounting.

You can observe this in either the local Storybook or the actual llama-server. To easily observe, I used Chrome DevTools's animation tab and set it to 25%, to investigate the animation clearly. I observed that animation-fill-mode: none was present on the element, and it causes it to revert to its base styles when the popover/tooltip is dismissed (this is the flicker observed). I believe this is related to bits-ui and how it doesnt do the DOM removal, only until the element's animation finishes, so there's a very brief period where the element has its base styles before being unmounted.

I discovered that this issue is not just for tooltip, but is present on all the overlay elements used in the webui. The fix applies to all 11 overlay components (tooltip, dropdown, popover, dialog, alert-dialog, sheet, select, and backdrops) grepped using AI to find all instances of this closing animation.

I applied the fix which was a small addition of add data-[state=closed]:fill-mode-forwards next to the existing exit-animation classes so its base regular styles are not interfering with the dismiss animation.

Additional information

Before fix (with flicker):

flickering.mov

After fix (no flicker):

noflicker.mov

I validated this manually using a local llama-server build

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: Yes, AI was used to understand tw-animate-css style usage in this repo, and to grep all instances of this issue and make the diff in the appropriate places

@vignesh191 vignesh191 requested a review from a team as a code owner May 6, 2026 17:52
@vignesh191 vignesh191 changed the title Primitives flicker issue webui: fix flicker issue on dismiss animation on overlay primitives May 6, 2026
@vignesh191

vignesh191 commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

@allozaur sorry for opening multiple webui related PRs recently 😅 , but I would appreciate if I can get a review on this and #22736, as time permits. Thanks!

@allozaur

allozaur commented May 6, 2026

Copy link
Copy Markdown
Contributor

@allozaur sorry for opening multiple webui related PRs recently 😅 , but I would appreciate if I can get a review on this and #22736, as time permits. Thanks!

Hey, no worries, thanks for the contributions! Will have both of these reviewed soon

@allozaur allozaur requested a review from ServeurpersoCom May 6, 2026 22:09
@allozaur allozaur merged commit e358d75 into ggml-org:master May 7, 2026
6 checks passed
cetarthoriphros pushed a commit to cetarthoriphros/llama.cpp that referenced this pull request May 9, 2026
meh pushed a commit to meh/llama.cpp that referenced this pull request May 10, 2026
rsenthilkumar6 pushed a commit to rsenthilkumar6/llama.cpp that referenced this pull request May 19, 2026
baramofme pushed a commit to baramofme/llama-cpp-turboquant that referenced this pull request May 23, 2026
baramofme pushed a commit to baramofme/llama-cpp-turboquant that referenced this pull request May 23, 2026
winstonma pushed a commit to winstonma/llama.cpp that referenced this pull request May 27, 2026
fewtarius pushed a commit to fewtarius/llama.cpp that referenced this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants