Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions frontend/src/components/AccountMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ export function AccountMenu() {
const hasStripeAccount = billingStatus?.stripe_customer_id !== null;
const productName = billingStatus?.product_name || "";
const isPro = productName.toLowerCase().includes("pro");
const isMax = productName.toLowerCase().includes("max");
const isStarter = productName.toLowerCase().includes("starter");
const isTeamPlan = productName.toLowerCase().includes("team");
const showUpgrade = !isPro && !isTeamPlan;
const showManage = (isPro || isStarter || isTeamPlan) && hasStripeAccount;
const showUpgrade = !isMax && !isTeamPlan;
Comment thread
AnthonyRonning marked this conversation as resolved.
const showManage = (isPro || isMax || isStarter || isTeamPlan) && hasStripeAccount;

// Fetch team status if user has team plan
const { data: teamStatus } = useQuery<TeamStatus>({
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/BillingStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function BillingStatus() {
}

const isFree = billingStatus.product_name.toLowerCase().includes("free");
const isPro = billingStatus.product_name.toLowerCase().includes("pro");
const isMax = billingStatus.product_name.toLowerCase().includes("max");

const getChatsText = () => {
if (isFree) {
Expand All @@ -58,7 +58,7 @@ export function BillingStatus() {
return `Free Plan — ${billingStatus.chats_remaining} Message${billingStatus.chats_remaining === 1 ? "" : "s"} Left This Week`;
}
if (!billingStatus.can_chat) {
if (isPro) {
if (isMax) {
return "Contact us to increase your limits";
}
return "You've run out of messages, upgrade to keep chatting!";
Expand All @@ -80,7 +80,7 @@ export function BillingStatus() {
<Button
variant="default"
onClick={() =>
!billingStatus.can_chat && isPro
!billingStatus.can_chat && isMax
? (window.location.href = "mailto:team@opensecret.cloud")
: navigate({ to: "/pricing" })
}
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/ChatBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ export default function Component({
needsStarter &&
(freshBillingStatus?.product_name?.toLowerCase().includes("starter") ||
freshBillingStatus?.product_name?.toLowerCase().includes("pro") ||
freshBillingStatus?.product_name?.toLowerCase().includes("max") ||
freshBillingStatus?.product_name?.toLowerCase().includes("team"))
) {
return modelId;
Expand Down Expand Up @@ -503,10 +504,11 @@ export default function Component({
// Check if system prompt can be edited (only for new chats)
const canEditSystemPrompt = canUseSystemPrompt && messages.length === 0;

// Check if user has access to Pro/Team features (Pro or Team plan)
// Check if user has access to Pro/Team/Max features (Pro, Max, or Team plan)
const hasProTeamAccess =
freshBillingStatus &&
(freshBillingStatus.product_name?.toLowerCase().includes("pro") ||
freshBillingStatus.product_name?.toLowerCase().includes("max") ||
freshBillingStatus.product_name?.toLowerCase().includes("team"));

const canUseDocuments = hasProTeamAccess;
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/CreditUsage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ export function CreditUsage() {
);
const roundedPercent = Math.round(percentUsed);

// For Max plan users, only show if usage is 90% or higher
const isMaxPlan = billingStatus.product_name?.toLowerCase().includes("max");
Comment thread
AnthonyRonning marked this conversation as resolved.
if (isMaxPlan && percentUsed < 90) {
return null;
}

// Set bar color based on usage
const getBarColor = () => {
if (percentUsed >= 90) return "rgb(239, 68, 68)"; // Tailwind red-500
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/components/Marketing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,11 @@ export function Marketing() {
</p>
</div>

<div className="grid grid-cols-1 md:grid-cols-4 gap-8">
{PRICING_PLANS.map((plan) => (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
Comment thread
AnthonyRonning marked this conversation as resolved.
{PRICING_PLANS.filter((plan) => {
// Always hide Starter plan on marketing page
return plan.name.toLowerCase() !== "starter";
}).map((plan) => (
<PricingTier
key={plan.name}
name={plan.name}
Expand Down
13 changes: 9 additions & 4 deletions frontend/src/components/ModelSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,19 @@ export function ModelSelector({

const planName = billingStatus?.product_name?.toLowerCase() || "";

// Check if user is on Pro or Team plan (for requiresPro models)
// Check if user is on Pro, Max, or Team plan (for requiresPro models)
if (config?.requiresPro) {
return planName.includes("pro") || planName.includes("team");
return planName.includes("pro") || planName.includes("max") || planName.includes("team");
}

// Check if user is on Starter, Pro, or Team plan (for requiresStarter models)
// Check if user is on Starter, Pro, Max, or Team plan (for requiresStarter models)
if (config?.requiresStarter) {
return planName.includes("starter") || planName.includes("pro") || planName.includes("team");
return (
planName.includes("starter") ||
planName.includes("pro") ||
planName.includes("max") ||
planName.includes("team")
);
}

return true;
Expand Down
41 changes: 38 additions & 3 deletions frontend/src/config/pricingConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ export const PRICING_PLANS: PricingPlan[] = [
description: "For power users who need more",
features: [
{
text: "All features from Starter",
text: "All features from Free",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
},
Comment thread
AnthonyRonning marked this conversation as resolved.
{
text: "5x more messages than Starter",
text: "Generous usage for power users",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
},
Expand Down Expand Up @@ -134,6 +134,41 @@ export const PRICING_PLANS: PricingPlan[] = [
ctaText: "Start Chatting",
popular: true
},
{
name: "Max",
price: "$100",
description: "Maximum usage for power users",
features: [
{
text: "All features from Pro",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
},
{
text: "10x more usage than Pro",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
},
{
text: "Priority support",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
},
{ text: "Gemma 3 27B", included: true, icon: <Check className="w-4 h-4 text-green-500" /> },
{
text: "DeepSeek R1 70B",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
},
{ text: "Image Upload", included: true, icon: <Check className="w-4 h-4 text-green-500" /> },
{
text: "Document Upload",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
}
],
ctaText: "Start Chatting"
},
{
name: "Team",
price: "$30",
Expand All @@ -145,7 +180,7 @@ export const PRICING_PLANS: PricingPlan[] = [
icon: <Check className="w-4 h-4 text-green-500" />
},
{
text: "8x more messages than Starter per user",
text: "Even more usage per team member",
included: true,
icon: <Check className="w-4 h-4 text-green-500" />
},
Expand Down
Loading