chore(mobile): name the two project favicon caches by their job - #13160
Conversation
The in-flight request registry and the SQLite-backed cache both shipped as projectFaviconCache.ts, and the mobile singleton reused the shared factory's name. Rename the registry to lib/projectFaviconRequests, the persistence adapter to lib/projectFaviconDatabaseCache, and its singleton to projectFaviconDatabaseCache so each file says what it does.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a self-contained mechanical rename that separates favicon request bookkeeping from the database-backed cache without changing their implementations, storage keys, or call-site behavior. Tests and all mobile references were updated accordingly, with no product-default or static-analysis configuration changes. You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Limit details: You’ve used all 10 included reviews currently available. 📝 WalkthroughWalkthroughThe mobile project favicon cache is separated into request and database-cache modules. The database-backed cache is renamed to ChangesProject favicon cache
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The rename and documentation updates preserve favicon request and database-cache behavior, so the change is mergeable with normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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.
Dismissing prior approval to re-evaluate c325978
There was a problem hiding this comment.
All clear
Posted via Macroscope — Effect Service Conventions
The registry keeps an entry alive while any view stays mounted, not only during the network load, and its current-URL bookkeeping is per cache key. Comment-only.
Dismissing prior approval to re-evaluate bfcf42c
## What's Changed * chore(mobile): drop dead nitro-markdown tgz override and @expo/metro-runtime by @juliusmarminge in pingdotgg/t3code#13148 * feat(web): show settings scope as a sentence at the top of the page by @juliusmarminge in pingdotgg/t3code#13139 * refactor(web): move settings scope pickers into breadcrumbs by @Yash-Singh1 in pingdotgg/t3code#13165 * feat(auth): share provider sign-in flows and credential bindings by @juliusmarminge in pingdotgg/t3code#12983 * refactor(mobile): git sheets use uniwind platform variants instead of className ternaries by @juliusmarminge in pingdotgg/t3code#13161 * chore(mobile): name the two project favicon caches by their job by @juliusmarminge in pingdotgg/t3code#13160 * revert(mobile): git sheets back to Platform.OS ternaries (un-guarded uniwind variants broke both platforms) by @juliusmarminge in pingdotgg/t3code#13169 * docs(mobile): document the two mobile routes that intentionally skip deep links by @juliusmarminge in pingdotgg/t3code#13164 * refactor(mobile): break module cycles with focused extractions by @juliusmarminge in pingdotgg/t3code#13151 * fix(server): generate PR diffs from branch changes by @Yash-Singh1 in pingdotgg/t3code#13170 * fix(web): preserve nested scroll behavior in chat timeline by @Yash-Singh1 in pingdotgg/t3code#13167 * test(web): cover usage model ordering without static markup by @flamboh in pingdotgg/t3code#13104 * fix(desktop): find linuxbrew node for the WSL backend by @CodyRay in pingdotgg/t3code#7827 * chore(models): use GPT-6 Luna for text generation by @extoci in pingdotgg/t3code#13115 * fix(mobile): keep ordinary offline outbox failures out of console.warn by @juliusmarminge in pingdotgg/t3code#13144 * feat(providers): check remote compatibility ranges by @juliusmarminge in pingdotgg/t3code#13130 * chore(lint): keep mobile theme escape-hatch allowlist honest by @juliusmarminge in pingdotgg/t3code#13146 * fix(web): the pull request badge reads at the meta size again by @juliusmarminge in pingdotgg/t3code#13175 * fix(mobile): uniwind platform variants stay guarded on both platforms by @juliusmarminge in pingdotgg/t3code#13172 * refactor(mobile): git sheets use uniwind platform variants instead of className ternaries by @juliusmarminge in pingdotgg/t3code#13185 * refactor(mobile): remaining className platform ternaries become class variants by @juliusmarminge in pingdotgg/t3code#13188 * fix(web): align provider emails without clipping by @Derpedyea in pingdotgg/t3code#13174 * perf(mobile): recycle the default v2 home list and scope the snooze minute tick by @juliusmarminge in pingdotgg/t3code#13149 * refactor(mobile): retire the legacy grouped thread list by @juliusmarminge in pingdotgg/t3code#13183 * fix(server): background PR checks spend less GitHub quota by @juliusmarminge in pingdotgg/t3code#13189 * fix(server): background PR sync reads summaries in batches by @juliusmarminge in pingdotgg/t3code#13198 * fix(server): GitHub PR lookups stop probing owner-qualified heads by @juliusmarminge in pingdotgg/t3code#13200 * chore(mobile): clear the legacy-list deletion fallout by @juliusmarminge in pingdotgg/t3code#13203 ## New Contributors * @CodyRay made their first contribution in pingdotgg/t3code#7827 **Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260922.2123...v0.0.43-nightly.20260923.2135 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260923.2135
The problem
Mobile shipped two different
projectFaviconCache.tsfiles with the same basename and different jobs:src/components/projectFaviconCache.tstracked in-flight favicon image requests, whilesrc/lib/projectFaviconCache.tswas the SQLite-backed persistent cache. The mobile singleton was also namedprojectFaviconCache, the same name as the shared client-runtime factory it calls. Navigation and agents routinely landed on the wrong file (mobile audit item #9 flagged this collision).The fix
Pure renames plus two module doc comments — no behavior changes:
src/components/projectFaviconCache.ts(+ test) →src/lib/projectFaviconRequests.ts, since it is request bookkeeping, not a cache, and has no React in it. Added a module comment saying it pairs with the database cache.src/lib/projectFaviconCache.ts(+ test) →src/lib/projectFaviconDatabaseCache.ts, and its singletonprojectFaviconCache→projectFaviconDatabaseCache, so it no longer shadows thecreateProjectFaviconCachefactory name from@t3tools/client-runtime/project-favicon-cache.ProjectFavicon.tsx,state/assets.ts,state/client-cache-state.ts,connection/environment-cache-store.ts). The public function names in the request module are unchanged.Left alone deliberately: the
client-runtimepackage file (cross-app contract, not flagged in the audit) and every other file in the audit's broader naming findings — one collision per PR.Verification
vp test run src/lib/projectFaviconRequests.test.ts src/lib/projectFaviconDatabaseCache.test.ts— 9 passed (both suites cover the renamed modules directly).tsc --noEmitforapps/mobile— clean.vp lint apps/mobile/src— no new findings on touched files (the oneProjectFavicon.tsxwarning is pre-existing on untouched lines).Not applicable: screenshots — no visual or runtime change; the diff is renames, identifier updates, and comments.
Model: Claude Opus 5 via Codex, working inside T3 Code.
Summary by CodeRabbit
Refactor
Documentation
Tests