From af150f912d7a825389b0427a7358881f9e521626 Mon Sep 17 00:00:00 2001 From: shuki Date: Sat, 7 Mar 2026 01:11:13 +0200 Subject: [PATCH] Increase mobile web font size: target 50 cols instead of 80 At 320px viewport this gives 10px font instead of 6px, making the TUI readable on phones. Co-Authored-By: Claude Opus 4.6 --- tui/web_templates/app_index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tui/web_templates/app_index.html b/tui/web_templates/app_index.html index d370bab..cbaf7a5 100644 --- a/tui/web_templates/app_index.html +++ b/tui/web_templates/app_index.html @@ -153,12 +153,12 @@ window.location.href = getStartUrl(); } - // Auto-select font size for mobile to fit ~80 columns + // Auto-select font size for mobile to fit ~50 columns (function() { var url = new URL(window.location.href); if (!url.searchParams.has("fontsize") && window.innerWidth < 768) { - // xterm char width is ~0.6 * fontSize; target 80 cols - var fontSize = Math.max(6, Math.floor(window.innerWidth / (80 * 0.6))); + // xterm char width is ~0.6 * fontSize; target 50 cols for readability + var fontSize = Math.max(8, Math.floor(window.innerWidth / (50 * 0.6))); url.searchParams.set("fontsize", fontSize); window.location.replace(url.toString()); }