From 2be8ebdbb31446da890884e6ea0437a9007cdf24 Mon Sep 17 00:00:00 2001 From: Denis Kotsyuba Date: Sun, 19 Jul 2026 02:19:31 +0200 Subject: [PATCH] fix(dashboard): show Obsidian context source card (#7500) * fix(dashboard): show Obsidian context source card * test(dashboard): guard Obsidian context source wiring --------- Co-authored-by: DKotsyuba <16292493+DKotsyuba@users.noreply.github.com> --- .../dashboard/endpoint/EndpointPageClient.tsx | 2 ++ tests/unit/dashboard-shell-tabs.test.ts | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx b/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx index f2972f1ccc..e14c0948fa 100644 --- a/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx +++ b/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx @@ -12,6 +12,7 @@ import { useTranslations } from "next-intl"; import A2ADashboardPage from "./components/A2ADashboard"; import McpDashboardPage from "./components/MCPDashboard"; import NotionSourceCard from "./components/NotionSourceCard"; +import ObsidianSourceCard from "./components/ObsidianSourceCard"; import VscodeTokenAliasCard from "./VscodeTokenAliasCard"; const BUILD_TIME_CLOUD_URL = process.env.NEXT_PUBLIC_CLOUD_URL || null; @@ -1259,6 +1260,7 @@ export default function APIPageClient({ machineId }: Readonly + ) : null} diff --git a/tests/unit/dashboard-shell-tabs.test.ts b/tests/unit/dashboard-shell-tabs.test.ts index fb09fab916..d4c4288303 100644 --- a/tests/unit/dashboard-shell-tabs.test.ts +++ b/tests/unit/dashboard-shell-tabs.test.ts @@ -45,6 +45,27 @@ test("endpoint page keeps APIs, MCP, and A2A as in-page tabs", () => { assert.ok(source.includes('activeEndpointTab === "a2a" ? : null')); }); +test("endpoint page exposes context-sources tab with Notion and Obsidian source cards", () => { + const source = readSource("src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx"); + + // Verify context-sources is part of the EndpointTab type contract + assert.ok(source.includes('type EndpointTab = "apis" | "mcp" | "a2a" | "context-sources"')); + + // Verify context-sources tab label is in ENDPOINT_TABS + assert.ok( + source.includes('{ value: "context-sources", label: "Context Sources", icon: "database" }') + ); + + // Verify both source card components are imported + assert.ok(source.includes('import NotionSourceCard from "./components/NotionSourceCard"')); + assert.ok(source.includes('import ObsidianSourceCard from "./components/ObsidianSourceCard"')); + + // Verify both components are rendered in the context-sources conditional block + assert.ok(source.includes('activeEndpointTab === "context-sources" ? (')); + assert.ok(source.includes("")); + assert.ok(source.includes("")); +}); + test("settings root redirects to section pages instead of rendering a tab shell", () => { const pageSource = readSource("src/app/(dashboard)/dashboard/settings/page.tsx");