Skip to content

armgit / mso

Public Imported from GitHub
0

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.

test(workflows): target semantic action summary

Rahman86f8db95cd39
diff --git a/frontend/slices/workflows/components/workflow-session-details.tsx b/frontend/slices/workflows/components/workflow-session-details.tsx
index 3a81011f..9e200e58 100644
--- a/frontend/slices/workflows/components/workflow-session-details.tsx
+++ b/frontend/slices/workflows/components/workflow-session-details.tsx
@@ -11,8 +11,8 @@ function value(config: Record<string, unknown>, key: string): string | undefined
const raw = config[key]; return typeof raw === "string" && raw ? raw : undefined;
}
function actionReceipt(action: SessionFlowAction, onOpenTerminal: () => void, onOpenCode: (path: string) => void) {
- return <details key={action.ref} className="group rounded-lg border bg-background/35">
- <summary aria-label={`Inspect action ${action.ref}: ${action.title}`} className="flex cursor-pointer list-none items-start gap-2 p-2.5 text-xs marker:hidden">
+ return <details key={action.ref} data-slot="session-action" data-action-ref={action.ref} className="group rounded-lg border bg-background/35">
+ <summary data-slot="session-action-summary" aria-label={`Inspect action ${action.ref}: ${action.title}`} className="flex cursor-pointer list-none items-start gap-2 p-2.5 text-xs marker:hidden">
<code className="shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] font-semibold">{action.ref}</code>
<div className="min-w-0 flex-1"><div className="break-words font-medium leading-4">{action.title}</div><div className="mt-0.5 text-[10px] text-muted-foreground">{action.tool || action.kind}{action.state ? ` · ${action.state}` : ""}</div></div>
</summary>
diff --git a/scripts/e2e/mcp-sessions.mjs b/scripts/e2e/mcp-sessions.mjs
index f7b55004..d1a78ad7 100644
--- a/scripts/e2e/mcp-sessions.mjs
+++ b/scripts/e2e/mcp-sessions.mjs
@@ -77,7 +77,7 @@ export async function mcpSessionsJourney(page, fixture) {
await expect(page.getByText("Actions", { exact: true }).last()).toBeVisible();
expect(await terminalTabs.count()).toBe(terminalCountBefore); // Selecting a node must not launch tools.
const terminalAction = terminalStep.actions.find(action => action.terminalContext);
- await page.getByRole("button", { name: `Inspect action ${terminalAction.ref}: ${terminalAction.title}` }).click();
+ await page.locator(`summary[data-slot="session-action-summary"][data-action-ref="${terminalAction.ref}"]`).click();
await expect(page.getByRole("button", { name: /Open terminal here/ }).first()).toBeVisible();
expect(await terminalTabs.count()).toBe(terminalCountBefore); // Inspecting an action is still read-only.
await page.getByRole("button", { name: /Open terminal here/ }).first().click();