TypeScript
fix(web): align usage table padding and thread status rows
Yash Singh3368dd70f20c
diff --git a/apps/web/src/components/chat/ThreadNow.tsx b/apps/web/src/components/chat/ThreadNow.tsxindex f31344cadcf..3e6374ec8c9 100644--- a/apps/web/src/components/chat/ThreadNow.tsx+++ b/apps/web/src/components/chat/ThreadNow.tsx@@ -36,10 +36,10 @@ function ThreadNowLine({return (<divrole={announce ? "alert" : undefined}- className={lineClassName}+ className={cn(lineClassName, "items-baseline")}data-thread-now-line="true">- <span aria-hidden className="flex size-3.5 shrink-0 items-center justify-center">+ <span aria-hidden className="flex size-3.5 shrink-0 self-center items-center justify-center">{item.icon}</span>{/* Title and detail read as one line that gives way before the actions, so Stop stays@@ -61,7 +61,7 @@ function ThreadNowLine({) : null}</NoticeText>{item.actions ? (- <span className="ms-1.5 flex shrink-0 items-center gap-2.5">{item.actions}</span>+ <span className="ms-1.5 flex shrink-0 items-baseline gap-2.5">{item.actions}</span>) : null}</div>);diff --git a/apps/web/src/components/usage/UsagePage.tsx b/apps/web/src/components/usage/UsagePage.tsxindex fb7e29948ec..b4ec17a8940 100644--- a/apps/web/src/components/usage/UsagePage.tsx+++ b/apps/web/src/components/usage/UsagePage.tsx@@ -920,11 +920,11 @@ function UsageOverview({<table className="w-full text-sm"><thead><tr className="border-b border-border text-right text-xs text-muted-foreground">- <th className="py-2 pr-3 text-left font-normal">#</th>+ <th className="py-2 pr-3 pl-2 text-left font-normal">#</th><th className="w-full py-2 text-left font-normal">Model</th><th className="py-2 pl-6 font-normal">Cost</th><th className="hidden py-2 pl-6 font-normal sm:table-cell">Share</th>- <th className="py-2 pl-6 font-normal">Tokens</th>+ <th className="py-2 pr-2 pl-6 font-normal">Tokens</th></tr></thead><tbody>@@ -946,7 +946,7 @@ function UsageOverview({key={key}className="relative border-b border-border/50 text-right whitespace-nowrap text-muted-foreground tabular-nums transition-colors hover:bg-muted/50 has-focus-visible:bg-muted/50">- <td className="py-2.5 pr-3 text-left text-xs">{index + 1}</td>+ <td className="py-2.5 pr-3 pl-2 text-left text-xs">{index + 1}</td><td className="py-2.5 text-left whitespace-normal"><buttontype="button"@@ -981,7 +981,7 @@ function UsageOverview({<td className={cn("hidden py-2.5 pl-6 sm:table-cell", rowFigures)}>{share === null ? "" : formatPercent(share)}</td>- <td className={cn("py-2.5 pl-6", rowFigures)}>+ <td className={cn("py-2.5 pr-2 pl-6", rowFigures)}>{formatTokens(model.totalTokens)}</td></tr>@@ -1003,14 +1003,14 @@ function UsageOverview({</colgroup><thead><tr className="border-b border-border text-left text-xs text-muted-foreground">- <th className="py-2 font-normal">{shownHourly ? "Hour" : "Day"}</th>+ <th className="py-2 pl-2 font-normal">{shownHourly ? "Hour" : "Day"}</th>{activeProviders.map((provider) => (<th key={provider} className="py-2 pl-4 text-right font-normal">{PROVIDER_PRESENTATION[provider].label}</th>))}<th className="py-2 pl-4 text-right font-normal">Total</th>- <th className="py-2 pl-4 text-right font-normal">Tokens</th>+ <th className="py-2 pr-2 pl-4 text-right font-normal">Tokens</th></tr></thead><tbody>@@ -1029,7 +1029,7 @@ function UsageOverview({key={"hourStart" in period ? period.hourStart : period.day}className="border-b border-border/50 transition-colors hover:bg-muted/50">- <td className="py-2 text-foreground">+ <td className="py-2 pl-2 text-foreground">{"hourStart" in period? formatHourShort(period.hourStart, shownWindow.timeZone, hour12): formatDayShort(period.day)}@@ -1055,7 +1055,7 @@ function UsageOverview({</td><tdclassName={cn(- "py-2 pl-4 text-right text-muted-foreground tabular-nums",+ "py-2 pr-2 pl-4 text-right text-muted-foreground tabular-nums",figureClass(loadingPartial),)}>