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.

866 B
Raw Blame
import { describe, expect, it } from "vitest";
import { chatGptMcpLanding } from "./external-open";

describe("ChatGPT MCP external landing", () => {
  it("turns a root ChatGPT conversation redirect into the visible MCP activity deep-link", () => {
    const source = "https://chatgpt.com/c/6a996289-c858-83ec-b706-fedf850aa375";
    expect(chatGptMcpLanding(undefined, source)).toBe(`/assistant/mcp?redirectUrl=${encodeURIComponent(source)}`);
  });

  it("does not hijack normal MSO roots, app deep-links, or foreign redirect URLs", () => {
    expect(chatGptMcpLanding(undefined, undefined)).toBeNull();
    expect(chatGptMcpLanding(["files"], "https://chatgpt.com/c/abc")).toBeNull();
    expect(chatGptMcpLanding(undefined, "https://example.com/c/abc")).toBeNull();
    expect(chatGptMcpLanding(undefined, "https://chatgpt.com/g/gpt-id")).toBeNull();
  });
});