The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the hosted prompt link landing compiles without manual memoization (#20712)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 21:47 UTC
b84a591f706784ee70ef4c78670ed31a88c3c559
1 file changed
+6
-9
apps/web/src/components/promptLinks/HostedPromptLinkLanding.tsx
+6
-9
@@ -7,7 +7,7 @@ import {
7
} from "@t3tools/shared/promptLinks";
8
import { useLocation } from "@tanstack/react-router";
9
import * as Schema from "effect/Schema";
10
-import { type ReactNode, useEffect, useMemo, useRef, useState } from "react";
10
+import { type ReactNode, useEffect, useRef, useState } from "react";
11
12
import { APP_DISPLAY_NAME } from "~/branding";
13
import { useLocalStorage } from "~/hooks/useLocalStorage";
@@ -65,13 +65,10 @@ export function useHostedPromptLinkLanding(enabled: boolean): ReactNode | null {
65
const { environments, isReady } = useEnvironments();
66
const [opener, setOpener] = useLocalStorage(OPENER_STORAGE_KEY, null, Opener);
67
const [continuedHref, setContinuedHref] = useState<string | null>(null);
68
- const appPath = useMemo(
69
- () =>
70
- enabled && isHostedStaticApp()
71
- ? promptLinkAppPath(new URL(href, window.location.origin).href, window.location.origin)
72
- : null,
73
- [enabled, href],
74
- );
68
+ const appPath =
69
+ enabled && isHostedStaticApp()
70
+ ? promptLinkAppPath(new URL(href, window.location.origin).href, window.location.origin)
71
+ : null;
72
if (appPath === null || continuedHref === href) return null;
73
const canContinue = isReady && environments.length > 0;
74
if (opener === "browser") {
@@ -102,7 +99,7 @@ function HostedPromptLinkLanding({
99
readonly openInAppRemembered: boolean;
100
readonly onChoose: (choice: "app" | "browser", remember: boolean) => void;
101
}) {
105
- const summary = useMemo(() => summarize(appPath), [appPath]);
102
+ const summary = summarize(appPath);
103
const [remember, setRemember] = useState(false);
104
const deepLink = promptLinkDeepLink(appPath);
105
const onPhone = /android|iphone|ipad/i.test(navigator.userAgent);