Skip to content
Merged
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
6 changes: 6 additions & 0 deletions apps/web/src/bench/drawer.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,9 @@
.drawer-grant-mode[data-effect="deny"] {
color: var(--ink-2);
}
.drawer .bi-stat {
padding: 0;
border: 0;
border-radius: 0;
background: none;
}
15 changes: 11 additions & 4 deletions apps/web/src/insights-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

import { runOutcomeStatus, withListingAbandoned } from "@corbits/workflows/client";

import { isAgentDeploySourceAssetName } from "./agent-deploy";
import type { InsightsRun } from "./insights-api";
import { MYRA_SOURCE_CONFIG } from "./myra-source";

/** Compact integer; null/undefined → em-dash. Lifted out of the deleted
* `@corbits/insights/client` — this app's own copy since it has
Expand All @@ -21,10 +23,15 @@ export function durationLabel(ms: number): string {
return `${(ms / 60_000).toFixed(1)}m`;
}

// Identity pass: the native `GET /workflows/runs` feed already excludes
// non-top-level runs, kept only for callers that still name it explicitly.
// The native feed already excludes non-top-level runs; what remains to drop
// are the platform's own deploy-source runs (Myra and created agents), which
// are plumbing, not a person's workflows.
export function purposeRunsForInsights(runs: readonly InsightsRun[]): readonly InsightsRun[] {
return runs;
return runs.filter(
(run) =>
run.definitionName !== MYRA_SOURCE_CONFIG.assetName &&
!isAgentDeploySourceAssetName(run.definitionName),
);
}

// Falls back to definition name since the native feed carries no
Expand Down Expand Up @@ -145,7 +152,7 @@ export function computeBenchInsights(
}
const start = days[0]?.date.getTime() ?? 0;

const inRange = runs.filter((run) => {
const inRange = purposeRunsForInsights(runs).filter((run) => {
const t = Date.parse(run.createdAt);
return !Number.isNaN(t) && t >= start && t <= now;
});
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/workbench-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function Workbench({ workbenchTenantId }: { readonly workbenchTenantId: string }
<BenchDrawer
open={drawerOpen}
title={tenant.data?.name ?? "Workbench"}
subtitle={benchDescription === "" ? workerStatus.text : benchDescription}
subtitle={benchDescription}
onClose={closeDrawer}
tabs={{
Information: (
Expand Down
Loading