1.7 KiB
1.7 KiB
Session Status Indicators - Design
Date: 2026-05-30 Status: Approved (3-distinct-states)
Problem
Sidebar session indicator is an animated green dot driven purely by timestamp (isActive: diffInMinutes < 10 in sidebar/utils/utils.ts). It lights up for any session touched in the last 10 min regardless of whether an agent is running. The real processing state (processingSessions Set, event-driven) is only shown in the chat-area status bar, never in the sidebar.
Three States
- Processing: processingSessions.has(session.id) -> amber dot, animate-ping halo + solid core. Title "Agent running".
- Recently active: sessionView.isActive && !isProcessing -> static sky-blue dot. Title "Recently active".
- Idle: neither -> no indicator.
Data flow (new threading, parallel to currentTime)
AppContent -> useProjectsState({processingSessions}) -> sidebarSharedProps -> Sidebar (SidebarProps) -> projectListProps -> SidebarProjectList -> SidebarProjectItem -> SidebarProjectSessions -> SidebarSessionItem. processingSessions optional in leaf types -> graceful degrade.
Files
- app/AppContent.tsx - pass processingSessions into useProjectsState
- hooks/useProjectsState.ts - accept + sidebarSharedProps + deps
- sidebar/types/types.ts - SidebarProps gains processingSessions
- sidebar/view/Sidebar.tsx - destructure + projectListProps
- sidebar/view/subcomponents/SidebarProjectList.tsx - type + passthrough
- sidebar/view/subcomponents/SidebarProjectItem.tsx - type + passthrough
- sidebar/view/subcomponents/SidebarProjectSessions.tsx - type + passthrough
- sidebar/view/subcomponents/SidebarSessionItem.tsx - 3-state indicator