Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Summary

Configures ESLint to treat warnings as errors and adds a manual dead code checking command. Also removes 506 lines of actual dead code identified by ts-prune.

Changes

ESLint Configuration

  • Added --max-warnings 0 flag to treat all warnings as errors
  • Fixed outstanding warnings in ChatInput.tsx (missing deps) and telemetry/utils.ts (unsafe any access)

Dead Code Checking

  • Added make check-deadcode target for manual dead code detection using ts-prune
  • Not included in static-check - advisory only, not a hard requirement
  • Filters out test/debug/storybook files and legitimate public API exports

Dead Code Removal (506 lines)

  • TypewriterText component (unused)
  • ToolsTab component (unused)
  • Duplicate git functions in git.ts (implementations exist in gitService.ts)
  • Various unused utility functions and types across the codebase

Why Manual-Only Dead Code Checking?

Automatic dead code checking in CI is too brittle:

  • Line-number-based allowlists break on any code change
  • Hard to distinguish legitimate public API exports from actual dead code
  • Some exports are intentionally unused (public API surface, type definitions)
  • Dead code is technical debt but not a correctness issue

Manual checking with make check-deadcode is still valuable for cleanup efforts without blocking CI.

Generated with cmux

- Configure ESLint to treat warnings as errors (--max-warnings 0)
- Fix outstanding ESLint warnings in ChatInput.tsx and telemetry/utils.ts
- Add `make check-deadcode` target for manual dead code detection
  - Uses ts-prune with sensible filtering
  - NOT included in static-check (advisory only, not a hard requirement)
  - Filters out test/debug/storybook files and legitimate public APIs
- Remove 563 lines of actual dead code identified by ts-prune

Dead code removed:
- TypewriterText component (unused)
- ToolsTab component (unused)
- Duplicate git functions in git.ts (gitService.ts has the implementations)
- Various unused utility functions and types across the codebase

Why manual-only dead code checking:
- Line-number-based allowlists are brittle (break on any code change)
- Hard to distinguish legitimate public API exports from actual dead code
- Dead code is technical debt but not a correctness issue
- Manual checking is still valuable for cleanup efforts

_Generated with `cmux`_
@ammar-agent
Copy link
Collaborator Author

✅ All checks pass locally:

  • make static-check
  • make test ✅ (710 tests)

CI jobs are timing out at exactly 10 minutes due to AWS outage. Will need to re-run once infrastructure recovers.

Generated with cmux

@ammario ammario added this pull request to the merge queue Oct 20, 2025
Merged via the queue into main with commit edeaf10 Oct 20, 2025
10 of 17 checks passed
@ammario ammario deleted the deadcode branch October 20, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants