From 4b1547db7d66b9c7c1fffb1d4c1765bee789b2a8 Mon Sep 17 00:00:00 2001 From: chengyongru <61816729+chengyongru@users.noreply.github.com> Date: Thu, 23 Jul 2026 17:47:20 +0800 Subject: [PATCH] style(webui): unify settings and dark mode surfaces (#5058) --- .github/workflows/ci.yml | 31 +++++ webui/src/components/SessionSearchDialog.tsx | 2 +- .../src/components/settings/SettingsView.tsx | 119 ++++++++---------- .../settings/SkillsCatalogSettings.tsx | 2 +- .../src/components/settings/ToggleButton.tsx | 8 +- .../settings/channels/ChannelIdentity.tsx | 5 +- .../channels/ChannelInstancesPanel.tsx | 10 +- .../settings/channels/ChannelSetupPanel.tsx | 10 +- .../settings/channels/ChannelSetupParts.tsx | 14 +-- .../settings/channels/CredentialForm.tsx | 4 +- webui/src/components/thread/PromptRail.tsx | 2 +- .../src/components/thread/ThreadComposer.tsx | 2 +- webui/src/globals.css | 26 ++-- webui/tailwind.config.js | 4 + 14 files changed, 130 insertions(+), 109 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 267a8bc0..9b6e49be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,39 @@ permissions: contents: read jobs: + changes: + name: Detect changes + runs-on: ubuntu-latest + outputs: + python_required: ${{ steps.paths.outputs.python_required }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Detect Python-relevant changes + id: paths + shell: bash + env: + BASE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} + HEAD_SHA: ${{ github.sha }} + run: | + python_required=true + + if git cat-file -e "${BASE_SHA}^{commit}" 2>/dev/null && + changed_files="$(git diff --name-only --no-renames "$BASE_SHA" "$HEAD_SHA")" && + [[ -n "$changed_files" ]] && + ! grep -qvE '^(webui/|nanobot/channels/[^/]+/webui/|docs/)' <<< "$changed_files"; then + python_required=false + fi + + echo "python_required=$python_required" >> "$GITHUB_OUTPUT" + test: name: Python (${{ matrix.name }}) + needs: changes + if: needs.changes.outputs.python_required == 'true' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: diff --git a/webui/src/components/SessionSearchDialog.tsx b/webui/src/components/SessionSearchDialog.tsx index a512f33f..5e1e0fa8 100644 --- a/webui/src/components/SessionSearchDialog.tsx +++ b/webui/src/components/SessionSearchDialog.tsx @@ -121,7 +121,7 @@ export function SessionSearchDialog({ className={cn( "flex max-h-[min(40rem,calc(100vh-2rem))] w-[calc(100vw-2rem)] max-w-[42rem] flex-col gap-0 overflow-hidden p-0", "rounded-[22px] border border-border bg-background text-foreground shadow-[0_22px_70px_rgba(0,0,0,0.22)]", - "dark:border-white/14 dark:bg-[#2b2b2b] dark:shadow-[0_26px_90px_rgba(0,0,0,0.44)] sm:rounded-[22px]", + "dark:border-white/14 dark:bg-popover dark:shadow-[0_26px_90px_rgba(0,0,0,0.44)] sm:rounded-[22px]", )} > {t("sidebar.searchAria")} diff --git a/webui/src/components/settings/SettingsView.tsx b/webui/src/components/settings/SettingsView.tsx index e972b775..205cffd7 100644 --- a/webui/src/components/settings/SettingsView.tsx +++ b/webui/src/components/settings/SettingsView.tsx @@ -2034,11 +2034,7 @@ export function SettingsView({ }; return ( -
+
{showSidebar ? ( @@ -2138,7 +2134,7 @@ export function SettingsView({
{loading ? ( -
+
{t("settings.status.loading")}
@@ -2225,7 +2221,7 @@ function SettingsSidebar({ return (