diff --git a/.agents/notes/implemented/feature/2026-09-10-ui-choice-controls.md b/.agents/notes/implemented/feature/2026-09-10-ui-choice-controls.md new file mode 100644 index 000000000..6050676fa --- /dev/null +++ b/.agents/notes/implemented/feature/2026-09-10-ui-choice-controls.md @@ -0,0 +1,272 @@ +# UI choice controls: Checkbox, Radio and Switch + +Status: implemented +Translation: pending + +## Abstract + +The `@lody/ui` field family covered the controls a person types into, while every +control a person picks with — 9 `Checkbox` call sites and 24 `Switch` ones — +still rendered Radix with Tailwind classes the new token rules define no +equivalent for, including a `primary` fill and a `switch-track` colour that are +not tokens at all. This note records adding `Checkbox`, `Radio` and `Switch` to +the same `field` token group rather than opening one of their own, and settling +the state the text controls never had to answer: a control that holds a value is +ink, the `label` fill under a `background` mark with the primary button's own top +highlight, because the rules reserve `accent` for live state. Each renders a real +`
diff --git a/packages/components/src/components/mobile/mobile-general-settings.tsx b/packages/components/src/components/mobile/mobile-general-settings.tsx index 037f39da1..2f73e8c68 100644 --- a/packages/components/src/components/mobile/mobile-general-settings.tsx +++ b/packages/components/src/components/mobile/mobile-general-settings.tsx @@ -6,7 +6,7 @@ import type { } from '@lody/shared'; import { useAtom, useAtomValue } from 'jotai'; import { Loading } from '@/ui'; -import { Switch } from '@/ui/switch'; +import { Switch } from '@lody/ui/switch'; import { toast } from 'sonner'; import { autoArchiveOnPrClosedAtom, diff --git a/packages/components/src/components/mobile/mobile-integrations-settings.tsx b/packages/components/src/components/mobile/mobile-integrations-settings.tsx index de23478e8..24d8db3cf 100644 --- a/packages/components/src/components/mobile/mobile-integrations-settings.tsx +++ b/packages/components/src/components/mobile/mobile-integrations-settings.tsx @@ -8,7 +8,7 @@ import { currentWorkspaceSlugAtom } from '@/atoms'; import { cloudOperations } from '@/lib/cloud-api-operations'; import { cn } from '@/lib/utils'; import { useAppCapability } from '@/lib/app-platform'; -import { Switch } from '@/ui/switch'; +import { Switch } from '@lody/ui/switch'; import { Input } from '@lody/ui/input'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { toast } from 'sonner'; diff --git a/packages/components/src/components/mobile/mobile-local-project-settings.tsx b/packages/components/src/components/mobile/mobile-local-project-settings.tsx index 0202e61fc..9e698a9ea 100644 --- a/packages/components/src/components/mobile/mobile-local-project-settings.tsx +++ b/packages/components/src/components/mobile/mobile-local-project-settings.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { useAtomValue } from 'jotai'; import { machineSupportsLocalProjectRemovalProtocol, type MachineId } from '@lody/shared'; import { ChevronRight, Loader2, Wrench } from 'lucide-react'; -import { Switch } from '@/ui/switch'; +import { Switch } from '@lody/ui/switch'; import { TooltipProvider } from '@/ui/tooltip'; import { currentWorkspaceIdAtom } from '@/atoms'; import { getMachineMetaMapAtom } from '@/atoms/machines'; diff --git a/packages/components/src/components/mobile/mobile-project-screen.tsx b/packages/components/src/components/mobile/mobile-project-screen.tsx index 9e5625288..a3b0f33e3 100644 --- a/packages/components/src/components/mobile/mobile-project-screen.tsx +++ b/packages/components/src/components/mobile/mobile-project-screen.tsx @@ -22,7 +22,7 @@ import { isNativeAppShell } from '@/lib/native-platform'; import { consumeMobileBackNavigation } from '@/lib/mobile-back-navigation'; import { cn } from '@/lib/utils'; import { useLongPress } from '@/hooks/use-long-press'; -import { Checkbox } from '@/ui/checkbox'; +import { Checkbox } from '@lody/ui/checkbox'; import { CachedAvatarImg } from '@/components/cached-avatar-img'; import { WorktreeIcon } from '@/components/icons/worktree-icon'; import { @@ -563,7 +563,7 @@ export function ConversationRow({