AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix(web): keep diagram editor chrome on theme surfaces
tianma-ifc0009f02825e
diff --git a/apps/web/src/components/DiagramEditorPane.test.mjs b/apps/web/src/components/DiagramEditorPane.test.mjsindex f46de479..73372b25 100644--- a/apps/web/src/components/DiagramEditorPane.test.mjs+++ b/apps/web/src/components/DiagramEditorPane.test.mjs@@ -421,6 +421,13 @@ describe("diagram editor canvas surface", () => {expect(toolbarSource).toContain("<MemoEditorToolbarRow");});+ test("paints diagram chrome from theme tokens instead of literal white", () => {+ expect(source).toContain('className="flex h-full min-h-0 flex-col bg-card"');+ expect(source).toContain('className="shrink-0 border-b border-slate-200 bg-card"');+ expect(source).not.toContain("flex-col bg-white");+ expect(source).not.toContain("border-slate-200 bg-white");+ });+test("repaints the graph when the application appearance changes", () => {expect(source).toContain("const { resolvedTheme } = useAppearanceTheme();");expect(source).toContain("applyGraphPalette(graph, themeRef.current, document.kind, resolvedTheme, structureRef.current);");diff --git a/apps/web/src/components/DiagramEditorPane.tsx b/apps/web/src/components/DiagramEditorPane.tsxindex 2ac41953..4c550f0d 100644--- a/apps/web/src/components/DiagramEditorPane.tsx+++ b/apps/web/src/components/DiagramEditorPane.tsx@@ -382,7 +382,7 @@ const ArchitectureComponentLibrary = ({if (draggingRef.current) event.preventDefault();}}>- <div className="sticky top-0 z-10 border-b border-slate-200 bg-white p-2.5">+ <div className="sticky top-0 z-10 border-b border-slate-200 bg-card p-2.5"><div className="relative"><Search className="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400" /><Input@@ -2715,8 +2715,8 @@ export const DiagramEditorPane = ({return (<TooltipProvider>- <div className="flex h-full min-h-0 flex-col bg-white">- <header className="shrink-0 border-b border-slate-200 bg-white">+ <div className="flex h-full min-h-0 flex-col bg-card">+ <header className="shrink-0 border-b border-slate-200 bg-card"><div className={MEMO_EDITOR_TOP_ROW_CLASS_NAME}><MemoEditorTopRowLeadingdesktopFocusMode={desktopFocusMode}@@ -3010,13 +3010,13 @@ export const DiagramEditorPane = ({</div>)}{pendingArchitectureItem ? (- <div className="pointer-events-none absolute left-1/2 top-3 z-20 -translate-x-1/2 rounded-md border border-slate-200 bg-white/95 px-3 py-1.5 text-xs font-medium text-slate-600 shadow-sm" role="status">+ <div className="pointer-events-none absolute left-1/2 top-3 z-20 -translate-x-1/2 rounded-md border border-slate-200 bg-card/95 px-3 py-1.5 text-xs font-medium text-slate-600 shadow-sm" role="status">{t("diagram.placeShapeHint", { shape: t(pendingArchitectureItem.labelKey) })}</div>) : null}{flowQuickCreate ? (<div- className="absolute z-30 w-[330px] max-w-[calc(100%-24px)] rounded-xl border border-slate-200 bg-white p-2 shadow-xl"+ className="absolute z-30 w-[330px] max-w-[calc(100%-24px)] rounded-xl border border-slate-200 bg-card p-2 shadow-xl"style={{ left: flowQuickCreate.left, top: flowQuickCreate.top }}role="dialog"aria-label={t("diagram.quickCreateTitle")}