fix: disambiguate hook lifecycle events in Activity panel

Append phase text (started/completed) to hook event labels so
start and end phases are visually distinct instead of appearing
as duplicates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-28 13:25:35 +01:00
co-authored by Copilot
parent dff97efd58
commit db9ffe8399
+4 -2
View File
@@ -256,15 +256,17 @@ function formatTurnEventEntry(event: SessionEventRecord): TurnEventEntry | undef
phase: event.subagentEventKind === 'started' ? 'start' : event.subagentEventKind === 'completed' ? 'end' : undefined,
success: event.subagentEventKind === 'completed' ? true : event.subagentEventKind === 'failed' ? false : undefined,
};
case 'hook-lifecycle':
case 'hook-lifecycle': {
const phaseLabel = event.hookPhase === 'start' ? 'started' : event.hookPhase === 'end' ? 'completed' : undefined;
return {
kind: event.kind,
occurredAt: event.occurredAt,
label: `Hook ${event.hookType ?? 'unknown'}`,
label: phaseLabel ? `Hook ${event.hookType ?? 'unknown'} ${phaseLabel}` : `Hook ${event.hookType ?? 'unknown'}`,
detail: event.hookInvocationId,
phase: event.hookPhase,
success: event.hookSuccess,
};
}
case 'skill-invoked':
return {
kind: event.kind,