Skip to content

improvement(billing): show the Chat plan card above the composer instead of redirecting on send - #9557

Merged
waleedlatif1 merged 3 commits into
stagingfrom
improvement/chat-plan-inline-card
Nov 2, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
improvement/chat-plan-inline-card

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A workspace whose plan doesn't include Chat now shows the "Paid Plan Required" card above the composer (home empty state and conversation footer), the same card run admission writes, instead of bouncing a send to the upgrade page or a toast
  • The send button stays disabled and Enter is held, so the draft survives; the card's own button routes billing managers to the upgrade page and tells everyone else who can upgrade
  • useChatPlanGate (navigate/toast callback) becomes useChatPlanRequired, a boolean derived from the host context's features.chat; useChat.sendMessage still holds programmatic and queued sends
  • CHAT_PLAN_REQUIRED_UPGRADE moves to the client-safe lib/billing/chat-plan.ts so the composer can render it; usage-upgrade.ts keeps a type-only import
  • PlanUsageLimitDisplay is exported from the special-tags barrel, like the other displays reused outside messages

Type of Change

  • Improvement

Testing

  • special-tags, user-input, tools/billing.test.ts, lifecycle/run.test.ts, and jobs suites pass locally (270 tests)
  • Lint, type-check, and audits run in CI

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)

@vercel

vercel Bot commented Nov 2, 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 2, 2026 4:00am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Shows the paid-plan card above the composer instead of redirecting users when they send.

  • Workspaces without Chat on their plan show an upgrade card before sending.

Reviews (3) · Last reviewed commit: "fix(billing): resume held queued sends o..." · Reviewed by Greptile

@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.

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@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.

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@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 15 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

@waleedlatif1
waleedlatif1 merged commit b6677c3 into staging Nov 2, 2026
72 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/chat-plan-inline-card branch November 2, 2026 06:36

This branch was previously deployed

1 inactive deployment
Preview — 098b9bfe Deployed Nov 2, 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