@devries-cameron20 / t3code Mirror · read-only / commits / f0e060a386
Fork 0

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 23, 06:45 UTC

perf(web): the CLI command settings row compiles without manual memoization (#20583)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 16, 2026 at 22:04 UTC f0e060a3865d7d77300a920cef4c4405658d5579
1 file changed +17 -20
apps/web/src/components/settings/CliCommandSettingsRow.tsx
+17 -20
@@ -1,5 +1,5 @@
1 import type { DesktopCliCommandState } from "@t3tools/contracts";
2 -import { useCallback, useEffect, useState } from "react";
2 +import { useEffect, useState } from "react";
3
4 import { Button } from "../ui/button";
5 import { stackedThreadToast, toastManager } from "../ui/toast";
@@ -25,25 +25,22 @@ export function CliCommandSettingsRow() {
25 };
26 }, [bridge]);
27
28 - const change = useCallback(
29 - (action: "install" | "uninstall") => {
30 - if (!bridge || pending) return;
31 - setPending(true);
32 - void bridge[action]()
33 - .then(setState)
34 - .catch((error: unknown) => {
35 - toastManager.add(
36 - stackedThreadToast({
37 - type: "error",
38 - title: action === "install" ? "Could not install t3" : "Could not remove t3",
39 - description: error instanceof Error ? error.message : "Something went wrong.",
40 - }),
41 - );
42 - })
43 - .finally(() => setPending(false));
44 - },
45 - [bridge, pending],
46 - );
28 + const change = (action: "install" | "uninstall") => {
29 + if (!bridge || pending) return;
30 + setPending(true);
31 + void bridge[action]()
32 + .then(setState)
33 + .catch((error: unknown) => {
34 + toastManager.add(
35 + stackedThreadToast({
36 + type: "error",
37 + title: action === "install" ? "Could not install t3" : "Could not remove t3",
38 + description: error instanceof Error ? error.message : "Something went wrong.",
39 + }),
40 + );
41 + })
42 + .finally(() => setPending(false));
43 + };
44
45 if (!bridge || !state?.supported) return null;
46 const installed = state.installedPath !== null;