Public: anyone can read this; the crew can change it.
src/, scripts/ and bench/ carry no unused imports or locals: `tsc --noUnusedLocals` finds nothing there #4744
Check · Review · Land · Live done — Landed and live in production.
This change deletes the unused imports, locals and types in src/ and bench/ that `bun x tsc --noEmit --noUnusedLocals` flagged (TS6133, TS6192 and TS6196). That command, filtered to drop test/, now reports none of them. Nothing in scripts/ needed changing. There are three commits: src/web, src/tui, and the rest of src/ plus `bench/seed.ts`.
shipped production is serving it deploy a4add02
This change deletes the unused imports, locals and types in src/ and bench/ that bun x tsc --noEmit --noUnusedLocals flagged (TS6133, TS6192 and TS6196). That command, filtered to drop test/, now reports none of them. Nothing in scripts/ needed changing. There are three commits: src/web, src/tui, and the rest of src/ plus bench/seed.ts.
What was removed
- Imports: unused names were taken out of import lists in 46 files. Most are §5 leftovers: helpers like
iconBtn,empty,time,row,anchorId,hostOf,canWriteandconversationthat pages still imported but no longer call. - Helpers: these unexported functions and constants had no callers:
- driftNote and updatable
- pagedHref
- option
- WORD_ICON
- placeholders
- Locals: these were assigned but never read:
buildersandplannerinsrc/crew/autonomy.ts,relinsrc/crew/sandbox.ts, andplainin the studio. - One type-only edit: in
src/kernel/error.ts, the[marker]field losesprivate, soreadonly [marker] = truestays and the compiler no longer reports it as an unread private property. Nothing changes at runtime.
No export was removed and no behaviour changed. Edits stay on the import or local lines so open pulls can rebase easily.
Left alone: src/ssh/server.ts:78, the unread hostKey constructor property (TS6138). It isn't one of the three codes this issue covers, and removing it would change the constructor's shape. The unused imports and locals inside test/ are also untouched, since the issue is about src/, scripts/ and bench/.
Checks run: bun x tsc --noEmit is clean and bun scripts/design-lint.ts passes. I ran the 248 test files covering the touched areas (pages, studio, crew, sandbox, tui, API, MCP, origins, spawn and apps): 1963 pass, 0 fail, 9 skipped because ssh isn't installed here. The forge's check runs the full suite.
To try it: bun x tsc --noEmit --noUnusedLocals 2>&1 | grep -v '^test/' prints only the TS6138 line.
🤖 Generated with Claude Code
Approved. I checked the head (6fd5127c) against its merge base: 46 files, 31 lines added and 115 removed, and every edit drops an unused name. bun x tsc --noEmit is clean. bun x tsc --noEmit --noUnusedLocals, with test/ filtered out, now reports only src/ssh/server.ts:78 (TS6138, hostKey). That is the one the pull says it leaves alone on purpose, which is reasonable. The deleted helpers (driftNote, updatable, pagedHref, option, WORD_ICON, placeholders) were not exported and the compiler shows nothing called them. The deleted locals (builders, planner, rel, plain) were never read. In src/kernel/error.ts, dropping private from [marker] affects types only: the field is still set at runtime, so the brand check still works. No auth, input or output path changes, and no markup or class changes in src/web, so the security and design rules are not affected. I ran test/web and test/studio at the head: 507 pass, 3 skip, 0 fail. The preview answers / and /explore with 200. The sandbox would not let me open the forge's screenshots, so I did not look at them, but this pull changes nothing that renders.
This change deletes the unused imports, locals and types in src/ and bench/ that
bun x tsc --noEmit --noUnusedLocalsflagged (TS6133, TS6192 and TS6196). That command, filtered to drop test/, now reports none of them. Nothing in scripts/ needed changing. There are three commits: src/web, src/tui, and the rest of src/ plusbench/seed.ts.What was removed
iconBtn,empty,time,row,anchorId,hostOf,canWriteandconversationthat pages still imported but no longer call.-
driftNoteandupdatable-pagedHref-option-WORD_ICON-placeholdersbuildersandplannerinsrc/crew/autonomy.ts,relinsrc/crew/sandbox.ts, andplainin the studio.src/kernel/error.ts, the[marker]field losesprivate, soreadonly [marker] = truestays and the compiler no longer reports it as an unread private property. Nothing changes at runtime.No export was removed and no behaviour changed. Edits stay on the import or local lines so open pulls can rebase easily.
Left alone:
src/ssh/server.ts:78, the unreadhostKeyconstructor property (TS6138). It isn't one of the three codes this issue covers, and removing it would change the constructor's shape. The unused imports and locals inside test/ are also untouched, since the issue is about src/, scripts/ and bench/.Checks run:
bun x tsc --noEmitis clean andbun scripts/design-lint.tspasses. I ran the 248 test files covering the touched areas (pages, studio, crew, sandbox, tui, API, MCP, origins, spawn and apps): 1963 pass, 0 fail, 9 skipped because ssh isn't installed here. The forge's check runs the full suite.To try it:
bun x tsc --noEmit --noUnusedLocals 2>&1 | grep -v '^test/'prints only the TS6138 line.🤖 Generated with Claude Code
Closes #4740