Skip to content

Commit 67041ab

Browse files
github-actions[bot]Marfuenclaude
authored
feat(people): add Agent Installed column and hide deactivated users by default (#2331)
Add a color-coded "Agent" column to the People table showing device agent installation status (green dot for installed, red for not installed). Platform admins and deactivated members show a dash. Deactivated users are now hidden by default unless explicitly filtered. Migrates Laptop icon from lucide-react to @trycompai/design-system/icons. Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2670554 commit 67041ab

3 files changed

Lines changed: 39 additions & 10 deletions

File tree

apps/app/src/app/(app)/[orgId]/people/all/components/MemberRow.tsx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client';
22

3-
import { Laptop } from 'lucide-react';
43
import Link from 'next/link';
54
import { useParams } from 'next/navigation';
65
import { useState } from 'react';
@@ -33,7 +32,7 @@ import {
3332
TableRow,
3433
Text,
3534
} from '@trycompai/design-system';
36-
import { Checkmark, Edit, OverflowMenuVertical, TrashCan } from '@trycompai/design-system/icons';
35+
import { Checkmark, Edit, Laptop, OverflowMenuVertical, TrashCan } from '@trycompai/design-system/icons';
3736

3837
import { toast } from 'sonner';
3938
import { MultiRoleCombobox } from './MultiRoleCombobox';
@@ -232,6 +231,26 @@ export function MemberRow({
232231
</div>
233232
</TableCell>
234233

234+
{/* AGENT */}
235+
<TableCell>
236+
{isPlatformAdmin || isDeactivated ? (
237+
<Text size="sm" variant="muted">
238+
239+
</Text>
240+
) : (
241+
<div className="flex items-center gap-2">
242+
<span
243+
className={`inline-block h-2 w-2 rounded-full ${
244+
hasDeviceAgentDevice ? 'bg-green-500' : 'bg-red-400'
245+
}`}
246+
/>
247+
<span className={`text-sm ${hasDeviceAgentDevice ? 'text-foreground' : 'text-muted-foreground'}`}>
248+
{hasDeviceAgentDevice ? 'Installed' : 'Not Installed'}
249+
</span>
250+
</div>
251+
)}
252+
</TableCell>
253+
235254
{/* TASKS */}
236255
<TableCell>
237256
{taskCompletion ? (
@@ -284,7 +303,7 @@ export function MemberRow({
284303
setIsRemoveDeviceAlertOpen(true);
285304
}}
286305
>
287-
<Laptop className="mr-2 h-4 w-4" />
306+
<Laptop size={16} className="mr-2" />
288307
<span>Remove Device</span>
289308
</DropdownMenuItem>
290309
)}

apps/app/src/app/(app)/[orgId]/people/all/components/PendingInvitationRow.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ export function PendingInvitationRow({
100100
</div>
101101
</TableCell>
102102

103+
{/* AGENT */}
104+
<TableCell>
105+
<Text size="sm" variant="muted">
106+
107+
</Text>
108+
</TableCell>
109+
103110
{/* TASKS */}
104111
<TableCell>
105112
<Text size="sm" variant="muted">

apps/app/src/app/(app)/[orgId]/people/all/components/TeamMembersClient.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,15 @@ export function TeamMembersClient({
182182
// Check if the role filter matches any of the member's roles
183183
const matchesRole = !roleFilter || item.processedRoles.includes(roleFilter);
184184

185-
// Status filter: 'active' shows non-deactivated members + pending invitations
185+
// Status filter: by default (no filter), hide deactivated members
186+
// 'active' explicitly shows non-deactivated members + pending invitations
186187
// 'deactivated' shows only deactivated members
187-
// empty shows everything
188+
// 'all' shows everything
188189
const matchesStatus =
189-
!statusFilter ||
190-
(statusFilter === 'active' && item.displayStatus !== 'deactivated') ||
191-
(statusFilter === 'deactivated' && item.displayStatus === 'deactivated');
190+
(statusFilter === 'all') ||
191+
(statusFilter === 'deactivated' && item.displayStatus === 'deactivated') ||
192+
(!statusFilter && item.displayStatus !== 'deactivated') ||
193+
(statusFilter === 'active' && item.displayStatus !== 'deactivated');
192194

193195
return matchesSearch && matchesRole && matchesStatus;
194196
});
@@ -307,12 +309,12 @@ export function TeamMembersClient({
307309
<Select
308310
value={statusFilter || undefined}
309311
onValueChange={(value) => {
310-
setStatusFilter(value === 'all' ? '' : (value ?? ''));
312+
setStatusFilter(value ?? '');
311313
setPage(1);
312314
}}
313315
>
314316
<SelectTrigger>
315-
<SelectValue placeholder="All People" />
317+
<SelectValue placeholder="Active" />
316318
</SelectTrigger>
317319
<SelectContent>
318320
<SelectItem value="all">All People</SelectItem>
@@ -511,6 +513,7 @@ export function TeamMembersClient({
511513
<TableHead>
512514
<div className="w-[160px]">ROLE</div>
513515
</TableHead>
516+
<TableHead>AGENT</TableHead>
514517
<TableHead>TASKS</TableHead>
515518
<TableHead>ACTIONS</TableHead>
516519
</TableRow>

0 commit comments

Comments
 (0)