Update recent history sidebar correctly when switching projects