Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/src/features/settings/integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function Integrations() {
{status.data?.linear && <div className="flex flex-wrap items-center gap-3 border-b border-stone-200 p-4 dark:border-slate-800"><IntegrationIcon kind="linear" /><div className="min-w-40 flex-1"><p className="font-semibold">Linear</p><p className="text-sm text-slate-600 dark:text-slate-400">{status.data.linear.organizationName ?? status.data.linear.viewerEmail ?? "Connected account"}</p></div><Badge active>Connected</Badge><Button onClick={() => setOpenSetup(openSetup === "linear" ? null : "linear")}>Manage</Button>{manage("linear", <a className={linkClass} href="/auth/linear">Reconnect Linear</a>)}</div>}
{status.data?.clickup && <div className="flex flex-wrap items-center gap-3 border-b border-stone-200 p-4 dark:border-slate-800"><IntegrationIcon kind="clickup" /><div className="min-w-40 flex-1"><p className="font-semibold">ClickUp</p><p className="text-sm text-slate-600 dark:text-slate-400">{status.data.clickup.teamName ?? "Connected workspace"}</p></div><Badge active>Connected</Badge><Button onClick={() => setOpenSetup(openSetup === "clickup" ? null : "clickup")}>Manage</Button>{manage("clickup", <a className={linkClass} href="/auth/clickup">Reconnect ClickUp</a>)}</div>}
{github.data?.map(i => <div className="flex flex-wrap items-center gap-3 border-b border-stone-200 p-4 last:border-b-0 dark:border-slate-800" key={i.installationId}><IntegrationIcon kind="github" /><div className="min-w-40 flex-1"><p className="font-semibold">GitHub</p><p className="text-sm text-slate-600 dark:text-slate-400">{i.accountLogin} · {i.accountType}</p></div><Badge active={i.state === "active"}>{i.state === "active" ? "Connected" : `Needs attention · ${i.state}`}</Badge><a className={linkClass} href="https://github.com/settings/installations" target="_blank" rel="noreferrer">Manage</a>{buttons("github", String(i.installationId))}</div>)}
{status.data?.exeConnections.map(c => <div className="border-b border-stone-200 p-4 last:border-b-0 dark:border-slate-800" key={c.connectionId}><div className="flex flex-wrap items-center gap-3"><IntegrationIcon kind="exe" /><div className="min-w-40 flex-1"><p className="font-semibold">exe.dev · {c.connectionId}</p><p className="text-sm text-slate-600 dark:text-slate-400">{c.accountTags.join(", ") || "Account tags available"}</p></div><Badge active>Connected</Badge><Button onClick={() => setOpenSetup(openSetup === `exe:${c.connectionId}` ? null : `exe:${c.connectionId}`)}>Manage</Button>{buttons("exe", c.connectionId)}</div>{manage(`exe:${c.connectionId}`, <IntegrationForm kind="exe" connectionId={c.connectionId} />)}</div>)}
{status.data?.exeConnections.map(c => <div className="border-b border-stone-200 p-4 last:border-b-0 dark:border-slate-800" key={c.connectionId}><div className="flex flex-wrap items-center gap-3"><IntegrationIcon kind="exe" /><div className="min-w-40 flex-1"><p className="font-semibold">exe.dev · {c.connectionId}</p><p className="text-sm text-slate-600 dark:text-slate-400">{(c.accountTags ?? []).join(", ") || "Account tags available"}</p></div><Badge active>Connected</Badge><Button onClick={() => setOpenSetup(openSetup === `exe:${c.connectionId}` ? null : `exe:${c.connectionId}`)}>Manage</Button>{buttons("exe", c.connectionId)}</div>{manage(`exe:${c.connectionId}`, <IntegrationForm kind="exe" connectionId={c.connectionId} />)}</div>)}
{status.data?.ampConnections.map(c => <div className="border-b border-stone-200 p-4 last:border-b-0 dark:border-slate-800" key={c.connectionId}><div className="flex flex-wrap items-center gap-3"><IntegrationIcon kind="amp" /><div className="min-w-40 flex-1"><p className="font-semibold">Amp · {c.project}</p><p className="text-sm text-slate-600 dark:text-slate-400">Project connection</p></div><Badge active>Connected</Badge><Button onClick={() => setOpenSetup(openSetup === `amp:${c.connectionId}` ? null : `amp:${c.connectionId}`)}>Manage</Button>{buttons("amp", c.connectionId)}</div>{manage(`amp:${c.connectionId}`, <IntegrationForm kind="amp" connectionId={c.connectionId} initialName={c.project} initialApiBaseUrl={c.apiBaseUrl} />)}</div>)}
{status.data?.cloudflareTail.installations.map(c => <div className="border-b border-stone-200 p-4 last:border-b-0 dark:border-slate-800" key={c.integrationId}><div className="flex flex-wrap items-center gap-3"><IntegrationIcon kind="tail" /><div className="min-w-40 flex-1"><p className="font-semibold">Cloudflare Tail · {c.name}</p><p className="text-sm text-slate-600 dark:text-slate-400">Referenced by {c.referencedJobCount} {c.referencedJobCount === 1 ? "job" : "jobs"}</p></div><Badge active>Connected</Badge><Button onClick={() => setOpenSetup(openSetup === `tail:${c.integrationId}` ? null : `tail:${c.integrationId}`)}>Manage</Button>{buttons("cloudflareTail", c.integrationId)}</div>{manage(`tail:${c.integrationId}`, <IntegrationForm kind="cloudflareTail" connectionId={c.integrationId} initialName={c.name} />)}</div>)}
</div>}
Expand Down
8 changes: 8 additions & 0 deletions packages/app/test/settings.browser.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ test("integration setup tests credentials, submits typed fields and avoids persi
const form = page.locator("details").filter({ has: page.getByText("Add exe.dev integration", { exact: true }) });
const saveRequestPromise = page.waitForRequest(request => request.url().endsWith("/api/v1/integrations/exe") && request.method() === "PUT"); const saveResponsePromise = page.waitForResponse(response => response.url().endsWith("/api/v1/integrations/exe") && response.request().method() === "PUT"); await form.getByLabel("exe.dev account token").fill("private-input"); await form.getByRole("button", { name: "Test credentials" }).click(); await form.getByText("Credentials verified", { exact: true }).waitFor(); const saveRequest = await saveRequestPromise; await saveResponsePromise; body = saveRequest.postDataJSON(); assert.equal(body.apiToken, "private-input"); assert.equal(body.connectionId, undefined); assert.equal(await page.evaluate(() => JSON.stringify(localStorage).includes("private-input")), false); await context.close();
});
test("integration settings tolerates legacy exe connections without tags", async () => {
const { context, page } = await setup();
await page.route("**/api/v1/providers/github/installations", route => route.fulfill({ json: [] }));
await page.route("**/api/v1/integrations", route => route.fulfill({ json: { linear: null, clickup: null, exe: null, exeConnections: [{ connectionId: "legacy", credentialStatus: "connected" }], ampConnections: [], cloudflareTail: { count: 0, installations: [] } } }));
await page.goto(origin + "/settings/integrations");
await page.getByText("Account tags available", { exact: true }).waitFor();
await context.close();
});
test("API keys show a secret once, support explicit revocation and survive deep-link refresh", async () => {
const { context, page } = await setup(); let revoked = false, created = false; const time = "2026-10-09T12:00:00Z";
await page.route("**/api/v1/access-tokens", route => { if (route.request().method() === "POST") { created = true; return route.fulfill({ status: 201, json: { id: "key", name: "CLI", scopes: ["flows:read", "runs:read"], created_at: time, expires_at: time, token: "one-time-secret" } }); } return route.fulfill({ json: created ? [{ id: "key", name: "CLI", scopes: ["flows:read"], created_at: time, expires_at: time, last_used_at: null, revoked_at: revoked ? time : null }] : [] }); });
Expand Down
Loading