Improve workflow error messaging
This commit is contained in:
@@ -125,10 +125,14 @@ export function TaskDetailModal({ isOpen, taskId, onClose }: TaskDetailModalProp
|
||||
const [expandedStage, setExpandedStage] = useState<string | null>(null);
|
||||
|
||||
const defaultExpandedStage = useMemo(() => {
|
||||
if (task?.status === 'completed' || task?.status === 'failed') {
|
||||
if (task?.status === 'completed') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (task?.status === 'failed') {
|
||||
return task.stage;
|
||||
}
|
||||
|
||||
for (const item of timeline) {
|
||||
if (item.state === 'active') {
|
||||
return item.stage;
|
||||
@@ -278,6 +282,8 @@ export function TaskDetailModal({ isOpen, taskId, onClose }: TaskDetailModalProp
|
||||
<div className="flex items-center gap-2">
|
||||
<span className={item.state === 'active'
|
||||
? 'text-[11px] uppercase tracking-[0.12em] text-[color:var(--accent)]'
|
||||
: item.state === 'failed'
|
||||
? 'text-[11px] uppercase tracking-[0.12em] text-[#ff8f8f]'
|
||||
: item.state === 'completed'
|
||||
? 'text-[11px] uppercase tracking-[0.12em] text-[color:var(--terminal-muted)]'
|
||||
: 'text-[11px] uppercase tracking-[0.12em] text-[#7f8994]'}
|
||||
|
||||
Reference in New Issue
Block a user