Skip to content

Commit d7953c6

Browse files
chat-ui owns the chat wire modules; drop not-carried chat features from web (CL-8175) (#808)
1 parent e763e90 commit d7953c6

43 files changed

Lines changed: 63 additions & 6377 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/web/src/block-response-actions.test.ts‎

Lines changed: 0 additions & 55 deletions
This file was deleted.

‎apps/web/src/block-response-actions.ts‎

Lines changed: 0 additions & 72 deletions
This file was deleted.

‎apps/web/src/insights-stats.test.ts‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function scheduled(
4242
}
4343

4444
describe("computeInsightsStats", () => {
45-
test("counts purposeful runs by status and drops workbench hosts", () => {
45+
test("counts purposeful runs by status", () => {
4646
const stats = computeInsightsStats(
4747
[
4848
run({
@@ -60,12 +60,6 @@ describe("computeInsightsStats", () => {
6060
status: "stopped",
6161
createdAt: "2026-01-01T00:00:00.000Z",
6262
}),
63-
run({
64-
id: "host",
65-
status: "running",
66-
definitionName: "ins-0f1e2d3c4b5a69788796a5b4c3d2e1f0",
67-
createdAt: "2026-01-04T00:00:00.000Z",
68-
}),
6963
],
7064
[
7165
scheduled({ definitionId: "r1", status: "deployed" }),
@@ -128,17 +122,8 @@ describe("computeInsightsStats", () => {
128122
});
129123

130124
describe("purposeRunsForInsights", () => {
131-
const workbenchHost = run({
132-
id: "host",
133-
status: "running",
134-
definitionName: "ins-0f1e2d3c4b5a69788796a5b4c3d2e1f0",
135-
});
136125
const deployment = run({ id: "ins_deployed", status: "running" });
137126

138-
test("drops a workbench-host run by its definition-name pattern", () => {
139-
expect(purposeRunsForInsights([deployment, workbenchHost])).toEqual([deployment]);
140-
});
141-
142127
test("leaves an ordinary top-level deployment run alone", () => {
143128
expect(purposeRunsForInsights([deployment])).toEqual([deployment]);
144129
});

‎apps/web/src/insights-stats.ts‎

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// routines). No new analytics backend — I1 is an honest live surface on
33
// existing endpoints.
44

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

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

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

5851
/**

‎apps/web/src/pages/chat-page.tsx‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import { libraryArtifactPath } from "@corbits/artifact-ui";
77
import { describeApiError } from "@corbits/api-query";
8-
import { listPrincipals } from "@corbits/settings-ui";
98
import { ChatWorkspace, fetchWorkbenchBlob, type Part } from "@corbits/chat-ui";
109
import {
1110
getResolvedCatalog,
@@ -16,7 +15,6 @@ import { useCallback, useEffect, useMemo } from "react";
1615

1716
import { fetchArtifactDetail } from "../api";
1817
import { createChatApprovalActions } from "../approval-actions";
19-
import { createChatBlockResponseActions } from "../block-response-actions";
2018
import { createChatConnectServiceActions } from "../connect-service-actions";
2119
import { useBench } from "../bench-context";
2220
import { useSignOut, useSessionUser } from "../navigation";
@@ -108,13 +106,6 @@ export function ChatPage({
108106
() => (tenantId === null ? undefined : createChatApprovalActions(tenantId, queryClient)),
109107
[tenantId, queryClient],
110108
);
111-
const blockResponses = useMemo(
112-
() =>
113-
tenantId === null || workbenchId === null
114-
? undefined
115-
: createChatBlockResponseActions(tenantId, workbenchId),
116-
[tenantId, workbenchId],
117-
);
118109
const connectServiceActions = useMemo(
119110
() => (tenantId === null ? undefined : createChatConnectServiceActions(tenantId, path)),
120111
[tenantId, path],
@@ -131,12 +122,6 @@ export function ChatPage({
131122
// the click).
132123
const providerHealthBanner = useProviderHealthBanner();
133124
const requestPluginsConnect = useRequestPluginsConnect();
134-
const listMembers = useCallback(async (memberTenantId: string) => {
135-
const principals = await listPrincipals(memberTenantId);
136-
return principals
137-
.filter((p) => p.kind === "user" && p.status === "active")
138-
.map((p) => ({ id: p.id, displayName: p.displayName }));
139-
}, []);
140125

141126
const handleFixConnection = useCallback(() => {
142127
if (providerHealthBanner === null) {
@@ -264,9 +249,7 @@ export function ChatPage({
264249
{...(hasUsableModel !== undefined ? { hasUsableModel } : {})}
265250
onConnectModel={handleConnectModel}
266251
{...(approvalActions !== undefined ? { approvalActions } : {})}
267-
{...(blockResponses !== undefined ? { blockResponses } : {})}
268252
{...(connectServiceActions !== undefined ? { connectServiceActions } : {})}
269-
listMembers={listMembers}
270253
onWorkbenchNotFound={reportWorkbenchNotFound}
271254
onGoToMissionControl={() => navigate(MISSION_CONTROL_PATH)}
272255
onNewWorkbench={() => navigate(NEW_WORKBENCH_PATH)}

0 commit comments

Comments
 (0)