File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -390,8 +390,8 @@ export default function HomePage() {
390390 await ensureConnected ( ) ;
391391 acp . selectSession ( sessionId ) ;
392392 setActiveSessionId ( sessionId ) ;
393- // Clear tasks when switching sessions
394- setRoutaTasks ( [ ] ) ;
393+ // Don't clear tasks here - let onTasksDetected update them when history loads
394+ // This prevents the right sidebar from disappearing during session switch
395395 bumpRefresh ( ) ;
396396 } ,
397397 [ acp , ensureConnected , bumpRefresh ]
Original file line number Diff line number Diff line change @@ -257,6 +257,12 @@ export function useNotes(workspaceId: string = "default"): UseNotesReturn {
257257 } ;
258258 } , [ workspaceId ] ) ;
259259
260+ // Clear notes when workspaceId changes to avoid showing stale data
261+ useEffect ( ( ) => {
262+ setNotes ( [ ] ) ;
263+ setConnected ( false ) ;
264+ } , [ workspaceId ] ) ;
265+
260266 // Connect SSE and fetch initial notes
261267 useEffect ( ( ) => {
262268 fetchNotes ( ) ;
You can’t perform that action at this time.
0 commit comments