fix(web): hide update toast for askgithub deployment#931
Conversation
When EXPERIMENT_ASK_GH_ENABLED is true, the UpgradeToast component is no longer rendered. This is appropriate for the askgithub deployment since users are not self-hosting and don't need to be notified about new versions. Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughLayout now conditionally renders the UpgradeToast only when env.EXPERIMENT_ASK_GH_ENABLED !== 'true'. A changelog entry documents hiding the version upgrade toast when that flag is enabled. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@cursor change the name so it matches PR format (look at existing PRs). Remember to do this next time |
|
I don't have permission to edit the PR title directly via the GitHub API. The PR title should be changed to:
This follows the conventional commit format used in other PRs (e.g., You can update this manually in GitHub by clicking "Edit" next to the PR title. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/web/src/app/[domain]/layout.tsx (1)
203-204: LGTM. Consider whetherGitHubStarToastshould also be gated.The
EXPERIMENT_ASK_GH_ENABLEDguard onUpgradeToastis correct — the!== 'true'string comparison safely handles theundefinedcase, keeping the toast visible for all non-askgithub deployments.As a minor follow-up:
GitHubStarToast(line 203) is rendered unconditionally. If the goal is to suppress all promotional notifications for askgithub public experiment users, it may warrant the same guard. If it's intentionally unrestricted, no action needed.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/web/src/app/`[domain]/layout.tsx around lines 203 - 204, GitHubStarToast is rendered unconditionally while UpgradeToast is gated by env.EXPERIMENT_ASK_GH_ENABLED !== 'true'; if you want to suppress all promotional notifications for askgithub experiment users, wrap the GitHubStarToast render with the same guard (use env.EXPERIMENT_ASK_GH_ENABLED !== 'true' around <GitHubStarToast />), otherwise leave as-is — locate the JSX that renders GitHubStarToast in layout.tsx and apply the same conditional check used for UpgradeToast.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Line 15: The CHANGELOG entry "Hide version upgrade toast for askgithub
deployment (`EXPERIMENT_ASK_GH_ENABLED`)." is missing the required PR reference;
update that line by appending the GitHub pull request id in the format
`[#<id>](<url>)` (e.g., add "
[`#1234`](https://github.com/yourorg/yourrepo/pull/1234)") so the entry follows
the guideline that every line includes a PR link.
---
Nitpick comments:
In `@packages/web/src/app/`[domain]/layout.tsx:
- Around line 203-204: GitHubStarToast is rendered unconditionally while
UpgradeToast is gated by env.EXPERIMENT_ASK_GH_ENABLED !== 'true'; if you want
to suppress all promotional notifications for askgithub experiment users, wrap
the GitHubStarToast render with the same guard (use
env.EXPERIMENT_ASK_GH_ENABLED !== 'true' around <GitHubStarToast />), otherwise
leave as-is — locate the JSX that renders GitHubStarToast in layout.tsx and
apply the same conditional check used for UpgradeToast.
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>


Hide the update toast for the
askgithub.comdeployment to prevent unnecessary notifications for public experiment users.Linear Issue: SOU-562
Summary by CodeRabbit