Skip to content

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

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

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

Conversation

@langleyd
Copy link
Copy Markdown
Member

@langleyd langleyd commented May 27, 2026

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
langleyd added 2 commits May 28, 2026 13:26
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
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.

3 participants