refactor: remove unused optional arguments and fields - #3195
Conversation
Generated with an experimental CLI that checks every call site of a function and flags optional arguments and object fields that are never provided. Previous defaults are inlined so runtime behavior is unchanged. Findings whose call sites live in Vue SFCs (invisible to the scanner) were verified manually and kept. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe changes remove configurable parameters from search, filtering, process, authentication, repository, provider, and chart utilities. The affected code now uses fixed query names, limits, branches, environment values, TTL handling, and freshness normalisation. ChangesAPI Contract Simplification
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This PR removes unused optional arguments and fields without any identified production-impacting issue at the current head; it is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Hey folks, I'm working on an experimental CLI which uses the tsgo toolchain to find optional component and function signatures that are in practice never passed. This is essentially dead code elimination, and a complementary workflow to run alongside a tool like knip.
The changeset in this PR has been done using the script as the reporting tool, and an agent validator loop walking through each reported line one by one to first inspect the report, analyze the call sites, removing them, and later re-running ts. If done correctly, the code that has been removed should have been effectively dead.
The reporting script heavily relies on type quality and only reports on types whos members are statically enumerable.
I'm opening this PR in an effort to help you eliminate dead code, but also to gain feedback on the script and the detection mechanisms. There are always risks of false positive reports, and removal of code that is actually still required at runtime.
Some references of PRs opened to other repositories that have been merged or are still open:
✅ Sentry (4k loc removed)
⏳ Sentry (followup 1k loc removed)
⏳ Tanstack
⏳ npmx (this PR)
Would love to hear your feedback 🙏🏼