From 8bb463538514739fe3f645c66f6c2cef11f1dddf Mon Sep 17 00:00:00 2001 From: Nam Rodriguez Date: Sun, 15 Nov 2026 12:56:33 -0500 Subject: [PATCH 1/2] Atlassian is one row: Jira, Confluence and agent tools under one Connect Settings, Integrations shows one Atlassian row with three parts (the Jira app, Confluence for runs and Knowledge, Atlassian's own agent tools). One Connect signs in for the next part; old Jira and Confluence links open the row. Docs have one Connect Atlassian page, with a redirect from the old Jira page. --- README.md | 2 +- dashboard/e2e/atlassian-one.spec.ts | 130 +++++++++++++++ .../app/settings/integrations/jira/page.tsx | 4 +- .../src/app/settings/integrations/page.tsx | 149 ++++++++++++++++-- .../src/components/hybrid-app-choice.tsx | 6 +- dashboard/src/components/sign-in-apps.tsx | 2 +- dashboard/src/lib/api.ts | 18 ++- dashboard/src/lib/hybrid.ts | 5 + docs/content/docs/api/webhooks.mdx | 2 +- .../docs/getting-started/atlassian.mdx | 59 +++++++ docs/content/docs/getting-started/index.mdx | 2 +- docs/content/docs/getting-started/jira.mdx | 47 ------ docs/content/docs/getting-started/meta.json | 2 +- docs/content/docs/index.mdx | 2 +- docs/e2e/site.spec.ts | 2 +- docs/published-pages.json | 1 + docs/redirects.json | 3 +- 17 files changed, 363 insertions(+), 73 deletions(-) create mode 100644 dashboard/e2e/atlassian-one.spec.ts create mode 100644 docs/content/docs/getting-started/atlassian.mdx delete mode 100644 docs/content/docs/getting-started/jira.mdx diff --git a/README.md b/README.md index 7eb8b0d7..99e0b590 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ This repository holds the dashboard, the docs site and the website. The agent, t | Feature | What you get | |---|---| -| [Tickets to pull requests](https://docs.coderhelm.com/getting-started/first-run) | Assign a [GitHub issue](https://docs.coderhelm.com/getting-started/github) or [Jira ticket](https://docs.coderhelm.com/getting-started/jira), add the `coderhelm` label or comment `/coderhelm`. A plan, the change, your tests, a self review and a pull request. | +| [Tickets to pull requests](https://docs.coderhelm.com/getting-started/first-run) | Assign a [GitHub issue](https://docs.coderhelm.com/getting-started/github) or [Jira ticket](https://docs.coderhelm.com/getting-started/atlassian), add the `coderhelm` label or comment `/coderhelm`. A plan, the change, your tests, a self review and a pull request. | | [PR reviewer](https://docs.coderhelm.com/getting-started/reviewer) | Add the review label (`ch-review` by default) to any pull request. A real GitHub review with line comments, a risk level and a verdict: it requests changes only for a named correctness, security or data loss problem with its evidence, and everything else is a labeled note. | | [CI and review comment fixes](https://docs.coderhelm.com/getting-started/review-fixes) | Fixes failing CI on its pull requests, answers review comments, resolves conflicts and, with auto merge on, merges only the exact commit it reviewed. | | [Alerts to fixes](https://coderhelm.com/alerts) | Route CloudWatch alarms and EventBridge events through SNS. Matching alerts become analyzed pull requests that a person approves. | diff --git a/dashboard/e2e/atlassian-one.spec.ts b/dashboard/e2e/atlassian-one.spec.ts new file mode 100644 index 00000000..d0fdeefb --- /dev/null +++ b/dashboard/e2e/atlassian-one.spec.ts @@ -0,0 +1,130 @@ +import { expect, test, type Page, type Route } from "@playwright/test"; +import fs from "node:fs"; +import path from "node:path"; + +// Settings → Integrations: Jira, Confluence and Atlassian's own server are one +// Atlassian row (services/gateway/src/routes/integrations.rs, atlassian_card). +// Each piece keeps its own card under `detail.parts`. Every API call is +// answered here; nothing reaches a real backend. + +const SHOTS_DIR = process.env.E2E_SHOTS_DIR || path.join("test-results", "shots"); + +function card(id: string, section: string, name: string, status: string, action: string, over: Record = {}) { + return { id, section, name, does: `${name} does things.`, status, reason: "", action, last_check: "", manage_href: "", detail: {}, ...over }; +} + +function plugin(id: string, name: string) { + return { + id, name, description: "Agent tools for Jira issues and Confluence pages.", category: "Project Management", tier: 2, icon: id, + credential_fields: [], docs_url: "https://example.com/docs", repo_url: "https://example.com/docs", default_prompt: "Read only.", recommended_permissions: "Read access", + npx_package: "", remote_url: "https://mcp.example.com/v2/mcp", remote_key: false, + }; +} + +interface Parts { + jira: string; + confluence: string; + tools: string; + reason?: string; + status?: string; + action?: string; +} + +function atlassian(p: Parts) { + const jira = card("jira", "code", "Jira", p.jira, p.jira === "connected" ? "manage" : "connect", { manage_href: "/settings/integrations/jira", detail: { app: p.jira === "connected", app_update: null } }); + const confluence = card("confluence", "docs", "Confluence", p.confluence, p.confluence === "connected" ? "manage" : "connect", { detail: { kind: "confluence", connected: false, knowledge: null } }); + const tools = card("atlassian", "code", "Atlassian", p.tools, p.tools === "connected" ? "manage" : "connect", { + detail: { plugin: plugin("atlassian", "Atlassian"), enabled: false, has_credentials: false, custom_prompt: "", last_test_ok: null, last_test_message: "", remote: null, own_app: null, unused: [] }, + }); + return card("atlassian", "code", "Atlassian", p.status ?? "not_connected", p.action ?? "connect", { + reason: p.reason ?? "", + detail: { + app_update: null, + parts: [ + { id: "jira", name: "Jira", what: "Coderhelm's Jira app (Forge): tickets start work.", item: jira }, + { id: "confluence", name: "Confluence", what: "Agents read pages and Knowledge syncs them.", item: confluence }, + { id: "agent_tools", name: "Agent tools", what: "Atlassian's own server (Rovo MCP).", item: tools }, + ], + }, + }); +} + +async function mockApi(page: Page, items: unknown[], connect: (r: Route) => Promise) { + const json = (route: Route, body: unknown, status = 200) => route.fulfill({ status, contentType: "application/json", body: JSON.stringify(body) }); + const context = page.context(); + await context.route((url) => url.hostname !== "localhost", (route) => route.abort()); + await context.route((url) => url.hostname === "localhost" && /^\/(api|auth)\//.test(url.pathname), async (r) => { + const p = new URL(r.request().url()).pathname; + if (p === "/api/me") return json(r, { user_id: "u_1", team_id: "t_1", github_login: null, email: "person@example.com", avatar_url: "", role: "admin", auth_provider: "email" }); + if (p === "/api/usage") return json(r, { month: "2026-01", tokens_in: 0, tokens_out: 0, total_runs: 0, total_tokens: 0, max_tokens: 0 }); + if (p === "/api/banners") return json(r, { banners: [] }); + if (p === "/api/teams") return json(r, { teams: [{ team_id: "t_1", org: "your-team", status: "active", current: true }] }); + if (p === "/api/integrations") return json(r, { can_edit: true, items, migrated: 0 }); + if (p === "/api/reviewer/org-config") return json(r, { instructions: "", web_domains: [] }); + if (p === "/api/knowledge/connectors/confluence/connect") return connect(r); + return json(r, { error: `not mocked: ${p}` }, 404); + }); +} + +async function shot(page: Page, name: string) { + fs.mkdirSync(SHOTS_DIR, { recursive: true }); + await page.addStyleTag({ content: "nextjs-portal{display:none!important}" }); + for (const width of [1280, 375]) { + await page.setViewportSize({ width, height: 900 }); + await page.screenshot({ path: path.join(SHOTS_DIR, `${name}-${width === 1280 ? "desktop" : "phone"}.png`), fullPage: true }); + } + await page.setViewportSize({ width: 1280, height: 800 }); +} + +const github = card("github", "code", "GitHub", "connected", "manage", { manage_href: "/settings/integrations/github" }); + +test("one Atlassian row covers Jira, Confluence and agent tools", async ({ page }) => { + await mockApi(page, [github, atlassian({ jira: "not_connected", confluence: "not_connected", tools: "not_connected" })], (r) => + r.fulfill({ status: 200, contentType: "application/json", body: "{}" }), + ); + await page.goto("/settings/integrations/"); + const rows = page.locator('[data-testid^="integration-"][data-status]'); + await expect(page.getByTestId("integration-atlassian")).toBeVisible(); + // No separate Jira or Confluence row. + await expect(page.getByTestId("integration-jira")).toHaveCount(0); + await expect(page.getByTestId("integration-confluence")).toHaveCount(0); + expect(await rows.count()).toBe(2); + + await page.getByTestId("integration-atlassian").getByRole("button", { name: /Atlassian/ }).click(); + const panel = page.getByTestId("atlassian-panel"); + await expect(panel.getByTestId("atlassian-part-jira")).toBeVisible(); + await expect(panel.getByTestId("atlassian-part-confluence")).toBeVisible(); + await expect(panel.getByTestId("atlassian-part-agent_tools")).toBeVisible(); + await expect(panel.getByRole("link", { name: "Install the Jira app" })).toHaveAttribute("href", /\/settings\/integrations\/jira/); + // One Connect, for the next piece that takes a sign-in: Confluence first. + await expect(panel.getByTestId("atlassian-connect")).toHaveAttribute("data-next", "confluence"); + await expect(panel.getByRole("button", { name: "Connect Atlassian" })).toBeVisible(); + await shot(page, "atlassian-one"); +}); + +test("old links to the Jira or Confluence row open the Atlassian row", async ({ page }) => { + await mockApi(page, [github, atlassian({ jira: "connected", confluence: "connected", tools: "not_connected", status: "connected", action: "manage", reason: "Jira and Confluence are connected. Agent tools isn't set up." })], (r) => + r.fulfill({ status: 200, contentType: "application/json", body: "{}" }), + ); + await page.goto("/settings/integrations/#integration-confluence"); + const panel = page.getByTestId("atlassian-panel"); + await expect(panel).toBeVisible(); + await expect(panel.getByTestId("atlassian-summary")).toHaveText("Jira and Confluence are connected. Agent tools isn't set up."); + // Connected Jira and Confluence carry over: the next step is agent tools. + await expect(panel.getByTestId("atlassian-part-jira")).toHaveAttribute("data-status", "connected"); + await expect(panel.getByTestId("atlassian-connect")).toHaveAttribute("data-next", "agent_tools"); + await expect(panel.getByRole("link", { name: "Manage the Jira app" })).toBeVisible(); +}); + +test("Atlassian's sign-in failing on its side is said in plain words", async ({ page }) => { + const words = "Confluence's sign-in page is failing on Confluence's side (HTTP 500), so Coderhelm didn't send you there. Nothing on your side needs changing. Try again in a few minutes."; + await mockApi(page, [github, atlassian({ jira: "not_connected", confluence: "not_connected", tools: "not_connected" })], (r) => + r.fulfill({ status: 400, contentType: "application/json", body: JSON.stringify({ error: words }) }), + ); + await page.goto("/settings/integrations/#integration-atlassian"); + const panel = page.getByTestId("atlassian-panel"); + await panel.getByRole("button", { name: "Connect Atlassian" }).click(); + await expect(panel.getByText("failing on Confluence's side (HTTP 500)")).toBeVisible(); + // Nobody was sent anywhere. + await expect(page).toHaveURL(/\/settings\/integrations\//); +}); diff --git a/dashboard/src/app/settings/integrations/jira/page.tsx b/dashboard/src/app/settings/integrations/jira/page.tsx index 0290feea..4de94d22 100644 --- a/dashboard/src/app/settings/integrations/jira/page.tsx +++ b/dashboard/src/app/settings/integrations/jira/page.tsx @@ -22,7 +22,7 @@ import { Page, PageHeader, Section } from "@/components/page"; import { HybridAppChoice } from "@/components/hybrid-app-choice"; import { HostedJiraLinked, HostedJiraLinkRequest, HybridJiraLink } from "@/components/hybrid-jira-link"; import { isSelfHosted } from "@/lib/runtime-config"; -import { useHybrid } from "@/lib/hybrid"; +import { integrationOf, useHybrid } from "@/lib/hybrid"; import { Code, Field, SaveBar, SettingsRow, SettingsSection, Switch, useDirtyForm } from "@/components/settings"; import { buttonClass, focusRing, inputClass, linkButton, primaryButton, secondaryButton } from "@/components/ui"; import { Select } from "@/components/select"; @@ -440,7 +440,7 @@ function SetupGuide({ const self = isSelfHosted(); const hybrid = useHybrid(); const relayed = - self && !!hybrid.status?.registered && !!hybrid.status.install_id && hybrid.status.integrations.some((i) => i.id === "jira" && i.uses_coderhelm); + self && !!hybrid.status?.registered && !!hybrid.status.install_id && !!integrationOf(hybrid.status.integrations, "jira")?.uses_coderhelm; const ownCopy = self && !relayed; const [picked, setPicked] = useState<"app" | "webhook" | null>(null); const how = picked ?? (ownCopy ? "webhook" : "app"); diff --git a/dashboard/src/app/settings/integrations/page.tsx b/dashboard/src/app/settings/integrations/page.tsx index 2578b5b3..5bfbadd5 100644 --- a/dashboard/src/app/settings/integrations/page.tsx +++ b/dashboard/src/app/settings/integrations/page.tsx @@ -13,6 +13,7 @@ import { type IntegrationSection, type IntegrationStatus, type IntegrationUse, + type AtlassianPart, type JiraAppUpdate, type KnowledgeSignIn, type McpServer, @@ -35,16 +36,16 @@ import { BrandIcon } from "@/components/brand-icons"; import { EmptyState } from "@/components/empty-state"; import { Problem } from "@/components/problem"; import { INTEGRATION_STATUS } from "@/lib/integration-status"; -import { AddMcpServerDialog, McpServerPanel } from "@/components/mcp-servers"; +import { AddMcpServerDialog, McpServerPanel, beginCatalogSignIn } from "@/components/mcp-servers"; import { CatalogPanel } from "@/components/mcp-server-panel"; -import { Attention, ConnectionFacts, DangerRow, OtherWays, PanelLink, PanelSection, UsesList, Way, type Fact } from "@/components/integration-panel"; -import { KnowledgeDisconnect, KnowledgeSignInControl } from "@/components/knowledge-connection"; +import { Attention, ConnectionFacts, DangerRow, OtherWays, PanelLink, PanelSection, SignInControl, UsesList, Way, type Fact } from "@/components/integration-panel"; +import { KnowledgeDisconnect, KnowledgeSignInControl, beginKnowledgeSignIn } from "@/components/knowledge-connection"; // Settings → Integrations: every outside system Coderhelm connects to, as one // list per kind of tool. One row per integration with the same columns in the // same places (mark, name and a short line, status, one action), so the eye // runs down a column instead of zigzagging across cards. A row opens its -// settings: in place, or on its own page for GitHub, Jira and AWS. Why +// settings: in place, or on its own page for GitHub and AWS. Why // something isn't working is said inside, not on the row. // // Every opened row follows one pattern (components/integration-panel.tsx): @@ -95,10 +96,8 @@ const ORDER: Record = { needs_credentials: 0, needs_r /** What each one is for, short enough for one line of a list. The full sentence is inside. */ const SHORT: Record = { github: "Reads code, opens and reviews pull requests", - jira: "Starts work from tickets and keeps them in step", aws: "Logs, metrics and Airflow through a read-only role", newrelic: "Queries, deploy markers and error rates", - confluence: "Reads pages for context", google_drive: "Folders, Docs, Sheets and PDFs, synced into Knowledge", opensearch: "Searches the indexes your app reads", rest: "Reads records from an API you use", @@ -121,7 +120,10 @@ const SHORT: Record = { turso: "Databases and queries", neon: "Postgres databases and branches", launchdarkly: "Feature flags and targeting", - atlassian: "Jira issues and Confluence pages, through Atlassian's own server", + atlassian: "Jira tickets, Confluence pages and agent tools", + // Older gateways still send Jira and Confluence as rows of their own. + jira: "Starts work from tickets and keeps them in step", + confluence: "Reads pages for context", }; function shortLine(item: Integration): string { @@ -134,6 +136,12 @@ function remoteOf(item: Integration): McpServer | null { return ((item.detail as { remote?: McpServer | null }).remote ?? null) as McpServer | null; } +/** Links made before Jira and Confluence were pieces of the one Atlassian row open that row. */ +const ANCHOR_ALIASES: Record = { + "integration-jira": "integration-atlassian", + "integration-confluence": "integration-atlassian", +}; + /** The anchor a row answers to (`#integration-aws` for the first AWS account). */ function anchorOf(item: Integration, firstAws: boolean): string { if (item.id.startsWith("aws")) return firstAws ? "integration-aws" : `integration-${item.id}`; @@ -167,7 +175,10 @@ function IntegrationsPage() { // Open the row a link points at (#integration-sentry from a skill check). const [target, setTarget] = useState(""); useEffect(() => { - const read = () => setTarget(window.location.hash.replace(/^#/, "")); + const read = () => { + const h = window.location.hash.replace(/^#/, ""); + setTarget(ANCHOR_ALIASES[h] ?? h); + }; read(); window.addEventListener("hashchange", read); return () => window.removeEventListener("hashchange", read); @@ -506,7 +517,7 @@ function IntegrationRow({ )} - {kind === "jira" && appUpdateOf(item) && } + {(kind === "jira" || kind === "atlassian") && appUpdateOf(item) && } {open && (canEdit || personal) && (
@@ -535,6 +546,7 @@ function IntegrationRow({ {kind === "knowledge" && } {kind === "remote" && remote && setOpen(false)} />} {kind === "plugin" && setOpen(false)} />} + {kind === "atlassian" && setOpen(false)} />} {kind === "chat" && }