Skip to content

Conversation

@cmraible
Copy link
Collaborator

This is dead code that isn't used anywhere. If we have a need to gate a particular route based on a feature flag, we can re-introduce these hooks, but with a new name ideally as it's not what I'd expect useFeatureFlag to do.

Got some code for us? Awesome 🎊!

Please take a minute to explain the change you're making:

  • Why are you making it?
  • What does it do?
  • Why is this something Ghost users or developers need?

Please check your PR against these items:

  • I've read and followed the Contributor Guide
  • I've explained my change
  • I've written an automated test to prove my change works

We appreciate your contribution! 🙏

This is dead code that isn't used anywhere. If we have a need to gate a
particular route based on a feature flag, we can re-introduce these
hooks, but with a new name ideally as it's not what I'd expect
`useFeatureFlag` to do.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

This pull request removes the feature-flag infrastructure from the stats module. Two custom hooks—useFeatureFlag and withFeatureFlag—have been deleted along with their corresponding test files. Additionally, commented-out code related to feature-flag wrapping in the routes configuration has been removed. These changes eliminate the feature-flag gating logic and redirect handling previously present in the codebase. No runtime behavior changes are introduced; only infrastructure removal occurs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly describes the main change: removing the unused useFeatureFlag and withFeatureFlag hooks from the stats app.
Description check ✅ Passed The description explains why the change is made (dead code not used anywhere) and provides context for future re-introduction, which is directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

@cmraible cmraible marked this pull request as ready for review January 28, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants