Skip to content

fix(review): show System in theme menu via shared mode list#1015

Open
gwynnnplaine wants to merge 1 commit into
backnotprop:mainfrom
gwynnnplaine:fix/review-theme-system-ssot
Open

fix(review): show System in theme menu via shared mode list#1015
gwynnnplaine wants to merge 1 commit into
backnotprop:mainfrom
gwynnnplaine:fix/review-theme-system-ssot

Conversation

@gwynnnplaine

@gwynnnplaine gwynnnplaine commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Small QoL fix. I've sent a couple of little patches before (#523); while using code review I hit a papercut worth fixing.

The papercut

The code-review Options → Theme menu only offers Light/Dark, but plan review, annotate, and Settings all offer System too — so "follow OS theme" silently wasn't available in review.

Root cause

Each surface hand-listed its own theme modes (PlanHeaderMenu, ReviewHeaderMenu, ThemeTab, ModeToggle). The review picker had dropped system, and its activeTheme memo collapsed system → the resolved light/dark, so a System button couldn't have shown as active anyway.

Changes

  • Added one shared list, packages/ui/components/themeModes.ts (THEME_MODES), carrying each mode's id + label + icon.
  • Mode is now derived from that list, so a mode can't exist without a render entry and no surface can omit one (no separate completeness guard needed).
  • All four pickers map the shared list; active state = the selected mode everywhere. Dropped ReviewHeaderMenu's activeTheme memo and its local Sun/Moon icons.

Verification

typecheck clean · apps/review build + build:hook green · manual: plannotator review now shows Light/Dark/System (System selectable, follows the OS); plan/annotate/Settings/landing unchanged.

Not in this PR

ThemeProvider still exposes redundant theme/setTheme and mode/setMode aliases — happy to collapse those separately if you'd like.

The review Options menu offered only Light/Dark while the plan, annotate,
and Settings surfaces offered System too. Four surfaces each hand-listed
the theme modes independently, so the review picker had silently dropped
`system` and could never highlight it (its `activeTheme` memo collapsed
system to the resolved light/dark).

Introduce `THEME_MODES` as one shared list of the mode set with each
mode's label and icon; derive `Mode` from it so a mode cannot exist
without a render entry, and no surface can omit one. All four pickers
(plan, review, Settings, landing toggle) now map the same list; active
state is the selected mode everywhere.

🩸 Co-Authored-By: Dexter - @gwynnnplaine's Pi (https://pi.dev/) assistant
@gwynnnplaine

gwynnnplaine commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@backnotprop mind taking a look when you get a chance? hope it's ok I skipped the issue since it's tiny QoL stuff..

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