# Files changed · PR \#10228 · pingdotgg/t3code

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

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

Visibility: public

[ci: enforce unused runtime exports in the web app](https://git.cafe/pingdotgg/t3code/pull/10228.md)

Version: 2

Head commit: 78ed671fda5e0ea191e485789b7b13c53a62bb39

Base commit: ce43c55df9b28f06c5a80b1e34bfd98e02813385

Comparison base: ce43c55df9b28f06c5a80b1e34bfd98e02813385

Showing up to 20 entries from this revision. If the pull request changes, reopen the first page before continuing.

## docs/operations/development.md

Status: modified; +4; −1

```diff
@@ -72,10 +72,13 @@
 ### Unused code
 
 `vp run knip:check` checks unused files and dependencies across the repo, then
+unused runtime exports in `apps/web` and every internal package under `packages/`.
+CI enforces both checks.
-unused runtime exports in every internal package under `packages/`. CI enforces both checks.
 Exported types and Effect schemas are allowed without consumers. The schema preprocessor
 recognizes schema types, including aliases and schema classes; functions that create or decode
 schemas remain checked. Completely unused files remain checked too.
+Named exports in web UI component modules are kept as complete component sets. Knip ignores
+unused exports in `apps/web/src/components/ui/*.tsx`, while still reporting an entire unused file.
 Use `vp run knip --workspace apps/web` to audit one workspace, including exports,
 or `vp run knip:production --workspace apps/web` to find code kept alive only by tests.
 The full export audit still has findings and is not a repo-wide CI gate. Extend the
```

## knip.jsonc

Status: modified; +4; −0

```diff
@@ -43,6 +43,10 @@
     "apps/web": {
       // Worktree setup invokes this directly from t3.json.
       "entry": ["scripts/warm-dep-cache.ts"],
+      // UI component modules are copied and adapted as cohesive sets. Keep their
+      // named subcomponents even before they have callers; the file audit still
+      // reports an entire component module when nothing imports it.
+      "ignoreIssues": { "src/components/ui/*.tsx": ["exports", "nsExports", "duplicates"] },
     },
     "apps/mobile": {
       // Expo loads local config plugins by string; Metro handles platform variants.
```

## package.json

Status: modified; +1; −1

```diff
@@ -26,7 +26,7 @@
     "tc": "vp run -r --concurrency-limit 2 typecheck",
     "lint": "vp lint --report-unused-disable-directives",
     "knip": "knip --preprocessor ./scripts/knip-schemas.ts",
-    "knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace packages/client-runtime --workspace packages/contracts --workspace packages/effect-acp --workspace packages/effect-codex-app-server --workspace packages/shared --workspace packages/ssh --workspace packages/tailscale --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints",
+    "knip:check": "knip --include files,dependencies --no-config-hints && knip --workspace apps/web --workspace packages/client-runtime --workspace packages/contracts --workspace packages/effect-acp --workspace packages/effect-codex-app-server --workspace packages/shared --workspace packages/ssh --workspace packages/tailscale --exports --preprocessor ./scripts/knip-schemas.ts --no-config-hints",
     "knip:production": "knip --production --preprocessor ./scripts/knip-schemas.ts",
     "lint:mobile": "node scripts/mobile-native-static-check.ts",
     "test": "vp run -r test",
```
