Skip to content

feat(desktop): add favicons to the Browser panel - #5644

Merged
maria-rcks merged 10 commits into
pingdotgg:mainfrom
chrisdeeming:browser-favicons
Aug 14, 2026
Merged

feat(desktop): add favicons to the Browser panel#5644
maria-rcks merged 10 commits into
pingdotgg:mainfrom
chrisdeeming:browser-favicons

Conversation

@chrisdeeming

@chrisdeeming chrisdeeming commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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.

Before #5270 Before #5644 After #5644
Before #5270 Before #5644 After #5644

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Prepared with GPT-5.6 Codex in T3 Code.


Note

Medium Risk
New untrusted image fetch/decode paths in Electron and stricter hostname gating for external favicon URLs; behavior is heavily tested but touches preview navigation and webview attachment edge cases.

Overview
Adds end-to-end favicon capture for the desktop browser preview: Electron listens for page-favicon-updated, fetches or decodes candidates through FaviconCapture (size limits, format validation, timeouts, rasterization to bounded PNG), and PreviewManager publishes icons into tab state with navigation/webview lifecycle guards.

The web app persists captured icons in a Zustand store keyed by project scope and origin (with environment-host aliases), mirrors live favicons through the preview bridge, and shows them in browser tabs, recent URLs, and local server cards via FaviconImage (captured first, then public fallback).

isPublicFaviconHost and expanded private-network checks block Google’s S2 favicon URL for local, special-purpose, and malformed hostnames so private sites are not leaked to a third party.

Reviewed by Cursor Bugbot for commit 143c2a3. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add favicons to the Browser panel tab bar and empty state cards

  • Captures favicons from Electron WebContents via page-favicon-updated, fetches and normalizes the image, and publishes it into desktop preview tab state through FaviconCapture.ts and Manager.ts.
  • Stores favicons in a persisted Zustand store (browserFaviconStore.ts) keyed by project scope and URL origin, with alias support for loopback/environment hosts, bounded eviction, and localStorage fallback.
  • Renders captured favicons in the tab bar (RightPanelTabs.tsx), recent URL cards, and local server cards, falling back to a public Google S2 provider URL (blocked for private hosts) and then a globe icon.
  • Adds isPublicFaviconHost to browserTargetResolver.ts with comprehensive IPv4/IPv6 and special-purpose range checks; faviconUrlForOrigin now returns null for private/local hosts.
  • Risk: RightPanelTabs and PreviewEmptyState now require new props (desktopByTabId, threadRef) — callers that don't pass them will have type errors.

Macroscope summarized 143c2a3.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: af89d8d7-0454-4ebc-bbf6-829dd38edb1c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 7, 2026
@chrisdeeming
chrisdeeming marked this pull request as ready for review August 7, 2026 19:15
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/web/src/components/RightPanelTabs.tsx Outdated
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/web/src/components/preview/usePreviewBridge.ts
@macroscopeapp

macroscopeapp Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new feature for favicon capture and display with significant scope (~2000+ lines of new logic), security-sensitive hostname classification for determining what data is sent to external favicon providers, and new image processing/network handling capabilities. New features of this magnitude warrant human review.

You can customize Macroscope's approvability policy. Learn more.

Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts
Comment thread apps/desktop/src/preview/Manager.ts Outdated
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Aug 7, 2026
Comment thread apps/desktop/src/preview/Manager.ts
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/web/src/components/preview/usePreviewBridge.ts Outdated
Comment thread apps/web/src/components/preview/usePreviewBridge.ts Outdated
Comment thread apps/web/src/components/preview/usePreviewBridge.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts
Comment thread apps/desktop/src/preview/Manager.ts Outdated
Comment thread apps/desktop/src/preview/Manager.ts Outdated

@t3-code t3-code Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the requested aspect-ratio repair is in place for ordinary landscape and portrait images, and the nat64 and stale-tab-origin follow-ups are fixed. one privacy edge case still blocks approval. focused lint, desktop/web typechecks, diff check, and 139 targeted tests pass at this head.

Comment thread apps/web/src/browser/browserTargetResolver.ts Outdated

@t3-code t3-code Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the trailing-dot privacy bypass is fixed at this head, including repeated dots and shorthand numeric hosts. one aspect-ratio edge case remains in the desktop rasterizer: exif-oriented jpeg favicons use stored jpeg dimensions for scaling, while createImageBitmap applies orientation metadata before the forced resize. this stretches rotated non-square images. the focused 143-test suite, typechecks, lint, diff check, and ci otherwise pass.

