Add retainSearchParams middleware to the _chat.$threadId route so that diff-related search params (?diff=1, diffTurnId, diffFilePath) are preserved when navigating between threads via the sidebar. Without this, TanStack Router clears search params on navigation since the sidebar's navigate calls don't explicitly pass search.