From 0cf859704f2af40d76a4ec87bc4ff56a89ffe89f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 10 Aug 2026 14:47:35 +0000 Subject: [PATCH] Fix whiptail checklist silently dropping [installed] on long descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause of the "installed services not shown as installed" report, confirmed from a screenshot: the [installed] marker was appended AFTER the service description, and whiptail hard-truncates each checklist row to the dialog's fixed width (78) with no ellipsis or other sign it happened. fmd's description alone is 68 characters — adding " [installed]" pushes it to 81, past the width, so the marker silently fell off the end. fmd was actually installed the whole time (confirmed via setup.sh's own pre-wizard summary and the new --status flag); the checklist just never showed it. Move the marker to the front of the tag instead, where a long description can still lose its own tail to truncation but the install status — the part that actually matters — always survives. Mirrored the same fix into the non-whiptail plain-text fallback path for consistency. Also size the checklist's listheight/height to the category instead of a flat 14 rows: utilities alone has 35+ services, so anything past row 14 was only reachable by scrolling with no on-screen hint more rows existed. Now scales with the category size, capped to what the actual terminal can show (tput lines) so it can't request a dialog taller than the screen. --- setup.sh | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index f162a1a..020616c 100755 --- a/setup.sh +++ b/setup.sh @@ -383,21 +383,48 @@ while true; do mapfile -t SVCS < <(services_in_group "$CHOSEN_CAT") SELECTED=() if [ "$have_whiptail" = true ]; then + # listheight was a flat 14 regardless of category size — utilities + # alone has 35+ services, so anything past row 14 only reachable by + # scrolling, with no on-screen hint that more rows exist below the + # fold. Size it to the category instead, capped to what the actual + # terminal can show (tput lines, falling back to a conservative 24 + # for a non-terminal/unknown size) so this can't request a dialog + # taller than the screen. + local _term_lines _list_h _box_h + _term_lines="$(tput lines 2>/dev/null &1 1>&2 2>&3