Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: bypass premium check in development mode#3914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dmelloaries wants to merge1 commit intorequestly:master
base:master
Choose a base branch
Loading
fromdmelloaries:Bug/Enable-premium-features-for-dev

Conversation

@dmelloaries
Copy link
Contributor

@dmelloariesdmelloaries commentedNov 24, 2025
edited by coderabbitaibot
Loading

Closes issue:#3913

📜 Summary of changes:

Auto-enable premium features when running in development mode by checking "import.meta.env.DEV" in the useFeatureLimiter hook.

🎥 Demo Video:

premium-feature-enable-in-dev (1)

Video/Demo:

✅ Checklist:

  • Make sure linting and unit tests pass.
  • No install/build warnings introduced.
  • Verified UI in browser.
  • For UI changes, added/updated analytics events (if applicable).
  • For changes in extension's code, manually tested in Chrome and Firefox.
  • Added/updated unit tests for this change.
  • Raised pull request to update corresponding documentation (if already exists).
  • Added demo video showing the changes in action (if applicable).

🧪 Test instructions:

🔗 Other references:

Summary by CodeRabbit

  • Chores
    • Improved development environment tooling to streamline feature testing in development builds.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitaibot commentedNov 24, 2025
edited
Loading

Walkthrough

A development-mode bypass was added to the premium user check in the feature limiter hook. When the development environment flag is active,isUserPremium is unconditionally set totrue; otherwise, the existing user premium status fromuser?.details?.isPremium is used. This alters the control flow path for determining the user plan and subsequent feature-limit validation logic in development builds only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Single file modification: Localized change to one hook file reduces scope
  • Straightforward conditional logic: Dev mode bypass is a simple ternary or conditional assignment
  • Behavior validation needed: Verify that the development bypass doesn't introduce unintended side effects in feature-limit checks or user plan computation
  • Testing consideration: Ensure dev mode premium bypass is properly toggled and doesn't persist to production builds

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly summarizes the main change: adding a development-mode bypass for premium feature checks in the useFeatureLimiter hook.
Description check✅ PassedThe description includes most required sections with issue reference (#3913), clear summary of changes, and demo video, but the checklist items are unchecked and test instructions are missing.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between5b79b54 andd9c5c57.

📒 Files selected for processing (1)
  • app/src/hooks/featureLimiter/useFeatureLimiter.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
app/src/hooks/featureLimiter/useFeatureLimiter.ts (1)
app/src/features/settings/components/Profile/ActiveLicenseInfo/SubscriptionInfo/index.js (1)
  • isUserPremium (28-28)
🔇 Additional comments (1)
app/src/hooks/featureLimiter/useFeatureLimiter.ts (1)

17-18:The implementation correctly bypasses feature limits in dev mode, even with incomplete user data.

The original review identified a potential issue withgetPlanNameFromId(undefined) returningnull, but the actual behavior is correct. WhenuserPlan isnull in dev mode:

  • At line 21:if (isUserPremium && !premiumPlansToCheckLimit.includes(null)) evaluates totrue becauseincludes(null) returnsfalse, and the negation makes the condition true, causing the function to return early and skip feature limit checks.
  • At line 57: The same logic applies, returningInfinity (unlimited).

This is theintended behavior—feature limits are properly bypassed in dev mode, regardless of whether the user object is complete. The code works as documented in the comment: "Bypass premium check in dev mode."

Likely an incorrect or invalid review comment.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates thehigh-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using thehigh_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Usehigh_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for usingCodeRabbit! 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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@dmelloaries

[8]ページ先頭

©2009-2025 Movatter.jp