feat:Add education plan project limit alert on org page#2963
feat:Add education plan project limit alert on org page#2963HarshMN2345 merged 2 commits intomainfrom
Conversation
Greptile SummaryThis PR adds an informational alert on the organization page for users on the GitHub Student Developer education plan, warning them when they've reached the 2-project limit and offering a link to upgrade. Key changes:
Finding: The project limit is hardcoded as Prior open threads (not repeated here): missing analytics tracking on dismiss, inline Confidence Score: 4/5Safe to merge with minor cleanup; the hardcoded limit is a maintenance concern but does not cause immediate breakage. The off-by-one from the previous review is correctly fixed ( src/routes/(console)/organization-[organization]/+page.svelte — hardcoded project limit value
|
| Filename | Overview |
|---|---|
| src/routes/(console)/organization-[organization]/+page.svelte | Adds an education plan project limit alert that shows when an org has the github-student-developer program and reaches 2 projects; the threshold off-by-one from a prior review is fixed, but the limit value is hardcoded rather than read from the plan's service-limit data, and minor style issues from prior review threads remain open. |
Reviews (2): Last reviewed commit: "Update src/routes/(console)/organization..." | Re-trigger Greptile
| function dismissEducationPlanAlert() { | ||
| educationPlanAlertDismissed = true; | ||
| const notificationId = `educationPlanAlert_${data.organization.$id}`; | ||
| hideNotification(notificationId, { coolOffPeriod: 24 }); | ||
| } |
There was a problem hiding this comment.
Missing analytics tracking on dismiss
dismissFreePlanAlert calls trackEvent(Click.OrganizationClickUpgrade, ...) when dismissed, giving the team signal on user interactions. dismissEducationPlanAlert skips this entirely. If analytics coverage is intentional, a comment explaining why would help; otherwise, consider adding the equivalent tracking call here.
| href={getChangePlanUrl(data.organization.$id)} | ||
| style="text-decoration: underline;"> | ||
| upgrade your plan | ||
| </a>. |
There was a problem hiding this comment.
Inline style instead of utility class
The style="text-decoration: underline;" inline style is inconsistent with the rest of the codebase, which relies on Pink design system utilities. Consider using the design system's link component or an existing CSS class instead of a one-off inline style.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
|
Tip: Greploops — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
What does this PR do?
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)