From 9a40eea7c1ad5418af8cf57ae795605485e6b379 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Sun, 23 Aug 2026 15:54:18 +0300 Subject: [PATCH] fix: include archived sessions in header lookup Header now finds the current session in archived sessions too. --- packages/ui/src/components/layout/Header.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/layout/Header.tsx b/packages/ui/src/components/layout/Header.tsx index cfc8f555..e6b4ddc0 100644 --- a/packages/ui/src/components/layout/Header.tsx +++ b/packages/ui/src/components/layout/Header.tsx @@ -511,7 +511,8 @@ export const Header: React.FC = ({ const currentGlobalSession = useGlobalSessionsStore(useShallow(React.useCallback( (state): HeaderSessionSnapshot | null => { if (!currentSessionId) return null; - const session = state.activeSessions.find((candidate) => candidate.id === currentSessionId); + const session = [...state.activeSessions, ...state.archivedSessions] + .find((candidate) => candidate.id === currentSessionId); if (!session) return null; const record = session as typeof session & { directory?: string | null; slug?: string | null }; return {