Conversation
findFaviconURLs returned nil whenever cachedMetadata did, so a feed whose home page couldn't be fetched got no favicon at all -- for as long as the failure record lasted, 11 days after a 4xx. But the last candidate it appends, scheme://host/favicon.ico, needs no HTML to find. cachedMetadata returns nil in two different situations: the download is still in flight, or it isn't coming. Only the first is worth waiting for. HTMLMetadataDownloader now tracks the second and answers metadataIsUnavailable, posting htmlMetadataAvailable so existing observers re-query. Sync accounts feel this most, since Miniflux, Feedly, ReaderAPI and local accounts never set iconURL or faviconURL -- those are JSON-Feed-only -- so scraping the home page is their only route to an icon. Hacker News is a good example: it declares only y18.svg, which we filter, leaving favicon.ico as the sole candidate. Also fixes the verdict that suppresses future lookups. currentHomePageHasOnlyFaviconICO was one flag, written when candidates were built and read later, asynchronously, once some home page ran out of them. Different home pages interleave, so it often belonged to a different site than the one being finalized. It's now a set keyed by home page, and a transient failure -- which SingleFaviconDownloader reports as a nil error -- no longer counts as an answer about the site. Candidate assembly moves to a pure faviconCandidates function, which makes the decision table testable. Adds an ImagesTests target, the first for this module. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dave-atx
force-pushed
the
favicon-home-page-fallback
branch
from
September 9, 2026 01:32
30ac118 to
e332dcd
Compare
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.
fixes #5421
findFaviconURLs returned nil whenever cachedMetadata did, so a feed whose home page couldn't be fetched got no favicon at all -- for as long as the failure record lasted, 11 days after a 4xx. But the last candidate it appends, scheme://host/favicon.ico, needs no HTML to find.
cachedMetadata returns nil in two different situations: the download is still in flight, or it isn't coming. Only the first is worth waiting for. HTMLMetadataDownloader now tracks the second and answers metadataIsUnavailable, posting htmlMetadataAvailable so existing observers re-query.
Sync accounts feel this most, since Miniflux, Feedly, ReaderAPI and local accounts never set iconURL or faviconURL -- those are JSON-Feed-only -- so scraping the home page is their only route to an icon. Hacker News is a good example: it declares only y18.svg, which we filter, leaving favicon.ico as the sole candidate.
Also fixes the verdict that suppresses future lookups. currentHomePageHasOnlyFaviconICO was one flag, written when candidates were built and read later, asynchronously, once some home page ran out of them. Different home pages interleave, so it often belonged to a different site than the one being finalized. It's now a set keyed by home page, and a transient failure -- which SingleFaviconDownloader reports as a nil error -- no longer counts as an answer about the site.
Candidate assembly moves to a pure faviconCandidates function, which makes the decision table testable. Adds an ImagesTests target, the first for this module.