fix: reduce terminal font size minimum and defaults

- Reduce MIN_FONT_SIZE from 12 to 8 for smaller text option
- Reduce default font size from 14/12 to 10/10 for mobile/desktop
- Allows users to make terminal text significantly smaller

Quality gates: TypeScript check passed, production build successful
This commit is contained in:
Alex Blank
2026-05-26 21:05:04 +02:00
parent 76fbf0a755
commit 6a0c9bd669
+3 -3
View File
@@ -21,7 +21,7 @@ interface TerminalProps {
}
const FONT_SIZE_KEY = "terminal-font-size";
const MIN_FONT_SIZE = 12;
const MIN_FONT_SIZE = 8;
const MAX_FONT_SIZE = 24;
const RECONNECT_ATTEMPTS = 3;
const RECONNECT_DELAY_BASE = 1000;
@@ -51,13 +51,13 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
const activeModifierRef = useRef(activeModifier);
activeModifierRef.current = activeModifier;
const [fontSize, setFontSize] = useState(() => {
if (typeof window === "undefined") return isMobile ? 14 : 12;
if (typeof window === "undefined") return isMobile ? 10 : 10;
const stored = localStorage.getItem(FONT_SIZE_KEY);
if (stored) {
const parsed = parseInt(stored, 10);
return Math.max(MIN_FONT_SIZE, Math.min(MAX_FONT_SIZE, parsed));
}
return isMobile ? 14 : 12;
return isMobile ? 10 : 10;
});
const lastPingRef = useRef<number>(0);
const heartbeatCheckRef = useRef<number | null>(null);