cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

fix: hide insights submenu for free users

Open KartikLabhshetwar opened this issue 1 month ago • 2 comments

What does this PR do?

Visual Demo (For contributors especially)

Video Demo (if applicable):

before:

https://github.com/user-attachments/assets/628c35e4-c630-4178-93a7-9f4781cfe8b8

free plan:

https://github.com/user-attachments/assets/c4145c4c-2af3-4973-b6e2-ebb55f8e7c37

after:

https://github.com/user-attachments/assets/39270490-5abe-41a2-9e9d-e4839ad1c39e

Mandatory Tasks (DO NOT REMOVE)

  • [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • [ ] I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • [ ] I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

Summary by cubic

Hide the Insights submenu for free plan users and route the Insights nav to the Insights page. This aligns access with plan and avoids multiple tabs pointing to a single page (Linear CAL-6885).

  • Bug Fixes
    • Gated Insights access using useHasTeamPlan and allow navigation while plan status is pending.
    • Removed Insights child items for free plans and set href to /insights.
    • Kept full submenu and direct routes for paid plans.

Written for commit 99c0dbfa28e23a06fed6f1b1d093219a056f6e93. Summary will update automatically on new commits.

KartikLabhshetwar avatar Dec 10 '25 10:12 KartikLabhshetwar

@KartikLabhshetwar is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Dec 10 '25 10:12 vercel[bot]

On the Insights page, I notice the flow starts directly with creating a team. Let’s show this page first, and only start the team creation flow when the user clicks “Create Team.”

Screenshot 2025-12-10 at 4 41 40 PM (2)

hi, @dhairyashiil done with the changes as required.

https://github.com/user-attachments/assets/423bd019-7f83-4737-9fb8-785cd1c71871

KartikLabhshetwar avatar Dec 10 '25 11:12 KartikLabhshetwar

hi @dhairyashiil @anikdhabal @volnei can anyone please review this pr?

KartikLabhshetwar avatar Dec 11 '25 10:12 KartikLabhshetwar

Left some comments, please address

hi @dhairyashiil, thank you so much for the review, sorry for making such simple mistakes, i have addressed all of the issues mentioned here.

KartikLabhshetwar avatar Dec 11 '25 12:12 KartikLabhshetwar