// DetailPanel — tabs: overview, progress (activity + log surface)
function Tabs({ tab, onTab }) {
const items = [
{ id: 'overview', label: '概要' },
{ id: 'progress', label: '進捗' },
{ id: 'subtasks', label: 'サブタスク' },
];
return (
{items.map(it => (
))}
);
}
function OverviewTab({ task }) {
const Row = ({ label, value }) => (
{label}
{value}
);
return (
DESCRIPTION
{task.body}
{task.repo}} />
{task.branch}} />
);
}
function ProgressTab({ task }) {
const events = task.events || [];
return (
ACTIVITY
{events.map((e, i) => (
))}
ACTIVITY.LOG
{`[10:42:18] ` + String.fromCharCode(9432) + ` starting worker for task #` + task.id + `
[10:42:19] ` + String.fromCharCode(9432) + ` branch: ` + task.branch + `
[10:42:21] ` + String.fromCharCode(9432) + ` piece: ` + task.piece + `
[10:42:22] ` + String.fromCharCode(9655) + ` /brainstorm
[10:43:04] ` + String.fromCharCode(10003) + ` /plan (12 steps)
[10:43:05] ` + String.fromCharCode(9655) + ` /implement
[10:44:58] ` + String.fromCharCode(10003) + ` tests passed`}
);
}
function DetailPanel({ task, onClose }) {
const [tab, setTab] = React.useState('overview');
return (
DETAIL
#{task.id} {task.title}
{tab === 'overview' &&
}
{tab === 'progress' &&
}
{tab === 'subtasks' && (
サブタスクはこのタスクにありません。
)}
);
}
window.DetailPanel = DetailPanel;