Skip to content

feat(ui): make the control center quick switches - #457

Merged
DeadWaveWave merged 3 commits into
mainfrom
feat/ui-control-center
Oct 17, 2026
Merged

DeadWaveWave merged 3 commits into
mainfrom
feat/ui-control-center

Conversation

@DeadWaveWave

@DeadWaveWave DeadWaveWave commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

💡 Change Scope

  • Small Change: Fast feedback, localized UI/logic, low-risk.
  • Large Change: New feature, cross-boundary logic, runtime-risk (persistence, IPC, lifecycle, recovery).

📝 What Does This PR Do?

Tide Phase 2.5, first step: the control center becomes quick switches, as the Tide Spec describes ("控制中心改为快捷开关,主题详情移到设置页").

  • Theme: two segmented controls instead of the five-card grid — family (Cove / Pixel) and mode (Light / Dark / Follow System). Pixel has no follow-system mode, so its mode control offers Light and Dark, and switching to Pixel from Follow System keeps what the system shows now. The mapping between a saved uiTheme and family + mode is a pure domain function (settings/domain/uiThemeChoice.ts).
  • Plugin themes are chosen in Settings → Appearance (which already lists them). While one is active, the control center names it; no family is selected and the mode control is disabled; the existing "unavailable" and "could not be loaded" notices stay, and the saved choice is never rewritten.
  • Display switches: Pixel background, Motion signals (the creation, close and working pixel effects together; on when all three are on) and Minimap. They write the same settings as Settings → Appearance through the same store, so either place updates the other.
  • Notification banner: the standby banner switch leaves the control center (it is already in Settings → General) and is renamed from "Top-right banner" to "Notification banner" ("通知横幅").
  • Footer: "Theme and display settings" opens Settings.
  • Window material, background twinkle and presentation mode from the Spec's list arrive with their features in later phases.
  • Strings move to en.controlCenter.ts / zh-CN.controlCenter.ts (the main locale files reached the 500-line limit). The unused --cove-theme-preview-pixel token and the grid's styles are removed.

🏗️ Large Change Spec (Required if "Large Change" is checked)

1. Context & Business Logic

Approved Tide Spec, app shell: "控制中心:只放快捷开关:明暗、主题族、背景、窗口材质、背景闪烁、动态信号、展示模式;主题详情和预览在设置页;「右上角横幅」改名「通知横幅」并移到设置". macOS Control Center and Windows quick settings follow the same split: quick toggles in the panel, details in Settings.

2. State Ownership & Invariants

No new state: uiTheme, canvasPixelBackgroundEnabled and the three pixel effect flags already live in AgentSettings.

  1. One preference, one writer: the control center and Settings update the same settings.
  2. Choosing a family or mode always yields a built-in theme id of that family; the control center never writes a plugin theme.
  3. An unavailable or failing plugin theme is reported, never replaced.

3. Verification Plan & Regression Layer

  • Unit: uiThemeChoice.spec.ts (family/mode for every theme, modes per family, resolution including Pixel + Follow System); ControlCenter.spec.tsx (segments, switches, Pixel modes, active plugin theme, unavailable and failed plugin themes, focus and mobile sheet); the Pixel preview identity test now checks the Settings gallery.
  • E2E: control center, command center, workspace search, Pixel Light and the standby banner specs switch themes through the new segments (the banner spec through Settings); the Web canvas theme spec picks plugin themes in Settings and checks the control center names them.

✅ Delivery & Compliance Checklist

  • The local quick gate passes: pnpm verify:quick / pnpm pre-commit is green; any additional focused tests are reported above.
  • Full CI passes on the final revision before merge; local quick checks are not reported as full regression.
  • I have signed the CLA if required (see CLA.md).
  • I have included new tests to lock down the behavior (or explicitly stated why it's untestable).
  • I have strictly adhered to the DEVELOPMENT.md architectural boundaries.
  • I have attached a screenshot or screen recording (if this touches the UI).
  • I have updated the documentation accordingly (if adding a feature or changing a contract).

Local (macOS arm64): pnpm verify:quick passed: related Vitest 187 files / 925 tests, native contracts 6 / 9, representative E2E 44 tests; the five updated E2E specs (16 tests) and the Web canvas theme spec (2 tests) passed separately.

After the gate the branch was rebased onto #456; on the rebased tree typecheck, lint, style check, the related unit tests (188 files / 926 tests) and the updated E2E specs plus the terminal transparency spec (14 passed, 3 skipped) passed again. Full CI on the final revision 0cdfe27c (run 39005687399): all 11 checks passed on the first attempt (ci-macos 1-3, ci-ubuntu, e2e-ubuntu 1-3, platform-e2e-windows, web-canvas-continuity-ubuntu, pr-template, license/cla).

📸 Screenshots / Visual Evidence

Before and after crops of the control center in Cove dark, Cove light and Pixel, on the review page shown to the owner (who asked for review pages to be shown without waiting for approval).

🤖 Generated with Claude Code

DeadWaveWave and others added 3 commits October 17, 2026 13:14
The control center now holds quick switches only: theme family (Cove or
Pixel) and light, dark or follow-system mode as segmented controls,
pixel background, motion signals (creation, close and working pixel
effects together) and the minimap. Pixel offers no follow-system mode,
so switching to it keeps what the system shows. Plugin themes and theme
previews stay in Settings → Appearance; an active plugin theme is named
here, with the existing unavailable and load-failure notices. The
standby banner switch leaves the control center (it is in Settings) and
is renamed "Notification banner".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DeadWaveWave
DeadWaveWave force-pushed the feat/ui-control-center branch from fbd2161 to 0cdfe27 Compare October 17, 2026 05:16
@DeadWaveWave
DeadWaveWave merged commit 9108b5c into main Oct 17, 2026
12 checks passed
@DeadWaveWave
DeadWaveWave deleted the feat/ui-control-center branch October 17, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant