Repository navigation
fix(ui): apply the custom favicon by removing the competing app/favicon.ico - #34920
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
Greptile SummaryMoves the dashboard favicon from the App Router directory into the public assets directory, preventing Next.js from generating a competing icon declaration while retaining the default exported asset
Confidence Score: 5/5The PR appears safe to merge because the asset relocation removes the competing Next.js favicon declaration while preserving the existing default icon The unchanged favicon is moved to the public directory, the explicit
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/public/favicon.ico | Relocates the unchanged favicon into public assets so it remains part of static exports without triggering Next.js App Router icon metadata |
| ui/litellm-dashboard/src/app/layout.test.tsx | Adds focused regression assertions covering the metadata icon endpoint and both required favicon file locations |
Reviews (1): Last reviewed commit: "fix(ui): apply the custom favicon by rem..." | Re-trigger Greptile
|
Closing as stale: no activity in the last 30 days. Feel free to reopen if this is still relevant. |
TLDR
Problem this solves:
<link rel="icon">tags shipped; browsers picked the dead oneHow it solves it:
app/favicon.icotopublic/, so Next stops emitting it/get_faviconas the single declared icon sourceRelevant issues
Fixes #34916
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
The backend was always correct;
/get_faviconredirects to whateverLITELLM_FAVICON_URLholds, and the theme endpoint sets that var. The break was in the exported HTML:src/app/favicon.icotriggers Next's favicon file convention, which injects its own icon link before the one frommetadata.icons, and it points at/favicon.ico?favicon.<hash>.icoat the origin root, a path the proxy does not serve (the export is mounted under/ui). Because that link carriessizes="48x48" type="image/x-icon", browsers prefer it over the unsized/get_favicon, get a 404, and fall back to the generic page icon.Live proxy on localhost:4000, started with a custom favicon configured the same way
/update/ui_theme_settingsconfigures it:Before (built at daf22ec, artifacts as committed); the head carries both links and the tab shows the generic icon instead of the configured one:
After (this branch, UI rebuilt with
npm run buildand served fromlitellm/proxy/_experimental/out); one link, and the tab renders the configured favicon:To reproduce by hand: set a Custom Favicon URL at http://localhost:4000/ui/?page=ui-theme, hit Save Changes, then open the dashboard in a fresh tab (browsers cache favicons per origin, so reuse of an already-poisoned tab can mask the change). The tab icon should now be the configured image.
Note that
litellm/proxy/_experimental/outis refreshed by the periodic "chore: update Next.js build artifacts" job, so this PR only changes source; the shipped export picks the change up on the next artifact refresh.Type
🐛 Bug Fix
Changes
ui/litellm-dashboard/src/app/favicon.icomoves toui/litellm-dashboard/public/favicon.ico. It still exports toout/favicon.ico, which is what/get_faviconserves as the default when no custom URL is set, but public assets are not auto-linked, sometadata.iconsis the only thing declaring an icon.src/app/layout.test.tsxpins all three halves of that contract: metadata points at/get_favicon, nofavicon.icolives in the app directory, and the default icon still ships as a public asset. The middle assertion fails if the file is put back.Final Attestation
Link to Devin session: https://app.devin.ai/sessions/8c271162352643bf90e4191b22d2f21e