Comment thread apps/desktop/src/preview/FaviconCapture.ts

@t3-code t3-code Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one additional storage-fallback blocker from the independent exact-head pass. the privacy repair itself remains verified.

Comment thread apps/web/src/browserFaviconStore.ts

@t3-code t3-code Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the prior single-exif orientation and storage-shadow blockers are fixed, and the multi-sof rejection is in place. one valid multiple-exif case still breaks the display aspect-ratio guarantee. 147 focused tests, desktop/web typechecks, lint, diff check, and required ci pass.

Comment thread apps/desktop/src/preview/FaviconCapture.ts Outdated

@t3-code t3-code Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the conflicting-valid EXIF precedence case is fixed, but the new invalid-first behavior diverges from Chromium and still permits aspect-ratio inversion. 150 focused tests, desktop/web typechecks, lint, diff check, and required ci pass.

Comment thread apps/desktop/src/preview/FaviconCapture.ts Outdated
Comment thread apps/desktop/src/preview/FaviconCapture.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6d1b3fd. Configure here.

Comment thread apps/web/src/browserFaviconStore.ts

@t3-code t3-code Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved exact head 143c2a3ec0d45f99e049abee7da91aa609956ffd. all previously reported favicon privacy, image safety, aspect-ratio, tab race, and storage fallback blockers are resolved. the repeated invalid-first EXIF APP1 case now matches Electron/Chromium behavior. 177 focused tests across 11 suites, scoped desktop/web typechecks, focused lint, diff check, all required CI, and independent Electron/Chromium adversarial probes pass. the only red status is the unrelated, non-required Vercel marketing authorization check.

@maria-rcks
maria-rcks merged commit 710fd0e into pingdotgg:main Aug 14, 2026
16 of 17 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 14, 2026
## What's Changed
* fix(web): simplify the desktop-managed server update banner copy by @t3dotgg in pingdotgg/t3code#6549
* fix(web): show background policy tooltips sooner by @davidhu2000 in pingdotgg/t3code#6506
* feat(desktop): add favicons to the Browser panel by @chrisdeeming in pingdotgg/t3code#5644
* fix(preview): only show browser-ready local servers by @chrisdeeming in pingdotgg/t3code#6021
* perf(build): stop unpacking node_modules wholesale from the Windows asar by @tsouth89 in pingdotgg/t3code#5877

## New Contributors
* @davidhu2000 made their first contribution in pingdotgg/t3code#6506

**Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260814.1089...v0.0.34-nightly.20260814.1090

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260814.1090
juliusmarminge added a commit that referenced this pull request Aug 14, 2026
- ChatView: #5880 auto-settle-on-merge setting flows into effectiveSettled,
  #5644 browser favicon project registration effect, activeProjectRef memo,
  desktopByTabId on both RightPanelTabs mounts
- server: provide ServerSecretStore to the McpSessionRegistry's
  ServerEnvironment layer (#6325 reads publish opt-in per descriptor)
- mobile: 3-way merged main's deltas into the v2 thread screens
  (NewTaskDraftScreen keeps the branch title seed + main's environmentId,
  threadListV2 keeps both new test suites, queries imports deduped)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
juliusmarminge added a commit that referenced this pull request Aug 14, 2026
- ChatView: #5880 auto-settle-on-merge setting flows into effectiveSettled,
  #5644 browser favicon project registration effect, activeProjectRef memo,
  desktopByTabId on both RightPanelTabs mounts
- server: provide ServerSecretStore to the McpSessionRegistry's
  ServerEnvironment layer (#6325 reads publish opt-in per descriptor)
- mobile: 3-way merged main's deltas into the v2 thread screens
  (NewTaskDraftScreen keeps the branch title seed + main's environmentId,
  threadListV2 keeps both new test suites, queries imports deduped)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
juliusmarminge added a commit that referenced this pull request Aug 15, 2026
- ChatView: #5880 auto-settle-on-merge setting flows into effectiveSettled,
  #5644 browser favicon project registration effect, activeProjectRef memo,
  desktopByTabId on both RightPanelTabs mounts
- server: provide ServerSecretStore to the McpSessionRegistry's
  ServerEnvironment layer (#6325 reads publish opt-in per descriptor)
- mobile: 3-way merged main's deltas into the v2 thread screens
  (NewTaskDraftScreen keeps the branch title seed + main's environmentId,
  threadListV2 keeps both new test suites, queries imports deduped)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants