@@ -11,6 +11,7 @@ import { type ActionFunctionArgs } from "@remix-run/server-runtime";
1111import { uiComponent } from "@team-plain/typescript-sdk" ;
1212import { GitHubLightIcon } from "@trigger.dev/companyicons" ;
1313import {
14+ AddOnPricing ,
1415 type FreePlanDefinition ,
1516 type Limits ,
1617 type PaidPlanDefinition ,
@@ -45,6 +46,8 @@ import { requireUser } from "~/services/session.server";
4546import { engine } from "~/v3/runEngine.server" ;
4647import { cn } from "~/utils/cn" ;
4748import { sendToPlain } from "~/utils/plain.server" ;
49+ import { formatCurrency } from "~/utils/numberFormatter" ;
50+ import { EnvironmentLabel } from "~/components/environments/EnvironmentLabel" ;
4851
4952const Params = z . object ( {
5053 organizationSlug : z . string ( ) ,
@@ -173,7 +176,6 @@ const pricingDefinitions = {
173176 } ,
174177 additionalConcurrency : {
175178 title : "Additional concurrency" ,
176- content : "Then $50/month per 50" ,
177179 } ,
178180 taskRun : {
179181 title : "Task runs" ,
@@ -227,6 +229,7 @@ const pricingDefinitions = {
227229
228230type PricingPlansProps = {
229231 plans : Plans ;
232+ concurrencyAddOnPricing : AddOnPricing ;
230233 subscription ?: SubscriptionResult ;
231234 organizationSlug : string ;
232235 hasPromotedPlan : boolean ;
@@ -236,6 +239,7 @@ type PricingPlansProps = {
236239
237240export function PricingPlans ( {
238241 plans,
242+ concurrencyAddOnPricing,
239243 subscription,
240244 organizationSlug,
241245 hasPromotedPlan,
@@ -258,7 +262,12 @@ export function PricingPlans({
258262 subscription = { subscription }
259263 isHighlighted = { hasPromotedPlan }
260264 />
261- < TierPro plan = { plans . pro } organizationSlug = { organizationSlug } subscription = { subscription } />
265+ < TierPro
266+ plan = { plans . pro }
267+ organizationSlug = { organizationSlug }
268+ subscription = { subscription }
269+ concurrencyAddOnPricing = { concurrencyAddOnPricing }
270+ />
262271 </ div >
263272 < div className = "mt-3" >
264273 < TierEnterprise />
@@ -654,10 +663,12 @@ export function TierHobby({
654663
655664export function TierPro ( {
656665 plan,
666+ concurrencyAddOnPricing,
657667 organizationSlug,
658668 subscription,
659669} : {
660670 plan : PaidPlanDefinition ;
671+ concurrencyAddOnPricing : AddOnPricing ;
661672 organizationSlug : string ;
662673 subscription ?: SubscriptionResult ;
663674} ) {
@@ -747,7 +758,9 @@ export function TierPro({
747758 </ Form >
748759 < ul className = "flex flex-col gap-2.5" >
749760 < ConcurrentRuns limits = { plan . limits } >
750- { pricingDefinitions . additionalConcurrency . content }
761+ { `Then ${ formatCurrency ( concurrencyAddOnPricing . centsPerStep / 100 , true ) } /month per ${
762+ concurrencyAddOnPricing . stepSize
763+ } `}
751764 </ ConcurrentRuns >
752765 < FeatureItem checked >
753766 Unlimited{ " " }
@@ -963,10 +976,45 @@ function ConcurrentRuns({ limits, children }: { limits: Limits; children?: React
963976 </ >
964977 ) : (
965978 < > { limits . concurrentRuns . number } </ >
966- ) } { " " }
979+ ) }
967980 < DefinitionTip
968981 title = { pricingDefinitions . concurrentRuns . title }
969- content = { pricingDefinitions . concurrentRuns . content }
982+ content = {
983+ < div className = "flex flex-col" >
984+ < Paragraph variant = "small/dimmed" spacing >
985+ { pricingDefinitions . concurrentRuns . content }
986+ </ Paragraph >
987+
988+ < div className = "flex items-center gap-x-1" >
989+ < EnvironmentLabel environment = { { type : "PRODUCTION" } } />
990+ < span >
991+ { limits . concurrentRuns . production }
992+ { limits . concurrentRuns . canExceed ? "+" : "" }
993+ </ span >
994+ </ div >
995+ < div className = "flex items-center gap-x-1" >
996+ < EnvironmentLabel environment = { { type : "STAGING" } } />
997+ < span >
998+ { limits . concurrentRuns . staging }
999+ { limits . concurrentRuns . canExceed ? "+" : "" }
1000+ </ span >
1001+ </ div >
1002+ < div className = "flex items-center gap-x-1" >
1003+ < EnvironmentLabel environment = { { type : "PREVIEW" } } />
1004+ < span >
1005+ { limits . concurrentRuns . preview }
1006+ { limits . concurrentRuns . canExceed ? "+" : "" }
1007+ </ span >
1008+ </ div >
1009+ < div className = "flex items-center gap-x-1" >
1010+ < EnvironmentLabel environment = { { type : "DEVELOPMENT" } } />
1011+ < span >
1012+ { limits . concurrentRuns . development }
1013+ { limits . concurrentRuns . canExceed ? "+" : "" }
1014+ </ span >
1015+ </ div >
1016+ </ div >
1017+ }
9701018 >
9711019 concurrent runs
9721020 </ DefinitionTip >
0 commit comments