Skip to content

fix(settings): every switch is the core's switch (#318) - #319

Merged
Maxaubert merged 2 commits into
mainfrom
fix/318-one-switch
Oct 7, 2026
Merged

Maxaubert merged 2 commits into
mainfrom
fix/318-one-switch

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #318.

Owner, 2026-10-07: "toggles differ in look i like the teal with black not the green and white", then "yes option 1 but it should depend on the theme so only teal on the teal theme".

Why the Win+E switch differed

settings/WinEShortcutRow.tsx drew its own <button role="switch"> with bg-[var(--p-accent)] and a bg-white knob, a deliberate exception from #202. Every other settings switch is the core's Switch (prism-term-core/renderer/settings/fields). Two more switches drew their own: the phone server switch (PhoneDialog.tsx, accent and white, off --p-hover) and the player menu's toggles (PlayerMenu.tsx, accent and white).

What changed

  • Win+E row and phone server: the core's Switch (label and disabled kept).
  • Player menu toggle: keeps its menu size, takes the core's SWITCH_ON / SWITCH_KNOB_ON when on.
  • settingsControls.test.ts: Win+E is no longer an accent exception; a new test refuses any role="switch" in a renderer .tsx (the core draws all of them).
  • settingsLook e2e: on the Explorer page, in a dark and a light style, every on switch has one look (button and knob classes, computed track and knob colours), every off switch has one, and the Win+E switch has the core's markup (it is off and unavailable outside a packaged build, so it cannot be measured on).
  • CLAUDE.md: the Settings buttons are neutral grey, only Save keeps the accent #202 rule records the change. Version 0.92.1 to 0.92.2.

The look

This PR makes every switch the core's; the core decides how it looks. Today (core 0.25.0) an on switch is the neutral grey. With Maxaubert/PrismTerminal#139 (core 0.26.0, not merged yet) the core bump makes every on switch --p-sel-bg with an --p-on-accent knob, so teal with a dark knob only on a teal style, and the Win+E switch follows with no further change here.

Gates

  • typecheck: pass; lint: 0 errors (7 warnings); vitest: 2527 passed
  • e2e settingsLook (with the new checks): pass
  • npm run e2e:terminal: all checks passed

Not installed for hands-on testing: the visible change only arrives with the core bump.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t

Maxaubert and others added 2 commits October 7, 2026 05:57
The Win+E row drew its own switch (accent track, white knob), as did
the phone server dialog and the player menu's toggles, beside the
core's Switch everywhere else. They now use the core's Switch (or its
SWITCH_ON / SWITCH_KNOB_ON at a menu's size), so once the core bump
lands (PrismTerminal #139, core 0.26.0) every switch wears the style's
accent with the ink chosen for it. A unit test refuses any role="switch"
outside the core; settingsLook holds every Explorer switch to one look.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
@Maxaubert
Maxaubert merged commit 34669e0 into main Oct 7, 2026
3 checks passed
@Maxaubert
Maxaubert deleted the fix/318-one-switch branch October 7, 2026 16:04
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.

Every switch is the core's switch (Win+E, phone server, player menu)

1 participant