diff --git a/ui/src/components/account/accounts-table.tsx b/ui/src/components/account/accounts-table.tsx index 757ff701..37abf24e 100644 --- a/ui/src/components/account/accounts-table.tsx +++ b/ui/src/components/account/accounts-table.tsx @@ -24,7 +24,7 @@ import { AlertDialogHeader, AlertDialogTitle, } from '@/components/ui/alert-dialog'; -import { Check, CheckCheck, Link2, Pencil, RotateCcw, Trash2, Unlink } from 'lucide-react'; +import { Check, CheckCheck, Pencil, RotateCcw, Trash2 } from 'lucide-react'; import { EditAccountContextDialog } from '@/components/account/edit-account-context-dialog'; import { useSetDefaultAccount, @@ -137,51 +137,22 @@ export function AccountsTable({ data, defaultAccount }: AccountsTableProps) { deleteMutation.isPending || updateContextMutation.isPending; const isCliproxy = row.original.type === 'cliproxy'; - const isShared = row.original.context_mode === 'shared'; const hasLegacyInference = row.original.context_inferred || row.original.continuity_inferred; return (
- {!isCliproxy && ( - - )} {!isCliproxy && ( )} {!isCliproxy && hasLegacyInference && ( @@ -270,7 +241,7 @@ export function AccountsTable({ data, defaultAccount }: AccountsTableProps) { created: 'w-[150px]', last_used: 'w-[150px]', context: 'w-[170px]', - actions: 'w-[340px]', + actions: 'w-[290px]', }[header.id] || 'w-auto'; return ( diff --git a/ui/src/components/account/history-sync-learning-map.tsx b/ui/src/components/account/history-sync-learning-map.tsx index b63b53a2..09ad40b0 100644 --- a/ui/src/components/account/history-sync-learning-map.tsx +++ b/ui/src/components/account/history-sync-learning-map.tsx @@ -1,6 +1,8 @@ +import { useState } from 'react'; import { ArrowRight, ArrowRightLeft, + ChevronDown, Layers3, Link2, Unlink, @@ -8,7 +10,9 @@ import { type LucideIcon, } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; +import { Button } from '@/components/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; import { cn } from '@/lib/utils'; interface HistorySyncLearningMapProps { @@ -17,51 +21,49 @@ interface HistorySyncLearningMapProps { deeperSharedCount: number; sharedGroups: string[]; legacyTargetCount: number; + cliproxyCount: number; } type StageTone = 'isolated' | 'shared' | 'deeper'; -function StageCard({ +function StageTile({ title, count, icon: Icon, tone, - description, }: { title: string; count: number; icon: LucideIcon; tone: StageTone; - description: string; }) { - const toneClasses: Record = { + const toneClasses: Record = { isolated: { - card: 'border-blue-300/60 bg-blue-50/40 dark:border-blue-900/40 dark:bg-blue-900/10', + border: 'border-blue-300/60 bg-blue-50/40 dark:border-blue-900/40 dark:bg-blue-900/10', icon: 'text-blue-700 dark:text-blue-400', count: 'text-blue-700 dark:text-blue-400', }, shared: { - card: 'border-emerald-300/60 bg-emerald-50/40 dark:border-emerald-900/40 dark:bg-emerald-900/10', + border: + 'border-emerald-300/60 bg-emerald-50/40 dark:border-emerald-900/40 dark:bg-emerald-900/10', icon: 'text-emerald-700 dark:text-emerald-400', count: 'text-emerald-700 dark:text-emerald-400', }, deeper: { - card: 'border-indigo-300/60 bg-indigo-50/40 dark:border-indigo-900/40 dark:bg-indigo-900/10', + border: + 'border-indigo-300/60 bg-indigo-50/40 dark:border-indigo-900/40 dark:bg-indigo-900/10', icon: 'text-indigo-700 dark:text-indigo-400', count: 'text-indigo-700 dark:text-indigo-400', }, }; return ( -
+
-

{title}

- +

{title}

+
-

- {count} -

-

{description}

+

{count}

); } @@ -72,91 +74,93 @@ export function HistorySyncLearningMap({ deeperSharedCount, sharedGroups, legacyTargetCount, + cliproxyCount, }: HistorySyncLearningMapProps) { + const [open, setOpen] = useState(false); const groupsToShow = sharedGroups.length > 0 ? sharedGroups : ['default']; return ( - +
- How History Sync Works +
+ How History Sync Works + + Isolated -> Shared -> Deeper. Use Sync per row for all changes. + +
Learning Map
- - Accounts can move between modes at any time. Link/unlink is instant; Edit gives full - control of group and continuity depth. -
- -
- -
- -
- -
- -
- -
-
-
-
- -

Mode Switch Actions

-
-
- Link: Isolated -> Shared - Unlink: Shared -> Isolated - Edit: Group + Deeper -
-
- -
-
- -

History Sync Group

-
-

- Accounts in the same group share the same project context bucket. Group names are - user-defined lanes, with default as fallback. -

-
- {groupsToShow.map((group) => ( - - {group} - - ))} -
-
-
- - {legacyTargetCount > 0 && ( -
- {legacyTargetCount} legacy account - {legacyTargetCount > 1 ? 's still need' : ' still needs'} explicit confirmation. Use{' '} - Confirm Legacy Policies in Action Center. + + {cliproxyCount > 0 && ( +
+ {cliproxyCount} CLIProxy Claude pool account{cliproxyCount > 1 ? 's are' : ' is'} + managed in Action Center / CLIProxy page.
)} + +
+ +
+ +
+ +
+ +
+ +
+ + + + + + +
+
+
+ +

Mode Switch

+
+

+ Sync dialog lets users move between isolated/shared and choose deeper continuity. +

+
+ +
+
+ +

History Sync Group

+
+

+ Same group means shared project context lane. Default fallback is{' '} + default. +

+
+ {groupsToShow.map((group) => ( + + {group} + + ))} +
+
+
+ + {legacyTargetCount > 0 && ( +
+ {legacyTargetCount} legacy account + {legacyTargetCount > 1 ? 's still need' : ' still needs'} explicit confirmation. +
+ )} +
+
); diff --git a/ui/src/pages/accounts.tsx b/ui/src/pages/accounts.tsx index 0f1b603a..9e00cd5e 100644 --- a/ui/src/pages/accounts.tsx +++ b/ui/src/pages/accounts.tsx @@ -10,11 +10,8 @@ import { ArrowRight, ChevronDown, ChevronLeft, - Link2, Plus, - Unlink, Users, - Waves, Zap, } from 'lucide-react'; import { AccountsTable } from '@/components/account/accounts-table'; @@ -23,82 +20,11 @@ import { HistorySyncLearningMap } from '@/components/account/history-sync-learni import { CopyButton } from '@/components/ui/copy-button'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; -import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; import { ScrollArea } from '@/components/ui/scroll-area'; import { useAccounts, useConfirmLegacyAccountPolicies } from '@/hooks/use-accounts'; import { cn } from '@/lib/utils'; -import type { LucideIcon } from 'lucide-react'; - -type MetricTone = 'default' | 'shared' | 'deeper' | 'isolated'; - -function MetricTile({ - label, - value, - icon: Icon, - tone = 'default', -}: { - label: string; - value: number; - icon: LucideIcon; - tone?: MetricTone; -}) { - const toneClasses: Record = { - default: { - border: 'border-border', - icon: 'text-primary', - }, - shared: { - border: 'border-emerald-300/60 dark:border-emerald-900/40', - icon: 'text-emerald-700 dark:text-emerald-400', - }, - deeper: { - border: 'border-indigo-300/60 dark:border-indigo-900/40', - icon: 'text-indigo-700 dark:text-indigo-400', - }, - isolated: { - border: 'border-blue-300/60 dark:border-blue-900/40', - icon: 'text-blue-700 dark:text-blue-400', - }, - }; - - return ( -
-
- {label} - -
-

{value}

-
- ); -} - -function StrategyCard({ - title, - description, - variant, -}: { - title: string; - description: string; - variant: 'auth' | 'pool'; -}) { - const variantClasses = - variant === 'auth' - ? 'border-emerald-300/70 bg-emerald-50/40 dark:border-emerald-900/40 dark:bg-emerald-900/10' - : 'border-blue-300/70 bg-blue-50/40 dark:border-blue-900/40 dark:bg-blue-900/10'; - const titleClasses = - variant === 'auth' - ? 'text-emerald-800 dark:text-emerald-300' - : 'text-blue-800 dark:text-blue-300'; - - return ( -
-

{title}

-

{description}

-
- ); -} export function AccountsPage() { const navigate = useNavigate(); @@ -164,40 +90,7 @@ export function AccountsPage() {
-
-
-

- Snapshot -

-
- - - - -
-
- -
-

- Strategy Lanes -

- - -
- +
{hasLegacyFollowUp && (

@@ -238,19 +131,14 @@ export function AccountsPage() {

)} + + {!hasLegacyFollowUp && ( +
+ No legacy follow-up pending. Manage pool auth from Action Center. +
+ )}
- -
-
- Standard shared - {sharedStandardCount} -
-
- CLIProxy hidden - {cliproxyCount} -
-
{/* Main workspace */} @@ -275,39 +163,26 @@ export function AccountsPage() { This table is intentionally scoped to ccs auth accounts. Use - Link/ - Unlink - for quick policy changes and pencil edit for advanced group/deeper settings. + Sync + for mode/group/depth changes.

- {cliproxyCount > 0 && ( - - - CLIProxy pool accounts are managed in their own page - - {cliproxyCount} OAuth account{cliproxyCount > 1 ? 's are' : ' is'} available in - CLIProxy. This table only covers local - ccs auth - profiles. - - - )} - Account Matrix - Shared total: {sharedCount}. Actions now include quick link/unlink plus legacy + Shared total: {sharedCount}. Actions include Sync settings and legacy confirmation. @@ -493,12 +368,14 @@ export function AccountsPage() { -
- - - - -
+