Skip to content

Display favicons for browser website entries - #18099

Merged
AmethystLiang merged 2 commits into
mainfrom
favicon-for-website-entries
Sep 2, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
favicon-for-website-entries

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​126 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​118
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​107 $\color{#cf222e}{\Huge{\mathbf{−}}}$​58 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​49

Problem

Browser website entries show only a generic globe icon, making it harder to distinguish between different pages at a glance in tabs, history, and search results.

Solution

Capture favicon URLs from web pages as they load and display them in browser tabs, history rows, and search/palette results. Falls back to the globe icon if a favicon fails to load or is unavailable.

What Changed

  • New BrowserFavicon component handles favicon display with fallback to globe icon
  • Browser page state now captures and stores favicon URLs
  • Browser history entries store favicon URLs and refresh them when pages update
  • Updated browser tabs, history search, palette, and worktree jump components to display favicons
  • Added favicon URL to TypeScript types and zod schemas

Testing

  • Added unit tests for favicon capture and display
  • Updated existing tab and search tests to include favicon expectations
  • Tested favicon display in tabs, history rows, and search results

Visual Proof

TODO: Favicon display in browser tabs, history, and search results

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Folder workspaces, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Capture favicons from pages as they load and persist them with browser
history entries. Display favicons in tabs, tab creation search results,
and palette searches to improve visual recognition of websites and help
users identify pages at a glance.
@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 33289d4f-9b81-4e7a-9308-97f9e609938d

📥 Commits

Reviewing files that changed from the base of the PR and between c962ecb and 267ed8c.

📒 Files selected for processing (5)
  • src/renderer/src/components/browser-favicon.tsx
  • src/renderer/src/components/tab-bar/BrowserTab.test.tsx
  • src/renderer/src/store/slices/browser.test.ts
  • src/renderer/src/store/slices/browser/browser-history-actions.ts
  • src/renderer/src/store/slices/browser/browser-page-state-actions.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/renderer/src/components/tab-bar/BrowserTab.test.tsx
  • src/renderer/src/store/slices/browser/browser-history-actions.ts
  • src/renderer/src/store/slices/browser/browser-page-state-actions.ts
  • src/renderer/src/store/slices/browser.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds a shared BrowserFavicon component with URL validation and image-failure fallback. Browser history entries now store optional favicon URLs and update them when page state changes. Navigation callbacks pass favicon data into history actions. Palette search results carry favicon URLs into browser tabs, history rows, and simulator rows. Tests cover persistence, parsing, propagation, and rendering.

Merge Risk: 🔵 Low · up to 267ed

Favicons from visited pages are stored and may later load remote images in tabs, history, and search, which can permit tracking or requests to attacker-selected network endpoints after the original page is no longer active. Existing validation and fallback behavior limit the impact, but security-owner awareness or follow-up on restricting these requests is recommended before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, solution, implementation scope, and testing, but it does not follow the required template. It omits the ELI5, Why, Linked Issue, Review, AI Disclosure, and Agent … Complete the required template sections, provide the linked issue after “Fixes #”, attach before-and-after visual proof or write N/A with a reason if applicable, complete the ELI5 and Why sections, address AI Disclosure and Agent skill upst…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 21 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: displaying favicons for browser website entries.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, solution, implementation scope, and testing, but it does not follow the required template. It omits the ELI5, Why, Linked Issue, Review, AI Disclosure, and Agent skill upstream boundary sections. Visual Proof is still marked TODO, and the required checklist items remain unchecked.

Resolution

Complete the required template sections, provide the linked issue after “Fixes #”, attach before-and-after visual proof or write N/A with a reason if applicable, complete the ELI5 and Why sections, address AI Disclosure and Agent skill upstream boundary, and update the testing and checklist entries with the actual verification results.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: cdb67228-e0e8-47ee-9c9a-916886bf82a5

📥 Commits

Reviewing files that changed from the base of the PR and between bf88bca and c962ecb.

📒 Files selected for processing (21)
  • src/renderer/src/components/browser-favicon.tsx
  • src/renderer/src/components/browser-pane/host-guest/attach-browser-page-webview.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-webview-navigation-handlers.ts
  • src/renderer/src/components/tab-bar/BrowserTab.test.tsx
  • src/renderer/src/components/tab-bar/BrowserTab.tsx
  • src/renderer/src/components/tab-bar/TabBarCreateEntry.history.test.tsx
  • src/renderer/src/components/tab-bar/TabBarCreateEntryRow.tsx
  • src/renderer/src/components/tab-bar/open-tab-entry-dedupe.test.ts
  • src/renderer/src/components/tab-bar/open-tab-search.test.ts
  • src/renderer/src/components/tab-bar/open-tab-search.ts
  • src/renderer/src/components/tab-bar/open-tab-selection-routing.test.ts
  • src/renderer/src/components/worktree-jump-palette-browser-simulator-rows.tsx
  • src/renderer/src/lib/browser-palette-search.test.ts
  • src/renderer/src/lib/browser-palette-search.ts
  • src/renderer/src/store/slices/browser.test.ts
  • src/renderer/src/store/slices/browser/browser-history-actions.ts
  • src/renderer/src/store/slices/browser/browser-page-state-actions.ts
  • src/renderer/src/store/slices/browser/browser-slice-contract.ts
  • src/shared/browser-workspace-types.ts
  • src/shared/workspace-session-browser-schema.ts
  • src/shared/workspace-session-schema.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@pullfrog pullfrog 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.

ℹ️ Minor suggestions only — the favicon retry semantics change is worth a look; otherwise this is a clean, well-tested PR.

Reviewed changes

  • New BrowserFavicon component — shared <img>-with-globe-fallback that centralizes favicon rendering and URL validation (http/https/data:image only).
  • History favicon capture — addBrowserHistoryEntry gains an optional faviconUrl; handleTitleUpdate passes faviconUrlRef.current.
  • History favicon refresh — updateBrowserPageState updates the matching history entry when a page's favicon changes.
  • Type/schema + display surfaces — faviconUrl threaded through BrowserHistoryEntry, the zod session schema, open-tab-search, browser-palette-search, and the tab/history/palette rows.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Reset the favicon failure cache when the favicon URL changes, enabling
retry of a previously failed favicon when navigating back to the same
URL. Distinguish between explicit null (clear cached favicon) and
omitted (don't update history), so stale favicons don't persist
incorrectly.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Fixed favicon retry after navigation — BrowserFavicon now resets failedUrl during render on any favicon identity change (including clearing to null while a page loads), so navigating back to a previously-failed URL retries instead of staying on the globe fallback.
  • Distinguished "unchanged" from "cleared" for history favicons — addBrowserHistoryEntry and updateBrowserPageState now treat undefined as "leave the stored favicon alone" and null as "clear it", with tests covering both paths.

The prior review's retry-semantics concern is cleanly addressed, and the new tests would fail without the render-time reset, so they're genuine coverage rather than theatre.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@AmethystLiang
AmethystLiang merged commit 8dc3c1d into main Sep 2, 2026
28 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Display favicons for browser website entries

Capture favicons from pages as they load and persist them with browser
history entries. Display favicons in tabs, tab creation search results,
and palette searches to improve visual recognition of websites and help
users identify pages at a glance.

* Fix favicon retry on back navigation after load failure

Reset the favicon failure cache when the favicon URL changes, enabling
retry of a previously failed favicon when navigating back to the same
URL. Distinguish between explicit null (clear cached favicon) and
omitted (don't update history), so stale favicons don't persist
incorrectly.
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.

1 participant