Files
hanarang-dashboard/frontend/components/sisters/SessionList.tsx
narang-ai 4015e5f22f feat(sprint-003): sister detail + org chart + settings viewer
Sprint 002 non-blocking:
- API_URL/POLL_INTERVAL lib/config.ts 공통 추출
- 폴링 간격 NEXT_PUBLIC_POLL_INTERVAL_MS env화

Sprint 003 본문:
- TASK-008: SisterDetailService (config/sessions/subagents/activity 조회)
- TASK-008: GET /api/sisters/:name/{config,sessions,subagents,activity}
- TASK-008: GET /api/org → 조직도 + 파이프라인 데이터
- TASK-009: /sisters 목록 페이지 (카드 클릭 → 상세 이동)
- TASK-009: /sisters/[name] 상세 페이지 (탭: 개요/설정/세션/서브에이전트)
- TASK-009: SisterCard → /sisters/:name 링크 연결
- TASK-010: /org 조직도 페이지 (OrgTree 컴포넌트, 호버 팝업)
- TASK-011: /settings 설정 뷰어 페이지 (자매 선택 드롭다운)
- 테스트 16/16 pass, FE build 성공 (7 routes)
2026-04-04 11:55:14 +09:00

78 lines
1.6 KiB
TypeScript

'use client';
import React from 'react';
import styled from 'styled-components';
import { theme } from '@/styles/theme';
interface Session {
name: string;
modified: string;
size: string;
}
const Table = styled.table`
width: 100%;
border-collapse: collapse;
`;
const Th = styled.th`
text-align: left;
padding: 8px 12px;
font-size: 12px;
font-weight: 600;
color: ${theme.colors.textSecondary};
border-bottom: 1px solid ${theme.colors.border};
text-transform: uppercase;
letter-spacing: 0.05em;
`;
const Td = styled.td`
padding: 10px 12px;
font-size: 13px;
color: ${theme.colors.textPrimary};
border-bottom: 1px solid ${theme.colors.border};
`;
const Tr = styled.tr`
&:last-child td { border-bottom: none; }
&:hover td { background: rgba(240,246,252,0.03); }
`;
const SessionName = styled.code`
color: ${theme.colors.accent};
font-family: monospace;
font-size: 12px;
`;
const Empty = styled.div`
padding: 32px;
text-align: center;
color: ${theme.colors.textSecondary};
font-size: 13px;
`;
export default function SessionList({ sessions }: { sessions: Session[] }) {
if (!sessions.length) return <Empty> </Empty>;
return (
<Table>
<thead>
<tr>
<Th> ID</Th>
<Th> </Th>
<Th></Th>
</tr>
</thead>
<tbody>
{sessions.map((s, i) => (
<Tr key={i}>
<Td><SessionName>{s.name}</SessionName></Td>
<Td>{s.modified}</Td>
<Td>{s.size}B</Td>
</Tr>
))}
</tbody>
</Table>
);
}