Skip to content

Add multi-digit support for overlay badges and tests - #33637

Draft
langleyd wants to merge 12 commits into
developfrom
langleyd/fix-notification-favicon
Draft

Add multi-digit support for overlay badges and tests#33637
langleyd wants to merge 12 commits into
developfrom
langleyd/fix-notification-favicon

Conversation

@langleyd

@langleyd langleyd commented May 27, 2026

Copy link
Copy Markdown
Member

Fix multi-digit notification badge in Windows taskbar overlay

Fix multi-digit overlay badges and add tests
The Windows taskbar overlay reused the favicon's pill expansion code, which pushed multi-digit counts off the 16x16 canvas (e.g. "10" showed as just "0"). Always draw a circle and scale the font down for multi-digit counts instead.

Native windows badges only go to 99+ so we can mimic that.

Adds a Playwright test for favicon and overlay use cases.

Fix multi-digit notification badge in Windows taskbar overlay

The BadgeOverlayRenderer reused the over-baseImage layout for the
standalone 16x16 overlay, which pushed multi-digit badges off the left
of the canvas (e.g. "10" rendered as just "0"). Keep the pill inside
the canvas bounds in the no-baseImage path and reduce its height for
multi-digit counts so the rounded-rect path actually produces a pill.

Adds a Playwright test that bundles favicon.ts with esbuild, drives
the real BadgeOverlayRenderer in Chromium, and writes the resulting
PNGs to disk plus a scaled-up screenshot snapshot for regression
detection.

Include summary for overlay and favicon
Comment thread apps/web/playwright/e2e/favicon/favicon.spec.ts Outdated
Comment thread apps/web/playwright/e2e/favicon/favicon.spec.ts Outdated
Clamp Windows overlay badge at "99+"

The Windows taskbar overlay is only 16x16 px and the platform's own
notification badges clamp at "99+", so do the same here rather than
trying to fit three-digit counts or "1k+" labels into the tiny canvas.
Browser-tab favicons are unaffected and still render larger counts.
…ication-favicon

# Conflicts:
#	pnpm-lock.yaml
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@langleyd
langleyd force-pushed the langleyd/fix-notification-favicon branch from 5dfd4f5 to eb14862 Compare August 26, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants