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
55 changes: 0 additions & 55 deletions apps/web/src/block-response-actions.test.ts

This file was deleted.

72 changes: 0 additions & 72 deletions apps/web/src/block-response-actions.ts

This file was deleted.

17 changes: 1 addition & 16 deletions apps/web/src/insights-stats.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function scheduled(
}

describe("computeInsightsStats", () => {
test("counts purposeful runs by status and drops workbench hosts", () => {
test("counts purposeful runs by status", () => {
const stats = computeInsightsStats(
[
run({
Expand All @@ -60,12 +60,6 @@ describe("computeInsightsStats", () => {
status: "stopped",
createdAt: "2026-01-01T00:00:00.000Z",
}),
run({
id: "host",
status: "running",
definitionName: "ins-0f1e2d3c4b5a69788796a5b4c3d2e1f0",
createdAt: "2026-01-04T00:00:00.000Z",
}),
],
[
scheduled({ definitionId: "r1", status: "deployed" }),
Expand Down Expand Up @@ -128,17 +122,8 @@ describe("computeInsightsStats", () => {
});

describe("purposeRunsForInsights", () => {
const workbenchHost = run({
id: "host",
status: "running",
definitionName: "ins-0f1e2d3c4b5a69788796a5b4c3d2e1f0",
});
const deployment = run({ id: "ins_deployed", status: "running" });

test("drops a workbench-host run by its definition-name pattern", () => {
expect(purposeRunsForInsights([deployment, workbenchHost])).toEqual([deployment]);
});

test("leaves an ordinary top-level deployment run alone", () => {
expect(purposeRunsForInsights([deployment])).toEqual([deployment]);
});
Expand Down
21 changes: 7 additions & 14 deletions apps/web/src/insights-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// routines). No new analytics backend — I1 is an honest live surface on
// existing endpoints.

import { isWorkbenchHostDefinitionName } from "@corbits/chat-ui/wire/workbench-host-naming";
import { runOutcomeStatus, withListingAbandoned } from "@corbits/workflows/client";

import type { InsightsRun } from "./insights-api";
Expand Down Expand Up @@ -38,21 +37,15 @@ export type InsightsStats = {
export const INSIGHTS_RECENT_LIMIT = 12;

/**
* Purpose runs only — drop workbench-host anchors the same way Home does.
* `insights-page.tsx` sources `runs` from `insightsTopLevelRunsPath` (see
* `./insights-api.ts`), the native `GET /workflows/runs` top-level
* listing (CL-8087) whose own predicate already excludes every
* non-top-level run (workbench host, invited agent). This filter is a
* client-side belt-and-suspenders pass against the workbench-host naming
* pattern alone, not a second scoping layer — a caller no longer needs
* to (and cannot) hand this a non-top-level run id set. CL-6062 replaced
* the dead `/me/workflows/runs` feed (its `anchorRunId IS NULL` filter
* never matched anything, since every addressed run self-anchors at
* creation) with a scoped feed; CL-8087 repointed that scoped feed from
* the deleted `feed=fires` route to the native listing.
* Purpose runs only. `insights-page.tsx` sources `runs` from
* `insightsTopLevelRunsPath` (see `./insights-api.ts`), the native `GET
* /workflows/runs` top-level listing (CL-8087) whose own predicate already
* excludes every non-top-level run — no workbench-host anchors exist to
* filter post-cutover (CL-8175), so this is now an identity pass kept for
* callers that still name it explicitly.
*/
export function purposeRunsForInsights(runs: readonly InsightsRun[]): readonly InsightsRun[] {
return runs.filter((run) => !isWorkbenchHostDefinitionName(run.definitionName));
return runs;
}

/**
Expand Down
17 changes: 0 additions & 17 deletions apps/web/src/pages/chat-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import { libraryArtifactPath } from "@corbits/artifact-ui";
import { describeApiError } from "@corbits/api-query";
import { listPrincipals } from "@corbits/settings-ui";
import { ChatWorkspace, fetchWorkbenchBlob, type Part } from "@corbits/chat-ui";
import {
getResolvedCatalog,
Expand All @@ -16,7 +15,6 @@ import { useCallback, useEffect, useMemo } from "react";

import { fetchArtifactDetail } from "../api";
import { createChatApprovalActions } from "../approval-actions";
import { createChatBlockResponseActions } from "../block-response-actions";
import { createChatConnectServiceActions } from "../connect-service-actions";
import { useBench } from "../bench-context";
import { useSignOut, useSessionUser } from "../navigation";
Expand Down Expand Up @@ -108,13 +106,6 @@ export function ChatPage({
() => (tenantId === null ? undefined : createChatApprovalActions(tenantId, queryClient)),
[tenantId, queryClient],
);
const blockResponses = useMemo(
() =>
tenantId === null || workbenchId === null
? undefined
: createChatBlockResponseActions(tenantId, workbenchId),
[tenantId, workbenchId],
);
const connectServiceActions = useMemo(
() => (tenantId === null ? undefined : createChatConnectServiceActions(tenantId, path)),
[tenantId, path],
Expand All @@ -131,12 +122,6 @@ export function ChatPage({
// the click).
const providerHealthBanner = useProviderHealthBanner();
const requestPluginsConnect = useRequestPluginsConnect();
const listMembers = useCallback(async (memberTenantId: string) => {
const principals = await listPrincipals(memberTenantId);
return principals
.filter((p) => p.kind === "user" && p.status === "active")
.map((p) => ({ id: p.id, displayName: p.displayName }));
}, []);

const handleFixConnection = useCallback(() => {
if (providerHealthBanner === null) {
Expand Down Expand Up @@ -264,9 +249,7 @@ export function ChatPage({
{...(hasUsableModel !== undefined ? { hasUsableModel } : {})}
onConnectModel={handleConnectModel}
{...(approvalActions !== undefined ? { approvalActions } : {})}
{...(blockResponses !== undefined ? { blockResponses } : {})}
{...(connectServiceActions !== undefined ? { connectServiceActions } : {})}
listMembers={listMembers}
onWorkbenchNotFound={reportWorkbenchNotFound}
onGoToMissionControl={() => navigate(MISSION_CONTROL_PATH)}
onNewWorkbench={() => navigate(NEW_WORKBENCH_PATH)}
Expand Down
Loading
Loading