Skip to content

fix(web): hide update toast for askgithub deployment#931

Merged
msukkari merged 5 commits intomainfrom
cursor/SOU-562-askgithub-update-toast-f23f
Feb 24, 2026
Merged

fix(web): hide update toast for askgithub deployment#931
msukkari merged 5 commits intomainfrom
cursor/SOU-562-askgithub-update-toast-f23f

Conversation

@msukkari
Copy link
Contributor

@msukkari msukkari commented Feb 24, 2026

Hide the update toast for the askgithub.com deployment to prevent unnecessary notifications for public experiment users.


Linear Issue: SOU-562

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Changed
    • The version upgrade toast notification is now hidden for the askgithub deployment. Users on that deployment will no longer see the upgrade prompt; all other deployments retain the existing behavior. This reduces interruptive notifications for askgithub users while keeping upgrade visibility elsewhere.

cursoragent and others added 2 commits February 24, 2026 19:59
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
Copy link

cursor bot commented Feb 24, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e21fab and 5d860d4.

📒 Files selected for processing (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Walkthrough

Layout 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

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Added Unreleased changelog entry noting the UpgradeToast is hidden when EXPERIMENT_ASK_GH_ENABLED is enabled.
Layout Component
packages/web/src/app/[domain]/layout.tsx
Changed UpgradeToast rendering to be conditional: rendered only if env.EXPERIMENT_ASK_GH_ENABLED !== 'true'.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • brendan-kellam
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: hiding the update/upgrade toast for the askgithub deployment using the EXPERIMENT_ASK_GH_ENABLED flag.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/SOU-562-askgithub-update-toast-f23f

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@msukkari msukkari marked this pull request as ready for review February 24, 2026 20:36
@msukkari
Copy link
Contributor Author

@cursor change the name so it matches PR format (look at existing PRs). Remember to do this next time

@cursor
Copy link

cursor bot commented Feb 24, 2026

I don't have permission to edit the PR title directly via the GitHub API. The PR title should be changed to:

fix(web): hide update toast for askgithub deployment

This follows the conventional commit format used in other PRs (e.g., fix(web): preserve angle-bracketed text in chat user questions, feat(backend): add Bitbucket Cloud permission syncing).

You can update this manually in GitHub by clicking "Edit" next to the PR title.

Open in Web Open in Cursor 

@msukkari msukkari changed the title Askgithub update toast fix(web): hide update toast for askgithub deployment Feb 24, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/web/src/app/[domain]/layout.tsx (1)

203-204: LGTM. Consider whether GitHubStarToast should also be gated.

The EXPERIMENT_ASK_GH_ENABLED guard on UpgradeToast is correct — the !== 'true' string comparison safely handles the undefined case, 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.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4d7721 and 5e21fab.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • packages/web/src/app/[domain]/layout.tsx

Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
@msukkari msukkari merged commit fb82717 into main Feb 24, 2026
9 of 10 checks passed
@msukkari msukkari deleted the cursor/SOU-562-askgithub-update-toast-f23f branch February 24, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants