Skip to content

Commit 76869e5

Browse files
committed
feat(webapp): bracketed combined limit in the Limit column
Queues that set a combinedConcurrencyLimit show it bracketed next to the per-key limit with a fine dashed underline and an explanatory tooltip; the Limit header tooltip is width-capped. Queues without one are unchanged.
1 parent d6aab23 commit 76869e5

1 file changed

Lines changed: 56 additions & 18 deletions

File tree

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues

‎apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues/route.tsx‎

Lines changed: 56 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ function QueuesWithMetricsView() {
707707
<TableHeaderCell
708708
alignment="right"
709709
disableTooltipHoverableContent
710-
tooltip="How many runs can execute at once. For queues with a combinedConcurrencyLimit, the limit applies per concurrency key and the combined limit applies across all keys."
710+
tooltip="How many runs can execute at once. When a queue sets a combinedConcurrencyLimit, the main value applies per concurrency key and the bracketed value caps runs across all keys."
711+
tooltipContentClassName="max-w-xs"
711712
>
712713
Limit
713714
</TableHeaderCell>
@@ -886,14 +887,32 @@ function QueuesWithMetricsView() {
886887
limit
887888
)}
888889
{queue.concurrency?.combined?.current != null ? (
889-
<span className="ml-1 text-text-dimmed group-hover/table-row:text-text-bright">
890-
/key ·{" "}
891-
{Math.min(
892-
queue.concurrency.combined.current,
893-
environment.concurrencyLimit
894-
)}{" "}
895-
combined
896-
</span>
890+
<SimpleTooltip
891+
disableHoverableContent
892+
buttonClassName="ml-1 cursor-default"
893+
button={
894+
<span className="text-text-dimmed bg-repeat-x pb-[3px] [background-image:linear-gradient(to_right,currentColor_2px,transparent_2px)] [background-position:bottom] [background-size:4px_1px] group-hover/table-row:text-text-bright">
895+
(
896+
{Math.min(
897+
queue.concurrency.combined.current,
898+
environment.concurrencyLimit
899+
)}
900+
)
901+
</span>
902+
}
903+
content={
904+
<>
905+
Combined limit: at most{" "}
906+
{Math.min(
907+
queue.concurrency.combined.current,
908+
environment.concurrencyLimit
909+
)}{" "}
910+
runs across all concurrency keys of this queue. The main limit
911+
applies to each key separately.
912+
</>
913+
}
914+
className="max-w-[260px]"
915+
/>
897916
) : null}
898917
</TableCell>
899918
<TableCell
@@ -1807,7 +1826,8 @@ function ClassicQueuesView() {
18071826
<TableHeaderCell alignment="right">Running</TableHeaderCell>
18081827
<TableHeaderCell
18091828
alignment="right"
1810-
tooltip="How many runs can execute at once. For queues with a combinedConcurrencyLimit, the limit applies per concurrency key and the combined limit applies across all keys."
1829+
tooltip="How many runs can execute at once. When a queue sets a combinedConcurrencyLimit, the main value applies per concurrency key and the bracketed value caps runs across all keys."
1830+
tooltipContentClassName="max-w-xs"
18111831
>
18121832
Limit
18131833
</TableHeaderCell>
@@ -1940,14 +1960,32 @@ function ClassicQueuesView() {
19401960
>
19411961
{limit}
19421962
{queue.concurrency?.combined?.current != null ? (
1943-
<span className="ml-1 text-text-dimmed">
1944-
/key ·{" "}
1945-
{Math.min(
1946-
queue.concurrency.combined.current,
1947-
environment.concurrencyLimit
1948-
)}{" "}
1949-
combined
1950-
</span>
1963+
<SimpleTooltip
1964+
disableHoverableContent
1965+
buttonClassName="ml-1 cursor-default"
1966+
button={
1967+
<span className="text-text-dimmed bg-repeat-x pb-[3px] [background-image:linear-gradient(to_right,currentColor_2px,transparent_2px)] [background-position:bottom] [background-size:4px_1px]">
1968+
(
1969+
{Math.min(
1970+
queue.concurrency.combined.current,
1971+
environment.concurrencyLimit
1972+
)}
1973+
)
1974+
</span>
1975+
}
1976+
content={
1977+
<>
1978+
Combined limit: at most{" "}
1979+
{Math.min(
1980+
queue.concurrency.combined.current,
1981+
environment.concurrencyLimit
1982+
)}{" "}
1983+
runs across all concurrency keys of this queue. The main limit
1984+
applies to each key separately.
1985+
</>
1986+
}
1987+
className="max-w-[260px]"
1988+
/>
19511989
) : null}
19521990
</TableCell>
19531991
<TableCell

0 commit comments

Comments
 (0)