feat(desktop): add favicons to the Browser panel - #5644
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3a9eaa2 to
3ab927e
Compare
3ab927e to
dd8186a
Compare
ApprovabilityVerdict: Needs human review This PR introduces a substantial new feature (favicon display in Browser tabs) with ~1400 lines of new production code including complex async favicon capture/rasterization logic, a new persisted Zustand store, and UI components. New features introducing user-facing behavior warrant human review even when well-tested. You can customize Macroscope's approvability policy. Learn more. |
dd8186a to
25e05dd
Compare
25e05dd to
0e08e18
Compare
0e08e18 to
b5f19cb
Compare
b5f19cb to
933b0c6
Compare
933b0c6 to
4da23ae
Compare
4da23ae to
b0a50e6
Compare
b0a50e6 to
ce2fc7a
Compare
ce2fc7a to
e7a89e4
Compare
6ad666c to
e9bd3d6
Compare
e9bd3d6 to
9502d1d
Compare
9502d1d to
8b941a6
Compare
8b941a6 to
004184d
Compare
7a84eeb to
b845a05
Compare
b845a05 to
157a37c
Compare
157a37c to
9aa2bc9
Compare
38d9dc9 to
7dbf34e
Compare
7dbf34e to
819c314
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 819c314. Configure here.
The guest page's favicon is only observable in the main process, so the desktop side captures it from page-favicon-updated, fetches it through the preview session and publishes it on the tab state. The renderer persists it keyed by project and origin. Icons are stored as data urls so they still render when the dev server is stopped, which is the common case on the splash. Bytes are stored verbatim where they fit, since ICO and SVG cannot be decoded by nativeImage. Empty and oversized payloads are rejected, and the captured origin travels with the icon so a sticky field cannot attribute one site's favicon to another.
819c314 to
cedd67a
Compare
Recently used and Local servers rows now show the captured favicon, falling back to the generic icon when there is none. The tab strip previously resolved favicons through Google's s2 service by domain, which cannot reach a developer's machine, so every local site showed a globe. It now prefers the locally captured icon and falls back to the previous behaviour, which also means no request is made to Google for sites already captured.
cedd67a to
c7d9f6e
Compare

What Changed
Capture favicons from desktop preview sessions and show them in recently used sites and browser tabs, with the existing fallback when no captured icon is available.
Why
External favicon lookups cannot resolve local or private sites. Capturing the favicon from the browser keeps those icons accurate and available across sessions.
UI Changes
Recently used sites and browser tabs now show captured site favicons. Screenshots show the state before #5270 (history tracking) was merged, the state before the favicons are displayed, and the state after this PR is merged.
Checklist
I included a video for animation/interaction changesPrepared with GPT-5.6 Codex in T3 Code.
Note
Medium Risk
Touches desktop preview navigation lifecycle and cross-process favicon fetch/rasterization; regressions could affect tab loading or icon display, but changes are largely isolated to preview/browser UI with broad test coverage.
Overview
Adds end-to-end favicon capture for the in-app browser: the desktop
PreviewManagerlistens forpage-favicon-updated, fetches/decodes/rasterizes candidates (with size, byte, and abort/race guards), and exposesfavicon/faviconOriginon preview tab state. Navigation, refresh, webview swap, and tab-close paths were tightened so loads are not blocked on pending navigations, supersededERR_ABORTEDnavigations do not fail the UI, and stale captures cannot overwrite newer pages.On the web side, a persisted
browserFaviconStorekeys icons by scoped project + canonical origin (collapsing localhost vs environment host), queues captures until the thread project/connection is ready, and wiresPreviewFaviconIcon/ tab chrome to prefer captured data URLs over Google’s s2 service—with expandedisPrivateNetworkHostso private/local origins never hit the public favicon provider.Reviewed by Cursor Bugbot for commit c7d9f6e. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add favicons to the Browser panel in the desktop preview
PreviewManager, normalizing them to bounded PNG data URLs (≤8192 bytes, ≤32px) with support for SVG/ICO rasterization via an isolated world and deduplication by content hash.local), backed bylocalStoragewith an in-memory fallback and a 40-entry eviction policy.RightPanelTabs) and empty-state cards (PreviewRecentUrlCard,PreviewLocalServerCard), preferring the captured data URL and falling back to the Google S2 favicon service for public hosts only..local,.localhost,ts.net, bare hostnames, IPv4-mapped IPv6 private ranges).Macroscope summarized c7d9f6e.