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 22, 07:00 UTC
fix(web): Diagnostics memory no longer reads "1024.0 MB" (#28300)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Victor Vogel committed
Nov 1, 2026 at 16:03 UTC
4c3808a1097c5b9f51621af158c6fe237f7b7db0
1 file changed
+1
-12
apps/web/src/components/settings/DiagnosticsSettings.tsx
+1
-12
@@ -20,6 +20,7 @@ import type {
20
import * as DateTime from "effect/DateTime";
21
import * as Option from "effect/Option";
22
23
+import { formatBytes } from "../../lib/formatBytes";
24
import { cn } from "../../lib/utils";
25
import { ensureLocalApi } from "../../localApi";
26
import { useOpenInPreferredEditor } from "../../editorPreferences";
@@ -51,18 +52,6 @@ function formatDuration(value: number): string {
52
return `${(value / 1_000).toFixed(value >= 10_000 ? 1 : 2).replace(/\.0+$/, "")} s`;
53
}
54
54
-function formatBytes(value: number): string {
55
- if (value < 1024) return `${value} B`;
56
- const units = ["KB", "MB", "GB"] as const;
57
- let unitIndex = -1;
58
- let next = value;
59
- do {
60
- next /= 1024;
61
- unitIndex += 1;
62
- } while (next >= 1024 && unitIndex < units.length - 1);
63
- return `${next.toFixed(next >= 10 ? 1 : 2)} ${units[unitIndex]}`;
64
-}
65
-
55
function RelativeTimeNoWrap(props: { value: DateTime.Utc }) {
56
const relative = useRelativeTimeState(DateTime.formatIso(props.value));
57
if (relative.status !== "relative") return null;