Skip to content

bug(settings): color-scheme selector is shown while pawwork is light-locked #23

@Astro-Han

Description

@Astro-Han

Context

During PR #18 review, Codex flagged that the settings UI still offers a system/light/dark color-scheme dropdown even though the only bundled theme (pawwork) is locked to light mode in packages/ui/src/theme/context.tsx.

Result: clicking "Dark" or "System" fires setColorScheme(...), which internally forces back to "light" when the active theme is DEFAULT_THEME_ID. The dropdown visually snaps back to "Light" after selection. The user sees a control that looks broken.

Scope link

This will be resolved naturally when the pawwork-dark palette lands (currently a TODO in docs/TODO.md → "pawwork-dark 做真正的深色调色板"). Once there's a real dark variant for pawwork, the color-scheme dropdown becomes functional.

Decision from PR review session: do not patch the UI in PR #18 as an interim "hide/disable" — pawwork-dark is next up and the interim polish would be throwaway work. Track here so the pawwork-dark PR picks this up.

Acceptance

Either:

  • Preferred — pawwork-dark ships, dropdown becomes functional.
  • Fallback if pawwork-dark is delayed — hide the color-scheme section from the settings panel whenever the active theme is light-locked.

Linked

  • packages/app/src/components/settings-general.tsx:288 (color-scheme dropdown)
  • packages/ui/src/theme/context.tsx:141-145,328-332 (light-lock enforcement)
  • packages/app/e2e/settings/settings.spec.ts:66-75 (color-scheme e2e test currently skipped; rewrite when this lands)
  • packages/app/src/theme-preload.test.ts + packages/app/public/oc-theme-preload.js:13 — preload currently always writes opencode-color-scheme=light unconditionally, will need a theme guard when a dark-capable theme exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritybugSomething isn't workinguiDesign system and user interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions