[bug] I can't close the View diff sidepanel?
The agent returns a block of changed files and I click the View diff button
Then I can't close the diff sidepanel again? Not even when clicking the top panel diff button:
you got latest version?
okay, I see it, will push PR soon. cc @juliusmarminge
Opened #937 to fix this.
Root cause: retainSearchParams(["diff"]) checks !(key in result) to decide whether to re-inject from the current URL. Both closeDiff and onToggleDiff used stripDiffSearchParams which removes the diff key entirely via destructuring, so the middleware always re-added it.
Fix: set diff: undefined explicitly when closing so the key is present in the result object and the middleware skips it.
The core fix is the same as #930 by @atharvadeosthale. The difference is that #930 introduces a new clearDiffSearchParams helper to set all three keys to undefined, while this PR just inlines { diff: undefined } at the two call sites since that is the only key that matters for the middleware. Fewer files changed, no new abstraction. #930 also bundles an unrelated UX addition (click outside overlay + z-index bump to close the inline diff sidebar) which might be worth a separate PR. cc @juliusmarminge