Skip to content

fix(ui): preserve custom favicons across navigation - #48318

Open
tanishqbaweja wants to merge 2 commits into
BerriAI:mainfrom
tanishqbaweja:litellm_fix_34916_custom_favicon
Open

tanishqbaweja wants to merge 2 commits into
BerriAI:mainfrom
tanishqbaweja:litellm_fix_34916_custom_favicon

Conversation

@tanishqbaweja

@tanishqbaweja tanishqbaweja commented Oct 25, 2026 •

Copy link
Copy Markdown

Saving a custom favicon currently works until dashboard navigation restores the default browser-tab icon. Keep the selected icon across navigation and cover saving, reloading and navigation with a browser regression

Details

TLDR

Problem this solves:

  • Dashboard navigation replaces the saved custom favicon

How it solves it:

  • Keep the fallback icon outside changing route metadata
  • Export the unchanged default icon as a public asset
  • Test the selected icon through real browser navigation

Intentional product change: Saved custom favicons remain visible after dashboard navigation

App Router restores icon metadata after UI Theme has applied the custom URL. The app-directory favicon also injects a competing root URL that returns 404 behind the proxy. Rendering the fallback link from the persistent root layout prevents navigation from replacing the saved selection

User Flow

Before, opening Home restores the default icon

  1. Sign in and open http://127.0.0.1:41475/ui/ui-theme/
  2. Set Custom Favicon URL to the local orange image and click Save Changes
  3. Reload and confirm the saved URL and orange browser-tab icon
  4. Click Home and observe the default blue icon return

Before, Home restores the default icon

After, opening Home keeps the chosen icon

  1. Sign in and open http://127.0.0.1:41475/ui/ui-theme/
  2. Set Custom Favicon URL to the local orange image and click Save Changes
  3. Reload and confirm the saved URL and orange browser-tab icon
  4. Click Home and observe the orange icon remain

After, Home retains the custom icon

Relevant issues

Fixes #34916

Earlier PR #34920 investigated the competing app-directory icon and closed unmerged. Current main also replaces the theme's selected URL during navigation, which the new regression covers

Pre-Submission checklist

  • I have added meaningful tests
  • The handful of test files covering my change pass locally
  • My PR passes all required CI/CD checks
  • My PR's scope is as isolated as possible and solves one problem
  • Every automated review on the latest commit has finished and its findings are addressed

The new Playwright regression fails on unchanged main and passes on the final production export, one test in 5.6 seconds. Five affected frontend files pass, 34 tests covering theme settings, dashboard layout and its integration, chat layout and connect layout. Three existing backend favicon tests also pass against the unchanged backend

Production build and typecheck, changed-file Prettier, full CI ESLint, lint budgets, knip and git diff --check pass. ESLint reports zero errors and 3349 existing warnings. The default E2E typecheck has two existing Promise.withResolvers errors on both main and this branch. It passes with --lib ES2024,DOM,DOM.Iterable

All four required CI gates pass, including unit tests, lint, smoke tests and cost-map validation. The coverage job also passes. Automated code reviews have not been posted, so that checklist item remains unverified

The OSV scan reports the same three advisories as unchanged main, two for filelock 3.32.7 and one for the development dependency @azure/msal-node 6.0.1. This PR changes no dependencies or lockfiles. The separate proposal #48302 tracks that scan failure

Screenshots / Proof of Fix

Both revisions ran as production dashboard exports served by the real proxy and PostgreSQL. The backend stayed at the before revision. Headed Chromium used 1440x900 and 390x844 page viewports, with touch emulation on the latter. Window screenshots and recordings include the browser tab

The included local image server serves http://127.0.0.1:51477/favicon.png and favicon-alt.png. No browser requests were intercepted, and this settings workflow requires no LLM inference. The evidence includes images, the server, driver, raw screenshots and reports

Before (dddbaa8)

Desktop

  1. Follow User Flow at 1440x900 and observe the default icon after Home, shown above
  2. Save the cyan image URL and click Home again, which restores the default again
  3. Reset to Default and reload, retaining the default icon

Desktop recording

Phone

  1. Repeat at 390x844 with touch, opening navigation before Home
  2. Observe the same replacement for both custom URLs in the phone screenshot
  3. Reset to Default and reload, retaining the default icon

Phone recording

After (7975e11)

Desktop

  1. Follow the same flow at 1440x900 and observe the orange icon after Home, shown above
  2. Save the cyan image URL and click Home again, retaining the cyan icon
  3. Reset to Default and reload, restoring the default icon

Desktop recording

Phone

  1. Repeat at 390x844 with touch, opening navigation before Home
  2. Observe both custom icons persist in the phone screenshot
  3. Reset to Default and reload, restoring the default icon

Phone recording

Type

Bug Fix

Caveats

Low

  • Existing runtime-config and static-prefetch 404s occur on both revisions
  • Default E2E typechecking has two existing standard-library errors
  • OSV reports the same dependency advisories as unchanged main

QA runbook

  • tests/e2e/ui/tests/migration/migratedPages.spec.ts, keeps the configured favicon after navigating from UI Theme to Home
    • Sign in as an admin and note the original UI Theme settings
    • Set Custom Favicon URL to the proxy's absolute /ui/next.svg URL, then save
    • Reload and confirm that the saved URL remains in the field
    • Click Home and confirm that the browser tab retains the custom image
    • Inspect the icon links and confirm each uses that URL and returns the saved image bytes
    • Restore the original settings
    • Sanity check that reverting the fix makes navigation replace the selected icon URL

@tanishqbaweja
tanishqbaweja marked this pull request as ready for review October 25, 2026 15:16
@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@CLAassistant

CLAassistant commented Nov 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
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.

Inconsistency in custom favicon: favicon set via UI Theme Customization is not applied to the browser tab

2 participants