# ci: enforce unused runtime exports in the web app · PR \#10228 · pingdotgg/t3code

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

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

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: cleanup-web/knip-gate

Target branch: cleanup-web/app-internals

Head commit: 78ed671fda5e0ea191e485789b7b13c53a62bb39

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

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

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

## Description

---

Web runtime exports are not covered by the existing Knip CI gate. Add apps/web alongside the seven internal packages after the preceding cleanup layers.

Keep exported types and Effect schemas under the existing preprocessor policy. Web UI component modules are copied and adapted as complete component sets, so Knip ignores named exports and duplicate aliases in `apps/web/src/components/ui/*.tsx`. The exception does not include file findings: an unimported UI component module still fails the file audit.

No dependency or plugin changes. Before this cleanup, the ordinary scan reported 205 web runtime exports and three duplicate-export groups. The integrated stack now passes under the revised policy. Production-only findings remain a separate audit because tests can legitimately consume meaningful logic.

Layer 4 of 4 in the web runtime-export cleanup stack. Based on [#10227](https://github.com/pingdotgg/t3code/pull/10227).

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 `apps/web` to `knip:check` and ignore export findings for UI components
> - Extends `knip:check` in [package.json](https://github.com/pingdotgg/t3code/pull/10228/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519) to audit files, dependencies, and exports in `apps/web`.
> - Adds an `ignoreIssues` rule in [knip.jsonc](https://github.com/pingdotgg/t3code/pull/10228/files#diff-48d5ba4681726b42e98dae10c08bd94f7f9836644c8f183c6475d10dcf67ebf1) for `src/components/ui/*.tsx` to suppress export-level findings, treating these files as cohesive sets while still reporting fully unused files.
> - Updates [docs/operations/development.md](https://github.com/pingdotgg/t3code/pull/10228/files#diff-d4193c695085935050d7dd7572ae2c767e26244ca27f5ae7fd015ff4c97c8ba2) to document the expanded audit scope and component rules.
> - Behavioral Change: Running `knip:check` now audits `apps/web`, which may fail CI if unused files or dependencies exist outside the ignored UI components.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 78ed671.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- Macroscope's pull request summary ends here -->
