# refactor\(web\): remove unused runtime wrappers and exports · PR \#10225 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/10225)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: cleanup-web/runtime-internals

Target branch: main

Head commit: fba39bb8718bbce6c08c66d7647616b4fe93127f

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/10225)

[Commits](https://git.cafe/pingdotgg/t3code/pull/10225/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/10225/diffs?format=markdown)

## Description

---

Knip identified unused hooks, auth wrappers, atoms, and re-export aliases in the web runtime. Remove dead wrappers and keep implementation details private where they still have local callers.

Preserve the bootstrap functions used through the primary-environment barrel, their existing tests, and all exported types and Effect schemas. This rebased revision also makes the newly landed web favicon downscaler private while retaining its local cache caller.

Core UI component modules are unchanged. Their named subcomponents are preserved as complete component sets.

Layer 1 of 4 in the web runtime-export cleanup stack.

Verification at the integrated stack tip: `vp run --filter @t3tools/web test` passes all 4,052 tests across 333 files. Web typecheck and changed-file lint/format pass. `vp run knip:check` passes. A negative probe confirmed that a wholly unused `components/ui/*.tsx` file still fails the file audit.

Model: gpt-6 astra. Harness: Codex in T3 Code.


<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Add persistent project favicon cache, PR terminal timestamps, and remaining-quota usage display
> - Adds a persistent project favicon cache backed by IndexedDB (web) and the mobile database with native image downscaling. A new `createProjectFaviconUrlAtom` family replaces the old `useAssetUrl` hook, retaining the last resolved icon across failures and serving hydrated cache images before remote refresh.
> - Adds optional `closedAt` and `mergedAt` fields to pull-request and change-request schemas across all providers (GitHub, GitLab, Bitbucket, Azure DevOps). `pullRequestSettles` in [ThreadSettlementPolicy.ts](https://github.com/pingdotgg/t3code/pull/10225/files#diff-1a7b1b5c03173a900198d178092ff4a33f844a21a2fa2486c7cd3df14821c106) now uses the state-specific terminal timestamp instead of `updatedAt`, so metadata updates after a merge or close no longer re-settle a thread.
> - Switches usage-limit displays from "used" to "remaining" quota and time. Both web and mobile refresh paths gain a shared `refreshUsage` workflow with explicit concurrency guards and abort-on-disconnect behavior.
> - `makeEnvironmentThreadState` in [threads.ts](https://github.com/pingdotgg/t3code/pull/10225/files#diff-3389d9e86e5f65222bc1be800d0aa21f5356629eaf916680112dcbd606822815) now retains synchronization errors and cached data after terminated loads, does not restart fatal loads on connection notifications, and clears errors only on actual retry.
> - Replaces direct Lucide refresh/loader icons with shared `RefreshIcon` and `Spinner` components across many web and mobile settings, chat, and file-preview components. Migrates mobile adaptive color classes to semantic theme tokens (danger, warning, primary, secondary, subtle).
> - Risk: `BitbucketPullRequestProvider` now always returns null for `mergedAt`/`closedAt` instead of deriving from `updatedAt`; settlement behavior changes for threads whose PR metadata updated after terminal state. The `useAssetUrl` hook and `useProjectFaviconAsset` hook are removed—any out-of-tree consumers will break.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized fba39bb.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->
