Skip to content

Commit c3b7c10

Browse files
committed
refactor(dashboard-agent): move the watch data layer into the Watch PR
The watch tables and the 0002 migration stay here, so the committed drizzle snapshot keeps describing them. The four contract types the schema annotates are widened here and re-narrowed where the watch code lands.
1 parent 8fc6f20 commit c3b7c10

12 files changed

Lines changed: 21 additions & 2487 deletions

File tree

apps/webapp/test/dashboardAgentCreateChatOrdering.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe("dashboard agent chat creation — nothing fallible after the row exist
9393
mocks.mintUserActorToken.mockReset().mockResolvedValue("tr_uat_real");
9494
mocks.mintPublicToken.mockReset().mockResolvedValue("pat_public");
9595
mocks.startSession.mockReset().mockResolvedValue(undefined);
96-
mocks.softDeleteChat.mockReset().mockResolvedValue({ deleted: true, cancelledWatches: [] });
96+
mocks.softDeleteChat.mockReset().mockResolvedValue({ deleted: true });
9797
mocks.env.ANTHROPIC_API_KEY = "sk-test";
9898
});
9999

@@ -144,7 +144,7 @@ describe("dashboard agent chat creation — a start that fails part way", () =>
144144
mocks.mintUserActorToken.mockReset().mockResolvedValue("tr_uat_real");
145145
mocks.mintPublicToken.mockReset().mockResolvedValue("pat_public");
146146
mocks.startSession.mockReset().mockResolvedValue(undefined);
147-
mocks.softDeleteChat.mockReset().mockResolvedValue({ deleted: true, cancelledWatches: [] });
147+
mocks.softDeleteChat.mockReset().mockResolvedValue({ deleted: true });
148148
mocks.env.ANTHROPIC_API_KEY = "sk-test";
149149
mocks.logger.error.mockReset();
150150
});

apps/webapp/test/dashboardAgentTranscriptStore.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,7 @@ describe("countUserMessages", () => {
677677

678678
await persistMessages(agentDb, {
679679
chatId: "chat_a",
680-
// A consent record is a user message but not a turn the user spent, so the
681-
// quota's prefix filter must skip it.
682-
messages: [userMessage("u1"), textMessage("a1"), userMessage("watch-request:req_1")],
680+
messages: [userMessage("u1"), textMessage("a1")],
683681
});
684682
await persistMessages(agentDb, { chatId: "chat_b", messages: [userMessage("u2")] });
685683
await persistMessages(agentDb, { chatId: "chat_gone", messages: [userMessage("u3")] });

internal-packages/dashboard-agent-contracts/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ export * from "./page-context.js";
99
export * from "./run-filters.js";
1010
export * from "./suggested-prompts.js";
1111
export * from "./trigger-uri.js";
12-
export * from "./watch.js";

0 commit comments

Comments
 (0)