diff --git a/apps/web/src/bench/bench-drawer.tsx b/apps/web/src/bench/bench-drawer.tsx index 780572e1b..770bc279f 100644 --- a/apps/web/src/bench/bench-drawer.tsx +++ b/apps/web/src/bench/bench-drawer.tsx @@ -46,10 +46,29 @@ export function BenchDrawer({ active.offsetLeft < strip.scrollLeft || active.offsetLeft + active.offsetWidth > strip.scrollLeft + strip.clientWidth ) { - strip.scrollLeft = active.offsetLeft - 16; + strip.scrollLeft = Math.max(0, active.offsetLeft - 32); } }, [tab, open]); + // Edge fades show only on the side that still has tabs to scroll to. + useEffect(() => { + const strip = stripRef.current; + if (strip === null) return; + const update = () => { + const max = strip.scrollWidth - strip.clientWidth; + strip.dataset["fadeStart"] = String(strip.scrollLeft > 1); + strip.dataset["fadeEnd"] = String(strip.scrollLeft < max - 1); + }; + update(); + strip.addEventListener("scroll", update, { passive: true }); + const observer = new ResizeObserver(update); + observer.observe(strip); + return () => { + strip.removeEventListener("scroll", update); + observer.disconnect(); + }; + }, []); + useEffect(() => { if (!open) return; // preventScroll: focusing must never shift the thread's scroll position. diff --git a/apps/web/src/bench/drawer.css b/apps/web/src/bench/drawer.css index 7a3b644ce..e97435f5d 100644 --- a/apps/web/src/bench/drawer.css +++ b/apps/web/src/bench/drawer.css @@ -1,8 +1,28 @@ /* Drawer chrome and tab-body sections: unboxed, per the mockup. */ .drawer .drawer-tabs { - -webkit-mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); - mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); + --fade-start: #000; + --fade-end: #000; + -webkit-mask: linear-gradient( + 90deg, + var(--fade-start), + #000 28px, + #000 calc(100% - 28px), + var(--fade-end) + ); + mask: linear-gradient( + 90deg, + var(--fade-start), + #000 28px, + #000 calc(100% - 28px), + var(--fade-end) + ); +} +.drawer .drawer-tabs[data-fade-start="true"] { + --fade-start: transparent; +} +.drawer .drawer-tabs[data-fade-end="true"] { + --fade-end: transparent; } .drawer .drawer-tabs button:last-child { margin-right: 24px; diff --git a/apps/web/src/bench/insights-tab.tsx b/apps/web/src/bench/insights-tab.tsx index 42461bb6b..91c18fd72 100644 --- a/apps/web/src/bench/insights-tab.tsx +++ b/apps/web/src/bench/insights-tab.tsx @@ -33,9 +33,11 @@ export function InsightsTab({ workbenchTenantId }: { readonly workbenchTenantId: ]; return ( -
-
-

Last 7 days

+
+
+
+

Last 7 days

+
{tiles.map(([label, value]) => (
@@ -45,8 +47,10 @@ export function InsightsTab({ workbenchTenantId }: { readonly workbenchTenantId: ))}
-
-

Runs per day

+
+
+

Runs per day

+
p.kind === "agent"); return ( -
-
-

People

+
+
+
+

People

+
{people.isPending ? : null} {people.isError ? (
-
-

Agents

+
+
+

Agents

+
{loading ? : null} {!loading && agents.length === 0 ? (

No agents yet.

@@ -74,7 +78,7 @@ export function MembersTab({ {agent.name} - {agent.address === "" ? "Starting" : "Live"} + {agent.address === "" ? "Starting" : "Running"}