The best way to control Claude Code, Codex and more from any computer or phone
ci: enforce unused runtime exports in the web app (#10228)
Julius Marminge committed
Sep 5, 2026 at 22:07 UTC
da2ba5b81f8be6afc6d54e728bf4ac8781f3ab1c
3 files changed
+9
-2
docs/operations/development.md
+4
-1
@@ -72,10 +72,13 @@ Windows investigation while that suite is not a required gate.
72
### Unused code
73
74
`vp run knip:check` checks unused files and dependencies across the repo, then
75
-unused runtime exports in every internal package under `packages/`. CI enforces both checks.
75
+unused runtime exports in `apps/web` and every internal package under `packages/`.
76
+CI enforces both checks.
77
Exported types and Effect schemas are allowed without consumers. The schema preprocessor
78
recognizes schema types, including aliases and schema classes; functions that create or decode
79
schemas remain checked. Completely unused files remain checked too.
80
+Named exports in web UI component modules are kept as complete component sets. Knip ignores
81
+unused exports in `apps/web/src/components/ui/*.tsx`, while still reporting an entire unused file.
82
Use `vp run knip --workspace apps/web` to audit one workspace, including exports,
83
or `vp run knip:production --workspace apps/web` to find code kept alive only by tests.
84
The full export audit still has findings and is not a repo-wide CI gate. Extend the
knip.jsonc
+4
@@ -43,6 +43,10 @@
43
"apps/web": {
44
// Worktree setup invokes this directly from t3.json.
45
"entry": ["scripts/warm-dep-cache.ts"],
46
+ // UI component modules are copied and adapted as cohesive sets. Keep their
47
+ // named subcomponents even before they have callers; the file audit still
48
+ // reports an entire component module when nothing imports it.
49
+ "ignoreIssues": { "src/components/ui/*.tsx": ["exports", "nsExports", "duplicates"] },
50
},
51
"apps/mobile": {
52
// Expo loads local config plugins by string; Metro handles platform variants.
package.json
+1
-1
@@ -26,7 +26,7 @@
26
"tc": "vp run -r --concurrency-limit 2 typecheck",
27
"lint": "vp lint --report-unused-disable-directives",
28
"knip": "knip --preprocessor ./scripts/knip-schemas.ts",
29
- "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",
29
+ "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",
30
"knip:production": "knip --production --preprocessor ./scripts/knip-schemas.ts",
31
"lint:mobile": "node scripts/mobile-native-static-check.ts",
32
"test": "vp run -r test",