a view_right_panel_phase is dispatched by RoomHeaderButtons on view_room, which was triggering this to show the panel again. Check the fromHeader flag just like when hiding the panel so only room header buttons can hide or show the right panel