Skip to content

Widget rows fit the sidebar instead of wrapping - #54

Draft
jimutt wants to merge 1 commit into
v1from
fix/widget-row-width
Draft

Widget rows fit the sidebar instead of wrapping#54
jimutt wants to merge 1 commit into
v1from
fix/widget-row-width

Conversation

@jimutt

@jimutt jimutt commented Aug 31, 2026

Copy link
Copy Markdown
Owner

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 <= 60 width assertion now checks the real sidebar width. 145 bun, tsc clean.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant