Implement session outcomes, step timing, and live timer fixes
This commit is contained in:
@@ -140,6 +140,13 @@ export function SessionHistoryPage() {
|
||||
return session.tree_snapshot?.name || 'Unknown Tree'
|
||||
}
|
||||
|
||||
const formatOutcomeLabel = (outcome: Session['outcome']): string => {
|
||||
if (!outcome) return 'Not set'
|
||||
return outcome === 'workaround'
|
||||
? 'Workaround'
|
||||
: outcome.charAt(0).toUpperCase() + outcome.slice(1)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container mx-auto px-4 py-6 sm:px-6 sm:py-8">
|
||||
<div className="mb-8">
|
||||
@@ -226,6 +233,20 @@ export function SessionHistoryPage() {
|
||||
{session.client_name}
|
||||
</span>
|
||||
)}
|
||||
{session.completed_at && (
|
||||
<span
|
||||
className={cn(
|
||||
'rounded-full px-2.5 py-0.5 text-xs font-medium',
|
||||
session.outcome === 'resolved' && 'bg-emerald-500/20 text-emerald-300',
|
||||
session.outcome === 'workaround' && 'bg-amber-500/20 text-amber-300',
|
||||
session.outcome === 'escalated' && 'bg-blue-500/20 text-blue-300',
|
||||
session.outcome === 'unresolved' && 'bg-rose-500/20 text-rose-300',
|
||||
!session.outcome && 'bg-white/10 text-white/70'
|
||||
)}
|
||||
>
|
||||
{formatOutcomeLabel(session.outcome)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Tree Name */}
|
||||
|
||||
Reference in New Issue
Block a user