Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
19 changes: 16 additions & 3 deletions apps/webapp/app/components/environments/EnvironmentLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,40 @@ export function EnvironmentCombo({
environment,
className,
iconClassName,
tooltipSideOffset,
tooltipSide,
}: {
environment: Environment;
className?: string;
iconClassName?: string;
tooltipSideOffset?: number;
tooltipSide?: "top" | "right" | "bottom" | "left";
}) {
return (
<span className={cn("flex items-center gap-1.5 text-sm text-text-bright", className)}>
<EnvironmentIcon
environment={environment}
className={cn("size-4.5 shrink-0", iconClassName)}
/>
<EnvironmentLabel environment={environment} />
<EnvironmentLabel
environment={environment}
tooltipSideOffset={tooltipSideOffset}
tooltipSide={tooltipSide}
/>
</span>
);
}

export function EnvironmentLabel({
environment,
className,
tooltipSideOffset = 34,
tooltipSide = "right",
}: {
environment: Environment;
className?: string;
tooltipSideOffset?: number;
tooltipSide?: "top" | "right" | "bottom" | "left";
}) {
const spanRef = useRef<HTMLSpanElement>(null);
const [isTruncated, setIsTruncated] = useState(false);
Expand Down Expand Up @@ -115,9 +127,10 @@ export function EnvironmentLabel({
{text}
</span>
}
side="right"
side={tooltipSide}
variant="dark"
sideOffset={34}
sideOffset={tooltipSideOffset}
disableHoverableContent
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/app/components/primitives/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export const LinkButton = ({
to={to}
ref={innerRef}
replace={replace}
className={cn("group/button block focus-custom", props.fullWidth ? "w-full" : "")}
className={cn("group/button block focus-custom", props.fullWidth ? "w-full" : "w-fit")}
onClick={onClick}
onMouseDown={onMouseDown}
onMouseEnter={onMouseEnter}
Expand Down
8 changes: 8 additions & 0 deletions apps/webapp/app/components/primitives/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ const variants = {
menuButtonDivider: "group-hover/table-row:border-charcoal-600/70",
rowSelected: "bg-charcoal-750 group-hover/table-row:bg-charcoal-750",
},
"bright/no-hover": {
header: "bg-transparent",
cell: "group-hover/table-row:bg-transparent",
stickyCell: "bg-background-bright",
menuButton: "bg-background-bright",
menuButtonDivider: "",
rowSelected: "bg-charcoal-750",
},
dimmed: {
header: "bg-background-dimmed",
cell: "group-hover/table-row:bg-charcoal-800 group-has-[[tabindex='0']:focus]/table-row:bg-background-bright",
Expand Down
1 change: 1 addition & 0 deletions apps/webapp/app/components/primitives/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function SimpleTooltip({
<TooltipProvider disableHoverableContent={disableHoverableContent}>
<Tooltip open={open} onOpenChange={onOpenChange}>
<TooltipTrigger
type="button"
tabIndex={-1}
Comment on lines +88 to 89

Choose a reason for hiding this comment

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

🟡 MEDIUM - Intentional tabIndex=-1 on tooltip trigger
Agent: react

Category: quality

Description:
SimpleTooltip uses tabIndex={-1} on type='button' element. This is likely intentional to prevent tooltip triggers from being focusable while still being mouse-interactive, but should be documented.

Suggestion:
Add a comment explaining why tabIndex={-1} is used intentionally, or consider if keyboard accessibility should be supported.

Confidence: 60%
Rule: ts_use_appropriate_tabindex_values
Review ID: fb475f6c-79ba-4905-bbc9-50e570158b3a
Rate it 👍 or 👎 to improve future reviews | Powered by diffray

className={cn("h-fit", buttonClassName)}
style={buttonStyle}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { conform, useFieldList, useForm } from "@conform-to/react";
import { parse } from "@conform-to/zod";
import {
ArrowDownIcon,
EnvelopeIcon,
ExclamationTriangleIcon,
InformationCircleIcon,
Expand All @@ -18,6 +19,7 @@ import {
import { json, type ActionFunctionArgs, type LoaderFunctionArgs } from "@remix-run/server-runtime";
import { tryCatch } from "@trigger.dev/core";
import { useEffect, useState } from "react";
import simplur from "simplur";
import { typedjson, useTypedLoaderData } from "remix-typedjson";
import { z } from "zod";
import { AdminDebugTooltip } from "~/components/admin/debugTooltip";
Expand Down Expand Up @@ -331,7 +333,7 @@ function Upgradable({
disabled={unallocated < 0 ? false : allocationModified}
/>
</div>
<Table>
<Table variant="bright/no-hover">
<TableBody>
<TableRow>
<TableCell className="pl-0 text-text-bright">Extra concurrency purchased</TableCell>
Expand Down Expand Up @@ -379,8 +381,15 @@ function Upgradable({
)}
</TableCell>
</TableRow>
<TableRow className={allocationModified ? undefined : "after:bg-transparent"}>
<TableCell colSpan={2} className="py-0">
<TableRow
className={
allocationModified || unallocated > 0 ? undefined : "after:bg-transparent"
}
>
<TableCell
colSpan={2}
className={cn("py-0", (unallocated > 0 || allocationModified) && "pr-0")}
>
<div className="flex h-10 items-center">
{allocationModified ? (
unallocated < 0 ? (
Expand Down Expand Up @@ -419,6 +428,16 @@ function Upgradable({
</Button>
</div>
)
) : unallocated > 0 ? (
<div className="flex h-full w-full items-center justify-between bg-success/10 px-2.5">
<div className="flex items-center justify-start gap-1">
<InformationCircleIcon className="size-4 text-success" />
<span className="text-success">
You have {unallocated} extra concurrency available to allocate below.
</span>
</div>
<ArrowDownIcon className="size-4 animate-bounce text-success" />
</div>
) : (
<></>
)}
Expand All @@ -434,7 +453,7 @@ function Upgradable({
<div className="flex items-center pb-1">
<Header3 className="grow">Concurrency allocation</Header3>
</div>
<Table>
<Table variant="bright/no-hover">
<TableHeader>
<TableRow>
<TableHeaderCell className="pl-0">Environment</TableHeaderCell>
Expand All @@ -452,7 +471,12 @@ function Upgradable({
{environments.map((environment, index) => (
<TableRow key={environment.id}>
<TableCell>
<EnvironmentCombo environment={environment} />
<EnvironmentCombo
environment={environment}
className="max-w-[18ch]"
tooltipSideOffset={6}
tooltipSide="top"
/>
</TableCell>
<TableCell alignment="right">{environment.planConcurrencyLimit}</TableCell>
<TableCell alignment="right">
Expand Down Expand Up @@ -523,7 +547,7 @@ function NotUpgradable({ environments }: { environments: EnvironmentWithConcurre
</>
) : null}
<div className="mt-3 flex flex-col gap-3">
<Table>
<Table variant="bright/no-hover">
<TableHeader>
<TableRow>
<TableHeaderCell className="pl-0">Environment</TableHeaderCell>
Expand Down Expand Up @@ -682,7 +706,7 @@ function PurchaseConcurrencyModal({
</div>
<div className="grid grid-cols-2 text-xs">
<span className="text-text-dimmed">
({extraConcurrency / concurrencyPricing.stepSize} bundles)
({simplur`${extraConcurrency / concurrencyPricing.stepSize} bundle[|s]`})
</span>
<span className="justify-self-end text-text-dimmed">/mth</span>
</div>
Expand All @@ -703,8 +727,11 @@ function PurchaseConcurrencyModal({
</div>
<div className="grid grid-cols-2 text-xs">
<span className="text-text-dimmed">
({(amountValue - extraConcurrency) / concurrencyPricing.stepSize} bundles @{" "}
{formatCurrency(concurrencyPricing.centsPerStep / 100, true)}/mth)
(
{simplur`${
(amountValue - extraConcurrency) / concurrencyPricing.stepSize
} bundle[|s]`}{" "}
@ {formatCurrency(concurrencyPricing.centsPerStep / 100, true)}/mth)
</span>
<span className="justify-self-end text-text-dimmed">/mth</span>
</div>
Expand All @@ -723,7 +750,7 @@ function PurchaseConcurrencyModal({
</div>
<div className="grid grid-cols-2 text-xs">
<span className="text-text-dimmed">
({amountValue / concurrencyPricing.stepSize} bundles)
({simplur`${amountValue / concurrencyPricing.stepSize} bundle[|s]`})
</span>
<span className="justify-self-end text-text-dimmed">/mth</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import RateLimitHitUseBatchTrigger from "/snippets/rate-limit-hit-use-batchtrigg
| Hobby | 25 concurrent runs |
| Pro | 100+ concurrent runs |

Additional bundles above the Pro tier are available for $50/month per 50 concurrent runs. Contact us via [email](https://trigger.dev/contact) or [Discord](https://trigger.dev/discord) to request more.
Extra concurrency above the Pro tier limit is available via the dashboard. Click the "Concurrency" page from the left sidebar when on the Pro plan to purchase more.

## Rate limits

Expand Down