Repository navigation
Fix: keep badges from losing their rounded shape in Safari - #29
Merged
Merged
Conversation
Badge updates rewrote className, textContent, background and colour on every poll cycle for every registered badge, and once more per child update for a folder badge, whether or not the values had changed. Over a long session that repaint churn left WebKit rasterising the badge's clipped corners torn. Skip the DOM writes when the computed appearance is identical to what the element already shows, and pin the badge to a stable compositing layer so WebKit stops promoting and demoting it as its classes and inline colours change.
SandObserver
force-pushed
the
fix/badge-repaint-safari
branch
from
August 10, 2026 22:16
95d661d to
3f14c08
Compare
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.
Summary
bupd()when the computed appearance matches what the element already shows, tracked per element in aWeakMap.badgeSignature()tobadge-logic.js, covering every returned field that reaches the element, NUL-separated so fields cannot pack into one another..badgeto a stable compositing layer withtransform:translateZ(0)so WebKit stops promoting and demoting it as classes and inline colours change next to the transformed icon wrapper.Testing
All green. Added 4 frontend tests covering signature stability, per-field sensitivity, field packing and the stale variant.
Checklist