fix: hide insights submenu for free users
What does this PR do?
- Fixes #25711
- Fixes CAL-6885
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 is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
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.”
![]()
hi, @dhairyashiil done with the changes as required.
https://github.com/user-attachments/assets/423bd019-7f83-4737-9fb8-785cd1c71871
hi @dhairyashiil @anikdhabal @volnei can anyone please review this pr?
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.