Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
fix(ci): apply the same parser workaround to the last two mock call sites (#196)
Abdurrahman Fakhrula65cfc12c1bd
diff --git a/app/api/v1/agent-groups/route.test.ts b/app/api/v1/agent-groups/route.test.tsindex 2046608c..fa658a94 100644--- a/app/api/v1/agent-groups/route.test.ts+++ b/app/api/v1/agent-groups/route.test.ts@@ -16,7 +16,9 @@ vi.mock("@/lib/auth/require-session", () => ({}));vi.mock("@/lib/agent-group", async (importOriginal) => {- const actual = await importOriginal<typeof import("@/lib/agent-group")>();+ // Cast on its own const: Semgrep's TypeScript parser cannot read a generic argument on+ // `await importOriginal<...>()`, and `--strict` fails the whole scan over it despite 0 findings.+ const actual = await importOriginal() as typeof import("@/lib/agent-group");return {...actual,agentGroupsSnapshot: mocks.agentGroupsSnapshot,diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 69ac5f9e..b1985583 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -13,7 +13,8 @@ this is the *what*, and it is what Settings → Account → About shows as “Wh**Fixed**-- `ci` stop the semgrep scan failing on a generic argument in a test mock+- `ci` apply the same parser workaround to the last two mock call sites+- `ci` stop the semgrep scan failing on a generic argument in a test mock (#195)**Changed**diff --git a/lib/mcp/tools-flows-optimizer.test.ts b/lib/mcp/tools-flows-optimizer.test.tsindex 0c489c21..b8a705a3 100644--- a/lib/mcp/tools-flows-optimizer.test.ts+++ b/lib/mcp/tools-flows-optimizer.test.ts@@ -8,11 +8,11 @@ const f = vi.hoisted(() => ({}));vi.mock("@/lib/workflow/graph-store", async (importOriginal) => {- const actual = await importOriginal<typeof import("@/lib/workflow/graph-store")>();+ const actual = await importOriginal() as typeof import("@/lib/workflow/graph-store");return { ...actual, getWorkflowGraph: f.get, createWorkflowGraph: f.create };});vi.mock("@/lib/workflow/graph-optimizer", async (importOriginal) => {- const actual = await importOriginal<typeof import("@/lib/workflow/graph-optimizer")>();+ const actual = await importOriginal() as typeof import("@/lib/workflow/graph-optimizer");return { ...actual, optimizeWorkflowGraph: f.optimize };});vi.mock("./tools", () => ({ TOOLS_BY_NAME: new Map() }));