Skip to content

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

fix(diagram): restore auto-layout reading zoom to 85%

tianma-if30717d4207a0
diff --git a/packages/shared/src/diagram-flowchart-style.test.mjs b/packages/shared/src/diagram-flowchart-style.test.mjs
index e7d1185a..7e124d0a 100644
--- a/packages/shared/src/diagram-flowchart-style.test.mjs
+++ b/packages/shared/src/diagram-flowchart-style.test.mjs
@@ -122,6 +122,6 @@ describe("flowchart readable viewport", () => {
test("refuses to shrink a tall flow below reading size", () => {
expect(flowchartFitsReadableViewport({ width: 220, height: 1680 }, viewport)).toBe(false);
expect(FLOWCHART_READABLE_MIN_SCALE).toBe(DIAGRAM_READABLE_MIN_SCALE);
- expect(DIAGRAM_READABLE_MIN_SCALE).toBe(0.75);
+ expect(DIAGRAM_READABLE_MIN_SCALE).toBe(0.85);
});
});
diff --git a/packages/shared/src/diagram-flowchart-style.ts b/packages/shared/src/diagram-flowchart-style.ts
index 42c5198f..524bd5f4 100644
--- a/packages/shared/src/diagram-flowchart-style.ts
+++ b/packages/shared/src/diagram-flowchart-style.ts
@@ -43,7 +43,7 @@ export const FLOWCHART_LAYOUT_SPACING = { rank: 56, node: 36 };
// Auto layout and opening stay at reading size. Shrinking the whole graph into
// the viewport makes large notes unreadable; show the start and let the canvas scroll.
-export const DIAGRAM_READABLE_MIN_SCALE = 0.75;
+export const DIAGRAM_READABLE_MIN_SCALE = 0.85;
export const FLOWCHART_READABLE_MIN_SCALE = DIAGRAM_READABLE_MIN_SCALE;
export const flowchartFitsReadableViewport = (