Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix: render desktop switches with a visible off-state thumb

6 months ago

8ca79b2
Authored
mweinbach4/17/2026, 8:29:05 PM
The initial switch migration corrected semantics but still rendered the thumb
poorly in the desktop app because the custom wrapper fought HeroUI's
margin-based thumb positioning and let the knob background end up
transparent. Move the styling to slot-targeted root selectors so the track
and thumb use the same positioning model as HeroUI, and force the knob onto
a solid panel surface so the off state reads correctly.

Constraint: HeroUI Switch uses margin-based thumb positioning, not transform-based movement
Rejected: Keep transform-based thumb movement | the renderer kept the off-state knob visually wrong despite correct semantics
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: For HeroUI switches here, style the rendered slots in the same positioning model the primitive already uses
Tested: bun test apps/desktop/test/developer-page.test.tsx; bun run typecheck; bun test; live Computer Use inspection in Electron dev mode
Not-tested: Full app visual sweep beyond the Developer settings page

Parent8ac02ae

1 file changed
  • apps/desktop/src/components/ui/switch.tsx+17−19