Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

feat(web): mark diagram note types as beta

tianma-if43e59b0399e8
diff --git a/apps/web/src/components/NotebookPane.test.mjs b/apps/web/src/components/NotebookPane.test.mjs
index b25efe22..12ebd929 100644
--- a/apps/web/src/components/NotebookPane.test.mjs
+++ b/apps/web/src/components/NotebookPane.test.mjs
@@ -22,6 +22,15 @@ test("keeps the desktop create-note control compact with one neutral outline", (
expect(source).not.toContain('title={t("notebookPane.newMemo")}');
});
+test("marks diagram note types as beta without labeling regular notes", () => {
+ const createTypeMenu = source.split('<DropdownMenuContent align="start" sideOffset={8} className="w-52">')[1]?.split("</DropdownMenuContent>")[0];
+ const regularNoteItem = createTypeMenu?.split('onSelect={() => onCreateMemo()}>')[1]?.split("</DropdownMenuItem>")[0];
+ const betaBadgeCount = createTypeMenu?.match(/<DiagramBetaBadge \/>/g)?.length;
+
+ expect(regularNoteItem).not.toContain("DiagramBetaBadge");
+ expect(betaBadgeCount).toBe(2);
+});
+
describe("NotebookPane client downloads", () => {
test("keeps macOS and Windows downloads visible in the desktop runtime", () => {
expect(source).toContain('t("pwa.sidebarMac") || "macOS"');
diff --git a/apps/web/src/components/NotebookPane.tsx b/apps/web/src/components/NotebookPane.tsx
index 28b6036f..9580086c 100644
--- a/apps/web/src/components/NotebookPane.tsx
+++ b/apps/web/src/components/NotebookPane.tsx
@@ -29,6 +29,7 @@ import {
Workflow,
} from "lucide-react";
import { Button } from "@/components/ui/button";
+import { Badge } from "@/components/ui/badge";
import { Switch } from "@/components/ui/switch";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import {
@@ -88,6 +89,15 @@ const BrandIcon = ({ path, color, className }: { path: string; color: string; cl
</svg>
);
+const DiagramBetaBadge = () => (
+ <Badge
+ variant="outline"
+ className="ml-auto border-emerald-200/80 bg-emerald-50 px-1.5 py-0 text-[10px] leading-4 tracking-wide text-emerald-700 dark:border-emerald-800/60 dark:bg-emerald-950/50 dark:text-emerald-300"
+ >
+ Beta
+ </Badge>
+);
+
const AppStoreIcon = () => (
<svg className="h-3.5 w-3.5 shrink-0 rounded-[2px] bg-[#0D96F6] p-[1.5px] text-white" viewBox="0 0 24 24" aria-hidden="true">
<path fill="currentColor" d="m8.809 14.92l6.11-11.037c.084-.152.168-.302.244-.459c.069-.142.127-.285.165-.44c.08-.326.058-.666-.066-.977a1.5 1.5 0 0 0-.62-.735a1.42 1.42 0 0 0-.922-.193c-.32.043-.613.194-.844.43c-.11.11-.2.235-.283.368c-.092.146-.175.298-.259.45l-.386.697l-.387-.698c-.084-.151-.167-.303-.259-.449a2.2 2.2 0 0 0-.283-.369a1.45 1.45 0 0 0-.844-.429a1.42 1.42 0 0 0-.921.193a1.5 1.5 0 0 0-.62.735a1.6 1.6 0 0 0-.066.977c.038.155.096.298.164.44c.076.157.16.307.244.459l1.248 2.254l-4.862 8.782H2.03c-.168 0-.336 0-.503.01c-.152.009-.3.028-.448.071c-.31.09-.582.28-.778.548A1.58 1.58 0 0 0 .3 17.404c.197.268.468.457.779.548c.148.043.296.062.448.071c.167.01.335.01.503.01h13.097a2 2 0 0 0 .1-.27c.415-1.416-.616-2.844-2.035-2.844zm-5.696 3.622l-.792 1.5c-.082.156-.165.31-.239.471a2.4 2.4 0 0 0-.16.452a1.7 1.7 0 0 0 .064 1.003c.121.318.334.583.607.755s.589.242.901.197c.314-.044.6-.198.826-.44c.108-.115.196-.242.278-.378c.09-.15.171-.306.253-.462L6 19.464c-.09-.15-.947-1.47-2.887-.922m20.586-3.006a1.47 1.47 0 0 0-.779-.54a2 2 0 0 0-.448-.071c-.168-.01-.335-.01-.503-.01h-3.321L14.258 7.1a4.06 4.06 0 0 0-1.076 2.198a4.64 4.64 0 0 0 .546 3l5.274 9.393c.084.15.167.3.259.444c.084.13.174.253.283.364c.231.232.524.38.845.423s.643-.024.922-.19a1.5 1.5 0 0 0 .621-.726c.125-.307.146-.642.066-.964a2.2 2.2 0 0 0-.165-.434c-.075-.155-.16-.303-.244-.453l-1.216-2.166h1.596c.168 0 .335 0 .503-.009c.152-.009.3-.028.448-.07a1.47 1.47 0 0 0 .78-.541a1.54 1.54 0 0 0 .3-.916a1.54 1.54 0 0 0-.3-.916" />
@@ -589,10 +599,12 @@ export const NotebookPane = ({
<DropdownMenuItem onSelect={() => onCreateMemo("mind-map")}>
<Network className="h-4 w-4" />
{t("diagram.mindMap")}
+ <DiagramBetaBadge />
</DropdownMenuItem>
<DropdownMenuItem onSelect={() => onCreateMemo("flowchart")}>
<Workflow className="h-4 w-4" />
{t("diagram.flowchart")}
+ <DiagramBetaBadge />
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>