Skip to content

Commit 157c4a6

Browse files
committed
fix(webapp): sparkline totals keep their threshold colors in System themes
The mono treatment assumes an icon carries the state; sparkline totals have none, so uncoloring them erased the p95 and throttled warnings entirely.
1 parent b89c87c commit 157c4a6

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

  • apps/webapp/app

apps/webapp/app/components/primitives/UsageSparkline.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ export function UsageSparkline({
106106
</BarChart>
107107
</ResponsiveContainer>
108108
</div>
109+
{/* No system-mono-label on the total: its color is often the only signal
110+
(threshold breaches), there is no icon to carry it */}
109111
{hideTotal ? null : (
110-
<span className={cn("-mt-1 text-xs tabular-nums system-mono-label", totalClassName)}>
112+
<span className={cn("-mt-1 text-xs tabular-nums", totalClassName)}>
111113
{formatTotal ? formatTotal(total) : total.toLocaleString()}
112114
</span>
113115
)}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ const QUEUE_HEADER_TILES: QueueHeaderTile[] = [
13601360
points,
13611361
total: worst,
13621362
formatTotal: (v) => (v > 0 ? formatWaitMs(v) : "–"),
1363-
totalClassName: worst >= 60_000 ? "system-mono-label text-warning" : undefined,
1363+
totalClassName: worst >= 60_000 ? "text-warning" : undefined,
13641364
};
13651365
},
13661366
},
@@ -1387,7 +1387,7 @@ const QUEUE_HEADER_TILES: QueueHeaderTile[] = [
13871387
points,
13881388
total: pct,
13891389
formatTotal: (v) => `${v}% of current period`,
1390-
totalClassName: pct > 0 ? "system-mono-label text-warning" : undefined,
1390+
totalClassName: pct > 0 ? "text-warning" : undefined,
13911391
};
13921392
},
13931393
},

0 commit comments

Comments
 (0)