MCPcopy
hub / github.com/stravu/crystal / handleSessionClick

Function handleSessionClick

frontend/src/components/ProjectDashboard.tsx:200–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198 const staleClass = session.isStale ? 'bg-status-warning/10' : '';
199
200 const handleSessionClick = async () => {
201 console.log('[ProjectDashboard] Session clicked:', session.sessionId, session.sessionName);
202 try {
203 await useSessionStore.getState().setActiveSession(session.sessionId);
204 console.log('[ProjectDashboard] Session set, now navigating to sessions view');
205 useNavigationStore.getState().navigateToSessions();
206 console.log('[ProjectDashboard] Navigation completed');
207 } catch (error) {
208 console.error('[ProjectDashboard] Error in handleSessionClick:', error);
209 }
210 };
211
212 return (
213 <tr key={session.sessionId} className={`hover:bg-surface-hover ${staleClass} cursor-pointer`} onClick={handleSessionClick}>

Callers

nothing calls this directly

Calls 3

setActiveSessionMethod · 0.80
errorMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected