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): expand session actions before launch

Rahman21141f52590d
diff --git a/frontend/slices/workflows/components/workflow-session-details.tsx b/frontend/slices/workflows/components/workflow-session-details.tsx
index de71dfb1..3a81011f 100644
--- a/frontend/slices/workflows/components/workflow-session-details.tsx
+++ b/frontend/slices/workflows/components/workflow-session-details.tsx
@@ -12,7 +12,7 @@ function value(config: Record<string, unknown>, key: string): string | 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 className="flex cursor-pointer list-none items-start gap-2 p-2.5 text-xs marker:hidden">
+ <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 17632056..f7b55004 100644
--- a/scripts/e2e/mcp-sessions.mjs
+++ b/scripts/e2e/mcp-sessions.mjs
@@ -75,8 +75,11 @@ export async function mcpSessionsJourney(page, fixture) {
expect(await page.locator('[data-slot="workflows-feature"]').innerText()).not.toMatch(/\b\d{8}_\d{6}_[a-f0-9]{8}\b/);
await terminalStepNode.click();
await expect(page.getByText("Actions", { exact: true }).last()).toBeVisible();
- await expect(page.getByRole("button", { name: /Open terminal here/ }).first()).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 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();
await expect(terminalTabs.last()).toBeVisible();
const backHome = page.getByRole("button", { name: "Back to Home", exact: true });