Repository navigation
feat(favicons): site icons on the tabs and the new tab, kept inside the app - #100
Merged
Merged
Conversation
…he app - A tab downloads the icon its page announced (or /favicon.ico) through its own session, keeps it per host in the profile (favicons/, at most 500) and points the tab at that copy. The icon of the page being left no longer stays on the next one: it shows the new host's saved icon or the globe. A private tab keeps its icon in memory only and never writes to the profile. - The new tab draws those icons on its tiles (the letter stays as the fallback), on a light circle so dark icons stay visible, and asks once, in the background, for the icons of favorites it never saw load. A site is one tile: a recent page of a site already listed is left out. - joychromium://favicon is served only with a per-run key that the shell and the internal pages are handed, so a web page cannot probe which sites were visited; the reply is sandboxed and not sniffed. Clearing browsing data clears the icons too. - Fix: opening a private tab threw "Attempted to register a second handler" when the block lists were loaded, because the ad blocker registers global ipcMain handlers once per session. A private tab could not be opened at all. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tabsdownloads the icon the page announced (or/favicon.icowhen it announces none) through the tab's own session, keeps it per host in the profile (favicons/, at most 500, oldest dropped) and points the tab at the kept copy. Navigating no longer leaves the previous page's icon on the tab: it shows the new host's saved icon, or the globe./favicon.icofetched once, in the background (a failure is retried after 10 minutes, not forgotten). A site is one tile: a recent page of a site already listed is left out.joychromium://faviconneeds a random per-run key that only the shell and the internal pages receive. The reply issandboxed andnosniff, and only real image bytes are kept (sniffed, not trusted from the header, ≤ 128 KB).Bug found on the way (existed on
main)Opening a private tab threw
Attempted to register a second handler for '@ghostery/adblocker/inject-cosmetic-filters'when the block lists were loaded, so a private tab could not be opened at all. The blocker registers two globalipcMainhandlers per session;AdBlock.enableInnow drops the earlier ones first (also used when the engine is swapped). Covered by the private-tab test infavicons.spec.ts, which only exercises it when the lists are available (network or cache), so not on every CI run.Test plan
npm run typechecknpm test(113 passed): the store, the safe reading of an icon, the file limit and the private modenpm run test:e2e(53 passed, 3 skipped): tab icon and its file, no stale icon, page cannot read it with no key or a wrong one,/favicon.icofallback, private tab, new tab tiles with background fetch and no repeated site🤖 Generated with Claude Code