The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the new-thread link route compiles without manual memoization (#20597)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 21:52 UTC
dc060b113288753c0900911a97c0911899d265d1
1 file changed
+1
-3
apps/web/src/routes/_chat.new.tsx
+1
-3
@@ -1,7 +1,5 @@
1
import { parseNewThreadLink } from "@t3tools/shared/promptLinks";
2
import { createFileRoute, useLocation } from "@tanstack/react-router";
3
-import { useMemo } from "react";
4
-
3
import { NewThreadLinkView } from "../components/promptLinks/NewThreadLinkView";
4
import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "../components/ui/empty";
5
import { SidebarInset } from "../components/ui/sidebar";
@@ -9,7 +7,7 @@ import { SidebarInset } from "../components/ui/sidebar";
7
// The query is read raw: the router's own search parsing turns `prompt=123` into a number.
8
function NewThreadLinkRoute() {
9
const search = useLocation({ select: (location) => location.searchStr });
12
- const parsed = useMemo(() => parseNewThreadLink(search), [search]);
10
+ const parsed = parseNewThreadLink(search);
11
if (!parsed.ok) {
12
return (
13
<SidebarInset className="h-dvh min-h-0 overflow-hidden overscroll-y-none">