fix:diff panel doesnt collapse#992
Conversation
- Remove `retainSearchParams` middleware for `diff` on `/_chat/$threadId` - Let diff query state clear naturally so collapsed diff panel does not persist unexpectedly - Clean up now-unused router imports/types
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip Migrating from UI to YAML configuration.Use the |
|
should already be fixed on main and coming out in the next release. |
What Changed
This PR fixes the diff panel so it can be closed again while keeping normal diff search-param retention behavior.
Why
The chat route was re-retaining
diff=1during close navigations, which caused the diff panel to immediately reopen instead of collapsing.UI Changes
N/A The expected behaviour was already working before, but it was broken a few days ago, so this is the PR to fix it.
Checklist
Note
Fix collapsing diff panel by replacing diff param removal with a
clearDiffsignaldiffsearch param, butretainSearchParamswould immediately re-add it on the next navigation, preventing the panel from actually closing.clearDiff=1in the URL instead of unsettingdiff. A newretainDiffUnlessClearedmiddleware in _chat.$threadId.tsx carries thediffparam forward across navigations unlessclearDiffis present.stripSearchParams(["clearDiff"])removesclearDifffrom the final URL so it doesn't persist.Macroscope summarized b71fc43.