The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the snapshot shortcut recorder compiles without manual memoization (#20682)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 21:50 UTC
2ff8e7413b75de485066c4754cf3cb85f950b12e
1 file changed
+3
-3
apps/web/src/components/settings/useSnapShotShortcutRecorder.tsx
+3
-3
@@ -4,7 +4,7 @@ import {
4
type SnapShotShortcut,
5
} from "@t3tools/contracts";
6
import { parseKeybindingShortcut } from "@t3tools/shared/keybindings";
7
-import { useCallback, useEffect, useRef, useState, type KeyboardEvent } from "react";
7
+import { useEffect, useRef, useState, type KeyboardEvent } from "react";
8
import { getDesktopSnapShotBridge } from "../../lib/desktopSnapShot";
9
import {
10
formatSnapShotShortcutLabel,
@@ -52,12 +52,12 @@ export function useSnapShotShortcutRecorder({
52
const [recording, setRecording] = useState(false);
53
const [requests] = useState(createRecordingRequestTracker);
54
const heldModifierCodes = useRef(new Set<string>());
55
- const stopRecording = useCallback(() => {
55
+ const stopRecording = () => {
56
requests.clear();
57
heldModifierCodes.current.clear();
58
setRecording(false);
59
void bridge?.setSnapShotShortcutSuppressed(false).catch(() => undefined);
60
- }, [bridge, requests]);
60
+ };
61
const startRecording = async () => {
62
if (!bridge || disabled) return;
63
const request = requests.tryBegin();