• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apowers313 / aiforge / 21002763057

14 Jan 2026 05:00PM UTC coverage: 82.93% (-1.8%) from 84.765%
21002763057

push

github

apowers313
chore: delint

993 of 1165 branches covered (85.24%)

Branch coverage included in aggregate %.

5206 of 6310 relevant lines covered (82.5%)

15.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.8
/src/client/components/shells/ShellList.tsx
1
import { useMemo } from 'react';
1✔
2
import { Stack, Text } from '@mantine/core';
1✔
3
import type { Shell } from '@shared/types';
4
import { ShellItem } from './ShellItem';
1✔
5

6
interface ShellListProps {
7
  shells: Shell[];
8
  projectId: string;
9
  /** Offset in pixels for positioning the AI activity indicator in the left gutter */
10
  indicatorOffset?: number;
11
}
12

13
/**
14
 * Sort shells with AI shells at the top, then by creation time
15
 */
16
function sortShells(shells: Shell[]): Shell[] {
28✔
17
  return [...shells].sort((a, b) => {
28✔
18
    // AI shells come first
19
    if (a.type === 'ai' && b.type !== 'ai') return -1;
2✔
20
    if (a.type !== 'ai' && b.type === 'ai') return 1;
2!
21
    // Within same type, sort by creation time (newest first for AI, oldest first for bash)
22
    if (a.type === 'ai' && b.type === 'ai') {
2!
23
      return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime();
×
24
    }
✔
25
    return new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime();
1✔
26
  });
28✔
27
}
28✔
28

29
export function ShellList({ shells, projectId, indicatorOffset }: ShellListProps): React.ReactElement {
1✔
30
  const sortedShells = useMemo(() => sortShells(shells), [shells]);
34✔
31

32
  if (shells.length === 0) {
34✔
33
    return (
26✔
34
      <Text size="xs" c="dimmed" py="xs">
26✔
35
        No shells yet
36
      </Text>
26✔
37
    );
38
  }
26✔
39

40
  return (
8✔
41
    <Stack gap={2}>
8✔
42
      {sortedShells.map((shell) => (
8✔
43
        <ShellItem key={shell.id} shell={shell} projectId={projectId} indicatorOffset={indicatorOffset} />
10✔
44
      ))}
8✔
45
    </Stack>
8✔
46
  );
47
}
8✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc