From 9d104015f3e31ef50e79bfa08ece3b737cecd309 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 5 Mar 2026 18:30:08 +0200 Subject: [PATCH 1/3] ci(test): quote command --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 1076208a39..4820ebfb9c 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -44,7 +44,7 @@ jobs: run: pnpm run --filter=server test - name: Run the rest of the tests - run: pnpm run --filter=!client --filter=!server test + run: "pnpm run --filter=!client --filter=!server test" build_docker: name: Build Docker image From 0ca179f9906c132cc93912ec323f5aaf2690a934 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 5 Mar 2026 18:40:24 +0200 Subject: [PATCH 2/3] ci(test): quote command --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 4820ebfb9c..dd73e05df4 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -44,7 +44,7 @@ jobs: run: pnpm run --filter=server test - name: Run the rest of the tests - run: "pnpm run --filter=!client --filter=!server test" + run: pnpm run --filter=\!client --filter=\!server test" build_docker: name: Build Docker image From c80bb9657c0aa4a6e6c44dbda63366c81b1ba728 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 5 Mar 2026 19:25:07 +0200 Subject: [PATCH 3/3] fix(mindmap): crashing on auto-switch to dark theme --- apps/client/src/widgets/type_widgets/MindMap.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/type_widgets/MindMap.tsx b/apps/client/src/widgets/type_widgets/MindMap.tsx index ac545b49fb..a728398560 100644 --- a/apps/client/src/widgets/type_widgets/MindMap.tsx +++ b/apps/client/src/widgets/type_widgets/MindMap.tsx @@ -6,7 +6,7 @@ import "./MindMap.css"; import nodeMenu from "@mind-elixir/node-menu"; import { DISPLAYABLE_LOCALE_IDS } from "@triliumnext/commons"; import { snapdom } from "@zumer/snapdom"; -import { default as VanillaMindElixir,MindElixirData, MindElixirInstance, Operation, Options, THEME as LIGHT_THEME, DARK_THEME } from "mind-elixir"; +import { DARK_THEME, default as VanillaMindElixir, MindElixirData, MindElixirInstance, Operation, Options, THEME as LIGHT_THEME } from "mind-elixir"; import { HTMLAttributes, RefObject } from "preact"; import { useCallback, useEffect, useRef } from "preact/hooks"; @@ -154,6 +154,7 @@ function MindElixir({ containerRef: externalContainerRef, containerProps, apiRef const apiRef = useRef(null); const [ locale ] = useTriliumOption("locale"); const colorScheme = useColorScheme(); + const defaultColorScheme = useRef(colorScheme); function reinitialize() { if (!containerRef.current) return; @@ -162,7 +163,7 @@ function MindElixir({ containerRef: externalContainerRef, containerProps, apiRef el: containerRef.current, locale: LOCALE_MAPPINGS[locale as DISPLAYABLE_LOCALE_IDS] ?? undefined, editable, - theme: LIGHT_THEME + theme: defaultColorScheme.current === "dark" ? DARK_THEME : LIGHT_THEME }); if (editable) { @@ -188,7 +189,11 @@ function MindElixir({ containerRef: externalContainerRef, containerProps, apiRef if (!apiRef.current) return; const newTheme = colorScheme === "dark" ? DARK_THEME : LIGHT_THEME; if (apiRef.current.theme === newTheme) return; // Avoid unnecessary theme changes, which can be expensive to render. - apiRef.current.changeTheme(newTheme); + try { + apiRef.current.changeTheme(newTheme); + } catch (e) { + console.warn("Failed to change mind map theme:", e); + } }, [ colorScheme ]); useEffect(() => {