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: distinguish desktop dock launch from icon selection

Rahman00fc3cb778b0
diff --git a/lib/infra/connection-health.test.ts b/lib/infra/connection-health.test.ts
index f13417e0..228d1f73 100644
--- a/lib/infra/connection-health.test.ts
+++ b/lib/infra/connection-health.test.ts
@@ -34,7 +34,9 @@ describe("revision-bound connection health", () => {
});
it("rejects stale results after credential rotation or connection recreation", async () => {
const old = snapshot();
+ current().lastCheck = { revision: current().revision, checkedAt: 10, result: "invalid" };
current().revision++;
+ expect(connectionSummary("owner", current()).state).toBe("configured");
expect(await recordConnectionCheck("github", old, { id: "github", ok: true, detail: "ok" }, 20)).toBe(false);
current().revision = old.connection.revision;
current().uid = "replacement";
diff --git a/lib/infra/connection-registry.ts b/lib/infra/connection-registry.ts
index f9773832..637c40f6 100644
--- a/lib/infra/connection-registry.ts
+++ b/lib/infra/connection-registry.ts
@@ -30,7 +30,7 @@ export function connectionSources(provider:string){return ["direct",...(COMPOSIO
export function connectionCatalog(){return listInfraProviderDefinitions().map(p=>({id:p.id,title:p.title,description:p.description,sources:connectionSources(p.id).map(id=>({id,label:id==="direct"?"MSO direct":id==="composio"?"Composio":"Provider MCP",methods:connectionMethods(p.id,id)}))}));}
export function connectionSummary(user:string,c:IntegrationConnection,isDefault=false){
const method=connectionMethod(c.provider,c.source,c.authMethod),missing=method.fields.filter(f=>f.required&&!c.values[f.key]).map(f=>f.key);
- return {user,id:c.id,label:c.label,provider:c.provider,source:c.source,authMethod:c.authMethod,scope:c.scope,revision:c.revision,isDefault,missing,fields:method.fields.map(f=>({...f,stored:Boolean(c.values[f.key])})),state:c.source==="direct"?(missing.length?"incomplete":c.lastCheck?.revision===c.revision?c.lastCheck.result:c.verifiedAt?"verified":"configured"):c.external?.status??"authorization-required",verifiedAt:c.verifiedAt??null,lastCheck:c.lastCheck?.revision===c.revision?c.lastCheck:null,external:c.external??null};
+ return {user,id:c.id,label:c.label,provider:c.provider,source:c.source,authMethod:c.authMethod,scope:c.scope,revision:c.revision,isDefault,missing,fields:method.fields.map(f=>({...f,stored:Boolean(c.values[f.key])})),state:c.source==="direct"?(missing.length?"incomplete":c.lastCheck?(c.lastCheck.revision===c.revision?c.lastCheck.result:"configured"):c.verifiedAt?"verified":"configured"):c.external?.status??"authorization-required",verifiedAt:c.verifiedAt??null,lastCheck:c.lastCheck?.revision===c.revision?c.lastCheck:null,external:c.external??null};
}
export const composioDefinition=(provider:string)=>COMPOSIO[provider];
export const nativeDefinition=(provider:string)=>NATIVE[provider];
diff --git a/scripts/e2e/release.mjs b/scripts/e2e/release.mjs
index eed4759e..b8dbb5cb 100644
--- a/scripts/e2e/release.mjs
+++ b/scripts/e2e/release.mjs
@@ -31,7 +31,8 @@ try {
await expect(page.getByLabel("Server connection mode")).toContainText("Mock data only");
// Real launcher click, not only deep-link route mounting.
const settingsName = /^(System )?Settings(?: \(running\))?$/;
- const settings = page.getByRole("link", { name: settingsName }).or(page.getByRole("button", { name: settingsName })).first();
+ const links = page.getByRole("link", { name: settingsName });
+ const settings = await links.count() ? links.first() : page.getByRole("button", { name: settingsName }).first();
await expect(settings).toBeVisible();
await settings.click();
await expect(page).toHaveURL(/\/settings/);
@@ -55,6 +56,7 @@ try {
await page.getByRole("button", { name: "Self-hosted Convex", exact: true }).click();
await page.getByRole("button", { name: "Verify", exact: true }).click();
await expect(page.locator(".connection-state")).toHaveText("Verified");
+ await expect(page.getByRole("status")).toContainText("Verified: authenticated");
fixture.revokeProvider();
await page.getByRole("button", { name: "Verify", exact: true }).click();
await expect(page.locator(".connection-state")).toHaveText("Access rejected");