Skip to content

Commit 0b37d8a

Browse files
committed
fix(ui): unexport ToastOptions and widen test mock casts for CI gates
1 parent fa9bc41 commit 0b37d8a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

ui/src/lib/toast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { state } from "lit/decorators.js";
33
import { t } from "../i18n/index.ts";
44
import { OpenClawLightDomContentsElement } from "../lit/openclaw-element.ts";
55

6-
export type ToastOptions = {
6+
type ToastOptions = {
77
message: string;
88
actionLabel?: string;
99
onAction?: () => void;

ui/src/pages/sessions/sessions-page.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ describe("sessions page lifecycle", () => {
232232
list: vi.fn(async () => ({
233233
count: 2,
234234
sessions: archivedKeys.map((key) => ({ key, archived: true })),
235-
})) as SessionCapability["list"],
235+
})) as unknown as SessionCapability["list"],
236236
deleteMany: vi.fn(async () => ({
237237
deleted: archivedKeys,
238238
errors: [],
@@ -278,7 +278,7 @@ describe("sessions page lifecycle", () => {
278278

279279
it("aborts delete-all when an enumeration page fails", async () => {
280280
const sessions = createSessions({
281-
list: vi.fn(async () => null) as SessionCapability["list"],
281+
list: vi.fn(async () => null) as unknown as SessionCapability["list"],
282282
deleteMany: vi.fn(async () => ({ deleted: [], errors: [], preservedWorktrees: [] })),
283283
});
284284
sessions.state.error = "list failed";
@@ -318,7 +318,7 @@ describe("sessions page lifecycle", () => {
318318
nextOffset: null,
319319
});
320320
const sessions = createSessions({
321-
list: list as SessionCapability["list"],
321+
list: list as unknown as SessionCapability["list"],
322322
deleteMany: vi.fn(async () => ({
323323
deleted: [...pageOne, ...pageTwo],
324324
errors: [],

0 commit comments

Comments
 (0)