Skip to content

Commit c325978

Browse files
chore(mobile): tighten the new favicon module comments
Correct the request-registry comment: it tracks active URLs and loaded keys, it does not coalesce loads. Merge the database cache comment so the client_cache/Settings note stays visible next to the export.
1 parent b154862 commit c325978

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎apps/mobile/src/lib/projectFaviconDatabaseCache.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ export async function downscaleProjectFavicon(
7878
throw new Error("Project icon thumbnail exceeds the cache limit.");
7979
}
8080

81-
/** Rows live in `client_cache` so Settings → Client storage counts and clears them. */
8281
/**
8382
* The database-backed project favicon cache. Named apart from the shared
8483
* `createProjectFaviconCache` factory it calls and from the in-flight request
85-
* registry in `projectFaviconRequests`.
84+
* registry in `projectFaviconRequests`. Rows live in `client_cache` so
85+
* Settings → Client storage counts and clears them.
8686
*/
8787
export const projectFaviconDatabaseCache = createSharedProjectFaviconCache({
8888
storage: {

‎apps/mobile/src/lib/projectFaviconRequests.ts‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/**
2-
* Tracks in-flight favicon image loads so several `ProjectFavicon` views for the
3-
* same project share one network request, and remembers which keys have already
4-
* loaded to suppress refetch churn. Request bookkeeping only — persistence lives
5-
* in `projectFaviconDatabaseCache`.
2+
* Request bookkeeping behind `ProjectFavicon`: tracks which favicon URLs are
3+
* currently loading per cache key, keeps only the most recent URL per project
4+
* current, and remembers which keys have already loaded so superseded or
5+
* already-shown loads settle without churn. This is not request coalescing —
6+
* each mount still issues its own load — and it is not the cache; persistence
7+
* lives in `projectFaviconDatabaseCache`.
68
*/
79
export interface ProjectFaviconRequest {
810
readonly cacheKey: string;

0 commit comments

Comments
 (0)