Widget rows fit the sidebar instead of wrapping - #54
Draft
jimutt wants to merge 1 commit into
Draft
Conversation
The label column was a fixed 28 characters, so every row came to at least 39 with the indent and status. The sidebar is narrower than that, so rows wrapped and the status appeared on a line of its own — looking like the status had been misplaced rather than overflowed. The column is now sized to the longest label in the visible window and capped so the status still fits, and over-long decision lists are truncated rather than wrapped. With short IDs a row is ~22 characters instead of 39. The header is bounded the same way, shedding the elapsed label's bound suffix first and truncating the slug only if that is not enough — the slug identifies the run and is the last thing worth losing. 5 new tests; the pre-existing 'narrow terminal' bound of 60 was stale and now asserts the real sidebar width. Co-Authored-By: Kimi K3 <noreply@pi.dev> Generated-By: pi 0.84.2
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.
What
Widget rows were laid out with a fixed 28-character label column, so with the indent and status every row was at least 39 characters. The sidebar is narrower, so rows wrapped and the status landed on its own line — reading as a misplaced status rather than an overflow.
The label column is now sized to the longest label in the visible window and capped so the status fits; long decision lists truncate instead of wrapping. Rows with short IDs go from 39 to ~22 characters.
The header gets the same treatment, shedding the elapsed bound suffix first and truncating the slug only if that isn't enough.
Tests
5 new; the stale
<= 60width assertion now checks the real sidebar width. 145 bun, tsc clean.