remove unused code and dead exports#524
Merged
JeremyDev87 merged 1 commit intomasterfrom Feb 17, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Remove unused dependencies, dead files, and unexported internal symbols to reduce codebase surface area and improve maintainability. - Remove unused deps: ink-gradient, ink-spinner, @nestjs/cli, @nestjs/schematics, tsx - Add missing deps: chalk, esbuild, memfs - Delete dead files: token-counter.ts, token-counter.spec.ts, manual-client.js - Remove unused type declarations from ink.d.ts (ink-spinner, ink-gradient) - Remove export keyword from ~50 internal-only symbols across 30+ files - Delete entirely unused types: PathValidationError, PathValidationOptions, ContextCleanupConfig, ModeAgent, PlanPrimaryAgent, and z.infer aliases - Delete unused functions: extractRecommendedActAgent, getAllDecisions, getAllNotes, findSectionByMode from context-parser.utils.ts - Remove unused barrel re-exports from tui/ipc/index.ts - Update spec files to remove tests for no-longer-exported internals
c2e12ce to
fe9385a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #486
Remove unused dependencies, dead files, and unexported internal symbols to reduce codebase surface area and improve maintainability. This change results in -2,825 lines across 48 files with zero functional regressions.
Changes by Phase
Phase 1: Dependency cleanup
ink-gradient,ink-spinner@nestjs/cli,@nestjs/schematics,tsxchalk,esbuild,memfsink-spinnerandink-gradienttype declarations fromink.d.tsPhase 2: Dead file removal
test/manual-client.js(outdated manual MCP test client)src/shared/token-counter.ts+ spec (entirely unused module)Phase 3: Unused export cleanup
exportkeyword from ~50 internal-only symbols across 30+ filesPathValidationError,PathValidationOptions,ContextCleanupConfig,ModeAgent,PlanPrimaryAgent, and unusedz.inferaliasescontext-parser.utils.ts:extractRecommendedActAgent,getAllDecisions,getAllNotes,findSectionByModetui/ipc/index.ts:createIpcDebugLogger,serializeIpcMessage,deserializeIpcMessageDeferred: Barrel file re-exports
What was NOT changed (verified false positives)
AgentSummary,VerbosityLevel,ActPrimaryAgent— actually imported by other modulesrunTui,getTuiBundlePath— consumed via dynamicimport()(invisible to static analysis)api/mcp.ts,mcp-serverless.ts) — kept per maintainer decisionTest plan
tsc --noEmit)madge)