Conversation
openUpgradeAllConfirm joins every upgradable package name into one unbroken comma-separated line, and modalStyle has no width of its own -- without wrapping that line first, it ran straight past the box border and off the edge of the terminal instead of wrapping inside it (harmless for install/remove confirms, which are always one short package name, so this never showed up there). Now wraps to min(76, terminal width - 8) columns, but only when the content actually needs it: the common single-package confirm stays at its natural compact size instead of every dialog getting padded out to the wrap width regardless of how short it is. Added a regression test constructing a 60-package label directly (real apt state only had 2 upgradable packages in this environment, nowhere near enough to reproduce the overflow) and asserting no rendered line exceeds the terminal width, plus a check that a short confirm's box stays compact rather than also being stretched to the wrap cap.
- Badge text (active tab, header, key hints, warning banner, selected row) now uses explicit truecolor hex (#000000/#FFFFFF) instead of ANSI codes 0/15. Reported live: badge text rendering as a muddy gray on Windows Terminal/WSL2 -- that terminal's own color scheme had redefined what "black"/"white" (ANSI 0/15) mean, which a bare ANSI index can never protect against no matter which of the two is picked; a truecolor hex value bypasses that palette entirely and still degrades gracefully via termenv on a genuinely limited terminal. - apt's "upgrade all" now runs `apt-get dist-upgrade` instead of plain `apt-get upgrade`. Reported live: upgrading needed two separate runs to finish -- plain upgrade silently leaves behind any package whose new version needs a dependency installed or removed, rather than erroring, so the first run's upgrades were freeing up whatever had been blocking the rest, which only went through on an identical second run. dist-upgrade resolves those dependency changes in the same transaction. - Mouse clicks now check the click landed inside the list's actual rendered height, not just below the header: previously, a click anywhere on screen (including the footer key-hints bar) still mapped to *some* row index arithmetically, and on a long enough list that index was a genuinely valid item -- so clicking the footer looked like it randomly jumped the selection to an unrelated row, reported live as mouse clicks "changing pages" with no apparent logic. - ctrl+l now forces a full screen redraw (tea.ClearScreen), the same convention vim/bash/htop/tmux use. Mitigates -- doesn't fix, since e2e/settings_test.go already proved pkgtui's own byte output is correct -- reports of a stale settings-screen value that a specific terminal's own repaint logic apparently left behind. Deliberately did *not* add this to the in-app help screen: that screen isn't height-aware, and e2e/navigation_test.go caught the extra row pushing its title off the top of a 100x34 terminal -- documented in code as a real, separate, pre-existing issue instead of band-aiding it in. All four reported live, on the same WSL2 + Windows Terminal setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apt-get dist-upgradeinstead of plainapt-get upgrade, which silently leaves behind any package needing a new/removed dependency instead of upgrading it — previously needed two runs to fully finish.ctrl+lforces a full screen redraw (same convention as vim/bash/htop/tmux) — a manual recovery option for any terminal-side rendering glitch.Test plan
gofmt -l .cleango vet ./...cleango test ./...passinggo test -tags e2e ./e2e/...passinggo build ./...clean