Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(ui/switch): white thumb in both states per design.pen c8fiq

cyhffdbae4afc28
diff --git a/ui/src/components/ui/switch.tsx b/ui/src/components/ui/switch.tsx
index e91538d9a..f5d418ee6 100644
--- a/ui/src/components/ui/switch.tsx
+++ b/ui/src/components/ui/switch.tsx
@@ -8,10 +8,11 @@ export interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonE
label?: string;
}
-// Mint-on / muted-off toggle. Mirrors design.pen's enable switches used
-// across Agents / Harness rows — pill rail + drag-feel thumb that snaps
-// to the active end. Keep this the single source of truth so the visual
-// stays consistent the next time a toggle ships.
+// Mirrors design.pen c8fiq/fcMl6 (Switch/Checked + Switch/Unchecked):
+// 44x24 rail, padding 2, 20x20 thumb. Rail flips `$--primary` (mint) ↔
+// `$--border-strong`; thumb stays `$--background` in both states so it
+// reads white in light mode and dark surface in dark mode without a
+// hardcoded fill color per side.
export const Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(
({ className, checked, onCheckedChange, label, disabled, ...props }, ref) => {
return (
@@ -24,18 +25,17 @@ export const Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(
disabled={disabled}
onClick={() => onCheckedChange(!checked)}
className={cn(
- 'relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition disabled:cursor-not-allowed disabled:opacity-50',
- checked
- ? 'border-mint/50 bg-mint shadow-[0_0_12px_-4px_rgba(91,255,160,0.55)]'
- : 'border-border-strong bg-surface-2',
+ 'relative inline-flex h-6 w-11 shrink-0 items-center rounded-full p-0.5 transition-colors',
+ 'disabled:cursor-not-allowed disabled:opacity-50',
+ checked ? 'bg-primary' : 'bg-border-strong',
className,
)}
{...props}
>
<span
className={cn(
- 'inline-block size-[18px] translate-x-0.5 rounded-full bg-background shadow-[0_1px_3px_rgba(0,0,0,0.4)] transition-transform',
- checked && 'translate-x-[22px] bg-[#080812]',
+ 'inline-block size-5 rounded-full bg-background shadow-[0_1px_3px_rgba(0,0,0,0.15),0_4px_8px_rgba(0,0,0,0.1)] transition-transform',
+ checked ? 'translate-x-5' : 'translate-x-0',
)}
/>
</button>