From f452c657ed5fc5b28e4daeb446bd88f36c1da095 Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Tue, 3 Nov 2026 11:03:29 +0800 Subject: [PATCH] fix(webui): tint default surfaces with the active accent --- AGENTS.md | 2 +- packages/webui/README.md | 6 + .../src/components/pages/settings-page.tsx | 8 +- packages/webui/src/contexts/ThemeContext.tsx | 15 +-- packages/webui/src/index.css | 107 +++++++++--------- 5 files changed, 76 insertions(+), 62 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2f71f2d3..f21f6760 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -121,7 +121,7 @@ After changing an action name, parameter, result description/schema, example or SDK breaking changes also update [CHANGELOG.md](packages/sdk/CHANGELOG.md) and [VERSIONING.md](packages/sdk/VERSIONING.md). WebUI changes follow its [interaction conventions](packages/webui/README.md). Keep user-facing documentation aligned with behavior. -Standalone WebUI branding uses the [SnowLuma mascot](assets/readme/mascot.png) and a lavender default accent. Keep server defaults, frontend presets and pre-mount CSS aligned as described in [WebUI default appearance](packages/webui/README.md#default-appearance), while preserving saved user choices and host appearance overlays. +Standalone WebUI branding uses the [SnowLuma mascot](assets/readme/mascot.png) and a lavender default accent. The default palette lightly tints neutral surfaces with the active accent, respecting sidebar-only scope and OLED black. Keep server defaults, frontend presets and pre-mount CSS aligned as described in [WebUI default appearance](packages/webui/README.md#default-appearance), while preserving saved user choices, named palettes and host appearance overlays. The root [README.md](README.md) presents the project's purpose, overall capabilities, quick start and documentation entry points. Update it only when those overview details change; adding or fixing an individual feature does not justify adding a dedicated section there. Put feature-specific API usage, configuration, limitations and troubleshooting in the relevant package README or topic document, preferring existing documentation. diff --git a/packages/webui/README.md b/packages/webui/README.md index 9c3580be..1760f1b5 100644 --- a/packages/webui/README.md +++ b/packages/webui/README.md @@ -10,6 +10,12 @@ The light variant uses a deeper purple for readable button labels; dark mode uses a softer lavender. Existing saved accents and custom colors are preserved. The original sky-blue accent remains available in Settings. +With the default palette, page, card, input, popover and sidebar surfaces mix a +small amount of the active accent into neutral light/dark backgrounds. Text stays +neutral for readability. Sidebar-only accents tint only the sidebar; OLED keeps a +true-black canvas. Named palettes, custom CSS variables and host appearance +overlays retain control of their own surfaces. + Keep the server defaults in `packages/core/src/webui/ui-config.ts`, the frontend defaults and preset in `src/contexts/ThemeContext.tsx`, and the pre-mount tokens in `src/index.css` aligned when changing the default accent. diff --git a/packages/webui/src/components/pages/settings-page.tsx b/packages/webui/src/components/pages/settings-page.tsx index a98a1753..643309f5 100644 --- a/packages/webui/src/components/pages/settings-page.tsx +++ b/packages/webui/src/components/pages/settings-page.tsx @@ -671,7 +671,11 @@ function AppearancePanel() { - +
{ACCENTS.map((spec) => { @@ -739,7 +743,7 @@ function AppearancePanel() {