Skip to content

Favicon: always the transparent beacon; manifest reachable when signed out - #121

Merged
ib823 merged 2 commits into
mainfrom
claude/codebase-audit-optimization-p6i6co
Aug 8, 2026
Merged

Favicon: always the transparent beacon; manifest reachable when signed out#121
ib823 merged 2 commits into
mainfrom
claude/codebase-audit-optimization-p6i6co

Conversation

@ib823

@ib823 ib823 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Why

Two issues surfaced while verifying #120 in production:

  1. The tab icon turned blue after sign-in. The DynamicFavicon client system replaced the static favicon with /api/favicon's status-plated version — blue plate when authenticated, amber when offline, slate by default. The owner wants the clean transparent beacon in the tab at all times.
  2. /manifest.json was 307-redirected to /login for signed-out visitors: the middleware matcher excludes image extensions but not .json, so the browser's credential-less manifest fetch got HTML and the PWA manifest (and install icons) never loaded pre-login.

What changed

  • DynamicFavicon, useDynamicFavicon and the /api/favicon route are deleted; the tab always shows the static transparent beacon (favicon.ico size ramp + icon.svg) declared in layout metadata. Status signaling stays with in-app UI (SyncChip, banners).
  • manifest.json icons now point at the static beacon PNGs (192/512/maskable/apple-touch) instead of the deleted API, and /api/favicon leaves the middleware public list.
  • /manifest.json joins sw.js and favicon.ico in the middleware's static-file skip — it contains only public branding.

Verification

  • tsc --noEmit clean, next lint --max-warnings=0 clean, production build succeeds
  • 1,126 tests pass across src/ and tests/ suites
  • After deploy: /manifest.json → 200 application/json; tab icon stays the transparent beacon before and after sign-in

🤖 Generated with Claude Code

https://claude.ai/code/session_01TArsz4CrMDAKmeALMozkR5

The middleware matcher excludes image extensions but not .json, so the
browser's credential-less manifest fetch was 307-redirected to /login and
served HTML — no PWA manifest, no install icons, for anyone not signed
in. The manifest joins sw.js and favicon.ico in the static-file skip; it
contains only public branding.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TArsz4CrMDAKmeALMozkR5
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cockpit Ready Ready Preview Aug 8, 2026 11:49pm

The tab icon turned blue after sign-in: DynamicFavicon swapped the static
favicon for /api/favicon's status-plated version (blue connected, amber
offline, slate default). Status belongs to in-app UI, not the favicon —
the tab now always shows the transparent beacon from favicon.ico/icon.svg.

DynamicFavicon, useDynamicFavicon and the /api/favicon route are deleted,
the manifest's icons point at the static beacon PNGs instead of the API,
and /api/favicon leaves the middleware's public list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TArsz4CrMDAKmeALMozkR5
@ib823 ib823 changed the title Let /manifest.json through the middleware Favicon: always the transparent beacon; manifest reachable when signed out Aug 8, 2026
@ib823
ib823 marked this pull request as ready for review August 8, 2026 23:56
@ib823
ib823 merged commit 6ee452d into main Aug 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants