From 20ad435f6231a0b63d384ae943f3ec50db73a3ca Mon Sep 17 00:00:00 2001 From: jelveh Date: Thu, 16 Jul 2026 19:43:53 -0700 Subject: [PATCH] fix: auto-fit column width in Dashboard Files no longer scales with row count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Double-clicking a column resize handle is meant to fit the column to its longest cell. The per-row loop did `maxWidth = Math.max(maxWidth + 10, textWidth)`, which forces `maxWidth` to grow by at least 10px on every row regardless of content — so a folder with N files produced a column ~10*N px wide and persisted that runaway width to KV storage. Compare against the running max only (`Math.max(maxWidth, textWidth)`); `textWidth` already includes cell padding. --- src/gui/src/UI/Dashboard/TabFiles.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/src/UI/Dashboard/TabFiles.js b/src/gui/src/UI/Dashboard/TabFiles.js index 7c0c7b741..291ce9e08 100644 --- a/src/gui/src/UI/Dashboard/TabFiles.js +++ b/src/gui/src/UI/Dashboard/TabFiles.js @@ -1456,7 +1456,7 @@ const TabFiles = { const fullName = $(this).attr('data-name'); if ( fullName ) { const textWidth = measureTextWidth(fullName) + padding; - maxWidth = Math.max(maxWidth + 10, textWidth); + maxWidth = Math.max(maxWidth, textWidth); } }); } else if ( column === 'size' ) { @@ -1464,7 +1464,7 @@ const TabFiles = { const text = $(this).text(); if ( text ) { const textWidth = measureTextWidth(text) + padding; - maxWidth = Math.max(maxWidth + 10, textWidth); + maxWidth = Math.max(maxWidth, textWidth); } }); } else if ( column === 'modified' ) { @@ -1472,7 +1472,7 @@ const TabFiles = { const text = $(this).text(); if ( text ) { const textWidth = measureTextWidth(text) + padding; - maxWidth = Math.max(maxWidth + 10, textWidth); + maxWidth = Math.max(maxWidth, textWidth); } }); }