The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 08:45 UTC
fix: diff panel unclosable after retainSearchParams middleware (#937)
eggfriedrice committed
Mar 12, 2026 at 17:44 UTC
a33cc8c75874bf89050ae90c58c5b6227debd4e2
3 files changed
+5
-7
apps/web/src/components/ChatView.tsx
+1
-1
@@ -1003,7 +1003,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
1003
replace: true,
1004
search: (previous) => {
1005
const rest = stripDiffSearchParams(previous);
1006
- return diffOpen ? rest : { ...rest, diff: "1" };
1006
+ return diffOpen ? { ...rest, diff: undefined } : { ...rest, diff: "1" };
1007
},
1008
});
1009
}, [diffOpen, navigate, threadId]);
apps/web/src/diffRouteSearch.ts
+3
-3
@@ -1,9 +1,9 @@
1
import { TurnId } from "@t3tools/contracts";
2
3
export interface DiffRouteSearch {
4
- diff?: "1";
5
- diffTurnId?: TurnId;
6
- diffFilePath?: string;
4
+ diff?: "1" | undefined;
5
+ diffTurnId?: TurnId | undefined;
6
+ diffFilePath?: string | undefined;
7
}
8
9
function isDiffOpenValue(value: unknown): boolean {
apps/web/src/routes/_chat.$threadId.tsx
+1
-3
@@ -170,9 +170,7 @@ function ChatThreadRouteView() {
170
void navigate({
171
to: "/$threadId",
172
params: { threadId },
173
- search: (previous) => {
174
- return stripDiffSearchParams(previous);
175
- },
173
+ search: { diff: undefined },
174
});
175
}, [navigate, threadId]);
176
const openDiff = useCallback(() => {