Bundle curated suggestion icons, render list offline#403
Open
theoden8 wants to merge 3 commits into
Open
Conversation
f9e629c to
c41996d
Compare
Render the suggestions list through a network-free icon read path backed by committed bundled assets, warm the cache at add-time only, and reconcile fmain/fdroid suggestion defaults once the list makes zero outbound requests.
Suggestion tiles resolve icons from local sources only (committed bundled asset, else a host-derived monogram) and never hit the network, so opening the suggestions list contacts no third party. With that guarantee, fdroid ships the same curated defaults as fmain. Offline resolution lives at the widget layer because UnifiedFaviconImage renders via CachedNetworkImage; a URL-returning icon_service helper would still fetch bytes at render. Adds a regen runner for optional bundled logos (never run by the build) and a zero-network regression test.
Commit pinned PNG favicons for the community/open-source suggestions (Bluesky, Codeberg, Gitea, GitLab, Hugging Face, Mastodon) under assets/suggested_icons/. Big corporate brands keep monograms to avoid shipping trademarked logo binaries. Assets are committed inputs, not fetched at build time, so reproducibility holds.
c41996d to
304d1bd
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.
Add a network-free icon read path for the suggestions list and commit bundled favicon assets for curated defaults, so opening the add-site screen makes zero outbound requests. This lets fdroid and fmain ship identical suggestions defaults.
Changes:
Implementation plan:
icon_service.dartthat consults bundled assets, in-memory caches, and persisted disk cache only—never calls_proxiedClient. On miss, resolves to placeholder.assets/suggested_icons/(keyed deterministically by suggestion host) and register inpubspec.yaml.scripts/to fetch current favicons forkDefaultSuggestionsand write assets; never invoked by the build.flavorDefaultSuggestionsto returnkDefaultSuggestionsfor all flavors (drop fdroid empty branch).outboundHttp.clientFor()is never called while rendering curated suggestions.Key invariants:
https://claude.ai/code/session_01Ey8jYLEX9yyRyFAEkKz7eU