Skip to content

chore: remove dead code and cleanup unused exports (592 lines) - #513

Merged
baleen37 merged 1 commit into
mainfrom
chore/dead-code-cleanup
Feb 20, 2026
Merged

chore: remove dead code and cleanup unused exports (592 lines)#513
baleen37 merged 1 commit into
mainfrom
chore/dead-code-cleanup

Conversation

@baleen37

@baleen37 baleen37 commented Feb 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove unused vitest dependency, add missing @semantic-release/github
  • Remove 19 unused exports from tests/helpers/bun.ts (322 lines deleted)
  • Remove internal exports in state.ts (readState, writeState)
  • Remove unused interface fields in auto-compact.ts and session-start.ts
  • Update test_utils.bash to use consolidated plugin structure paths

Changes

File Change
package.json Remove vitest, add @semantic-release/github
tests/helpers/bun.ts Remove 19 unused exports (497→175 lines)
src/suggest-compacting/lib/state.ts Remove export from readState, writeState
src/suggest-compacting/auto-compact.ts Remove unused tool_name field
src/suggest-compacting/session-start.ts Remove unused transcript_path field
tests/helpers/test_utils.bash Update paths for consolidated structure

Test plan

  • All 290 BATS tests pass
  • All 11 Bun tests pass
  • Pre-commit hooks pass

Summary by CodeRabbit

  • Chores

    • Updated test runner configuration to use bash scripts instead of vitest
    • Added semantic-release GitHub integration
  • Refactor

    • Simplified input interfaces by removing unused fields
    • Reorganized plugin file structure to consolidated root-level location
    • Cleaned up test helper utilities and validation logic

- Remove unused vitest dependency, add missing @semantic-release/github
- Remove 19 unused exports from tests/helpers/bun.ts (322 lines deleted)
- Remove internal exports in state.ts (readState, writeState)
- Remove unused interface fields in auto-compact.ts and session-start.ts
- Update test_utils.bash to use consolidated plugin structure paths
@coderabbitai

coderabbitai Bot commented Feb 20, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Updates package.json test script from vitest to bash runner and adds semantic-release GitHub dependency. Removes tool_name and transcript_path fields from suggest-compacting module interfaces, makes readState and writeState functions non-exported. Consolidates file discovery paths in test utilities from plugins/* to .claude-plugin/* structure and eliminates numerous exported test helpers related to marketplace, hooks, and assertions from test utilities.

Changes

Cohort / File(s) Summary
Build Configuration
package.json
Updated test script to use bash test runner instead of vitest; added @semantic-release/github dependency; removed vitest devDependency.
Suggest-Compacting Module
src/suggest-compacting/auto-compact.ts, src/suggest-compacting/session-start.ts, src/suggest-compacting/lib/state.ts
Removed tool_name field from PreToolUseInput; removed transcript_path field from SessionStartInput; made readState and writeState functions non-exported (internal visibility).
Test Infrastructure
tests/helpers/test_utils.bash
Updated file discovery paths from plugins/* to .claude-plugin/* consolidated structure; changed hooks discovery to single fixed location at hooks/hooks.json.
Test Utilities
tests/helpers/bun.ts
Removed 322 lines including: WORKFLOW_DIR constant export, assertion helpers (assertFileExists, assertDirExists, assertEquals, assertMatches), frontmatter helpers, marketplace-related interfaces and validators, hooks-related types and validation functions, and plugin directory discovery utilities. Core utilities (parsePluginManifest, validateJson) remain.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through restructured paths,
Consolidating plugins, no more math,
Old test tools swept—we keep what's true,
Simpler interfaces shine brand new,
Bash takes the stage, vitest takes flight! 🎉

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/dead-code-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@baleen37
baleen37 enabled auto-merge (squash) February 20, 2026 08:53
@baleen37
baleen37 merged commit 04fc68d into main Feb 20, 2026
4 of 5 checks passed
@baleen37
baleen37 deleted the chore/dead-code-cleanup branch February 20, 2026 08:53
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.

1 participant