Repository navigation
Add cmux Pro pricing and one-click Stack checkout #7143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 50 commits
1c379a7
5508109
1cd4250
5c53722
8b9b058
a9a8e02
bb6aa5d
44e469a
9ab8310
aa7597f
90ebf6a
da582e9
8e4bc47
916091e
4204341
2e55c59
6b2897c
be7e736
28c82f2
90e05bd
b1c67fa
3270a4a
78a19e9
7b5e7c5
d261653
74ca083
97f2dba
764c621
53aa778
060e1bb
180f08e
5ac3516
0ebab67
9c7d2ff
9a2e54d
e6e3582
9964652
448fd25
4a96b96
3a9a165
478c2e8
348c3d5
7feb0f6
b1300e2
3c0b8e8
69d6a23
d7275d1
136f95d
2b1c508
51f49a3
54180a3
a7d664a
f1f594e
22fbba1
ca3bca3
f5f7009
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import CmuxFoundation | ||
| import SwiftUI | ||
|
|
||
| /// Upgrade row rendered below the identity card in the Account section. | ||
| /// | ||
| /// Shows the cmux Pro pitch (one title line + one price/value subtitle) | ||
| /// with a trailing button that asks the host to open the pricing page in | ||
| /// the default browser via ``AccountFlow/openProUpgrade()``. Stateless: | ||
| /// the app does not track plan state yet, so the row renders for every | ||
| /// user. | ||
| @MainActor | ||
| struct ProUpgradeCard: View { | ||
| let flow: AccountFlow? | ||
|
|
||
| init(flow: AccountFlow?) { | ||
| self.flow = flow | ||
| } | ||
|
|
||
| var body: some View { | ||
| HStack(alignment: .center, spacing: 12) { | ||
| VStack(alignment: .leading, spacing: 2) { | ||
| Text(String(localized: "settings.account.pro.title", defaultValue: "cmux Pro")) | ||
| .cmuxFont(size: 13, weight: .medium) | ||
| Text(String( | ||
| localized: "settings.account.pro.subtitle", | ||
| defaultValue: "Cloud dev boxes, the iOS app, and cmux AI. $20/month billed annually, or $30 month-to-month." | ||
| )) | ||
| .cmuxFont(size: 11) | ||
| .foregroundColor(.secondary) | ||
| .fixedSize(horizontal: false, vertical: true) | ||
| } | ||
| Spacer(minLength: 12) | ||
| Button { | ||
| flow?.openProUpgrade() | ||
| } label: { | ||
| Text(String(localized: "settings.account.pro.upgrade", defaultValue: "Upgrade…")) | ||
| } | ||
| .controlSize(.small) | ||
| } | ||
| .padding(.horizontal, 14) | ||
| .padding(.vertical, 10) | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,12 @@ | ||
| import CmuxSettings | ||
| import SwiftUI | ||
|
|
||
| /// **Account** section — mirrors the legacy in-app section: a single | ||
| /// **Account** section — mirrors the legacy in-app section: a | ||
| /// `SettingsCard` containing the identity row (primary email title + | ||
| /// display name subtitle + Sign In / Sign Out button, no avatar). The | ||
| /// integration toggles (Claude Code, Cursor, Gemini, ripgrep, subagent | ||
| /// suppression) live under **Automation** to match legacy ordering. | ||
| /// display name subtitle + Sign In / Sign Out button, no avatar), | ||
| /// followed by the cmux Pro upgrade card. The integration toggles | ||
| /// (Claude Code, Cursor, Gemini, ripgrep, subagent suppression) live | ||
| /// under **Automation** to match legacy ordering. | ||
| @MainActor | ||
| public struct AccountSection: View { | ||
| private let accountFlow: AccountFlow? | ||
|
|
@@ -31,6 +32,12 @@ public struct AccountSection: View { | |
| AccountIdentityCard(flow: accountFlow) | ||
| } | ||
| .settingsSearchAnchors(["setting:account:account"]) | ||
| if accountFlow?.isProUpgradeAvailable ?? false { | ||
| SettingsCard { | ||
| ProUpgradeCard(flow: accountFlow) | ||
| } | ||
| .settingsSearchAnchors(["setting:account:pro"]) | ||
|
cursor[bot] marked this conversation as resolved.
Resolved
|
||
| } | ||
|
cursor[bot] marked this conversation as resolved.
Resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Settings Pro card ignores flag updatesMedium Severity The Account Pro upgrade card is gated on Additional Locations (1)Reviewed by Cursor Bugbot for commit 22fbba1. Configure here. |
||
| } | ||
| } | ||
| } | ||


Uh oh!
There was an error while loading. Please reload this page.