Skip to content

fix(billing): close the Chat plan popup when its shell unmounts and name the organization's plan on organization routes - #9614

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/chat-plan-modal-scope
Nov 3, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/chat-plan-modal-scope

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Close the Chat plan popup when the workspace or organization shell that renders it unmounts. The open flag lives in a global store, so leaving with the popup open (browser back/forward) reopened it in the next workspace or on an organization page, where that payer may already have Chat
  • On organization routes, tell a non-admin to contact an organization admin to upgrade the organization's plan, not "this workspace's plan" — the button there already targets organization billing

Type of Change

  • Bug fix

Testing

  • biome on both changed files; CI runs type-check, audits, and tests
  • Traced every open() caller (composer submit, sendMessage, Send now): each runs synchronously from a user action, never in the same commit as a navigation, so the unmount cleanup cannot close a fresh refusal. StrictMode's dev double-invoke runs the cleanup while the store is already closed

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…ame the organization's plan on organization routes
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 3, 2026 6:10am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Closes the Chat plan popup when its shell unmounts and corrects the upgrade message on organization routes.

  • The Chat plan prompt closes when its shell goes away.
  • Organization plan prompts name the organization’s plan.

Reviews (1) · Last reviewed commit: "fix(billing): close the Chat plan popup ..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 0ba2186 into staging Nov 3, 2026
74 checks passed
waleedlatif1 added a commit that referenced this pull request Nov 3, 2026
…n upgrade copy (#9618)

#9614 gave organization routes their own message, so the organization wording #9616 added to `action` is never read

This branch was previously deployed

1 inactive deployment
Preview — 30e64279 Deployed Nov 3, 2026 by vercel[bot]
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.

1 participant