From d7aa744badc482c1aa781d4cb8259e3b7f1fe4f4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 01:54:26 +0000 Subject: [PATCH 1/4] chore(deps): update dependency @types/supertest to v7 --- apps/server/package.json | 2 +- pnpm-lock.yaml | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/server/package.json b/apps/server/package.json index d44db24ac6..7743735f50 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -62,7 +62,7 @@ "@types/serve-favicon": "2.5.7", "@types/serve-static": "2.2.0", "@types/stream-throttle": "0.1.4", - "@types/supertest": "6.0.3", + "@types/supertest": "7.2.0", "@types/tmp": "0.2.6", "@types/turndown": "5.0.6", "@types/ws": "8.18.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a5aed4eada..4075bee575 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -620,8 +620,8 @@ importers: specifier: 0.1.4 version: 0.1.4 '@types/supertest': - specifier: 6.0.3 - version: 6.0.3 + specifier: 7.2.0 + version: 7.2.0 '@types/tmp': specifier: 0.2.6 version: 0.2.6 @@ -6049,8 +6049,8 @@ packages: '@types/supercluster@7.1.3': resolution: {integrity: sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA==} - '@types/supertest@6.0.3': - resolution: {integrity: sha512-8WzXq62EXFhJ7QsH3Ocb/iKQ/Ty9ZVWnVzoTKc9tyyFRRF3a74Tk2+TLFgaFFw364Ere+npzHKEJ6ga2LzIL7w==} + '@types/supertest@7.2.0': + resolution: {integrity: sha512-uh2Lv57xvggst6lCqNdFAmDSvoMG7M/HDtX4iUCquxQ5EGPtaPM5PL5Hmi7LCvOG8db7YaCPNJEeoI8s/WzIQw==} '@types/tabulator-tables@6.3.1': resolution: {integrity: sha512-qL05wGXVy0yfWcF8LCE9+9uSeUIpeKdgpm8YmOAPTjLd3FaoZziPOhVxIiLzEhLTFfOvbuwnaWDm4v4i87diRQ==} @@ -16415,6 +16415,8 @@ snapshots: '@ckeditor/ckeditor5-utils': 47.4.0 ckeditor5: 47.4.0 es-toolkit: 1.39.5 + transitivePeerDependencies: + - supports-color '@ckeditor/ckeditor5-editor-multi-root@47.4.0': dependencies: @@ -16437,6 +16439,8 @@ snapshots: '@ckeditor/ckeditor5-table': 47.4.0 '@ckeditor/ckeditor5-utils': 47.4.0 ckeditor5: 47.4.0 + transitivePeerDependencies: + - supports-color '@ckeditor/ckeditor5-emoji@47.4.0': dependencies: @@ -21541,7 +21545,7 @@ snapshots: dependencies: '@types/geojson': 7946.0.16 - '@types/supertest@6.0.3': + '@types/supertest@7.2.0': dependencies: '@types/methods': 1.1.4 '@types/superagent': 8.1.9 @@ -28087,7 +28091,7 @@ snapshots: minipass-fetch@5.0.0: dependencies: - minipass: 7.1.2 + minipass: 7.1.3 minipass-sized: 1.0.3 minizlib: 3.1.0 optionalDependencies: @@ -31037,7 +31041,7 @@ snapshots: ssri@13.0.0: dependencies: - minipass: 7.1.2 + minipass: 7.1.3 ssri@8.0.1: dependencies: From 44dc8cf00d3d1e335625cd5f65882ad889e15750 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Thu, 26 Feb 2026 15:52:27 +0200 Subject: [PATCH 2/4] Close #7932 --- .../src/widgets/containers/root_container.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/apps/client/src/widgets/containers/root_container.ts b/apps/client/src/widgets/containers/root_container.ts index 2e852033c4..698e741c37 100644 --- a/apps/client/src/widgets/containers/root_container.ts +++ b/apps/client/src/widgets/containers/root_container.ts @@ -34,6 +34,7 @@ export default class RootContainer extends FlexContainer { window.visualViewport?.addEventListener("resize", () => this.#onMobileResize()); } + this.#initTheme(); this.#setDeviceSpecificClasses(); this.#setMaxContentWidth(); this.#setMotion(); @@ -67,6 +68,20 @@ export default class RootContainer extends FlexContainer { } } + #initTheme() { + const colorSchemeChangeObserver = matchMedia("(prefers-color-scheme: dark)") + colorSchemeChangeObserver.addEventListener("change", () => this.#updateColorScheme()); + + this.#updateColorScheme(); + } + + #updateColorScheme() { + const colorScheme = readCssVar(document.body, "theme-style").asString(); + + document.body.classList.toggle("light-theme", colorScheme === "light"); + document.body.classList.toggle("dark-theme", colorScheme === "dark"); + } + #onMobileResize() { const viewportHeight = window.visualViewport?.height ?? window.innerHeight; const windowHeight = Math.max(window.innerHeight, this.originalWindowHeight); // inner height changes when keyboard is opened, we need to compare with the original height to detect it. From a971640ffcc3cfd6ac5abb452554f676b0128bf9 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Thu, 26 Feb 2026 16:14:39 +0200 Subject: [PATCH 3/4] client: add some documentation --- apps/client/src/widgets/containers/root_container.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/client/src/widgets/containers/root_container.ts b/apps/client/src/widgets/containers/root_container.ts index 698e741c37..ccc3e8a9a1 100644 --- a/apps/client/src/widgets/containers/root_container.ts +++ b/apps/client/src/widgets/containers/root_container.ts @@ -13,6 +13,8 @@ import FlexContainer from "./flex_container.js"; * * For convenience, the root container has a few class selectors that can be used to target some global state: * + * - `#root-container.light-theme`, indicates whether the current color scheme is light. + * - `#root-container.dark-theme`, indicates whether the current color scheme is dark. * - `#root-container.virtual-keyboard-opened`, on mobile devices if the virtual keyboard is open. * - `#root-container.horizontal-layout`, if the current layout is horizontal. * - `#root-container.vertical-layout`, if the current layout is horizontal. From dfb44def2b5762e735fb05339cea0b174fc68055 Mon Sep 17 00:00:00 2001 From: Adorian Doran Date: Thu, 26 Feb 2026 17:50:23 +0200 Subject: [PATCH 4/4] client/theming: include the current theme ID as an attribute on the body element --- apps/client/src/widgets/containers/root_container.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/containers/root_container.ts b/apps/client/src/widgets/containers/root_container.ts index ccc3e8a9a1..403ef01678 100644 --- a/apps/client/src/widgets/containers/root_container.ts +++ b/apps/client/src/widgets/containers/root_container.ts @@ -73,8 +73,9 @@ export default class RootContainer extends FlexContainer { #initTheme() { const colorSchemeChangeObserver = matchMedia("(prefers-color-scheme: dark)") colorSchemeChangeObserver.addEventListener("change", () => this.#updateColorScheme()); - this.#updateColorScheme(); + + document.body.setAttribute("data-theme-id", options.get("theme")); } #updateColorScheme() {