You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
abctl: CONTEXT(1M) heading is clipped at 14 terminal widths (45-58); abbreviate to CTX(1M) #1094
The sessions table's CONTEXT(1M) heading is clipped by the column fitter at 14 terminal widths, 45 through 58. The column renders CONTE… or shorter there, so the denominator the title exists to state — the (1M) — is the first thing lost.
Why a declared width does not prevent it.contextColumnTitle is declared at exactly its own eleven columns ({Title: contextColumnTitle, Width: len(contextColumnTitle)}), which reads as "cannot be clipped". But a declared width is not a fitted one: fitTableColumns shrinks the widest column against one global floor of four, and CONTEXT(1M) is often the widest.
Measured on main at 59ae2d9, sweeping every width from 45 to 200, under three data conditions (no rows, rows without titles, rows with titles — identical results):
clipped at 14 widths: 45-58
The set is a property of the whole column set, not of this column: before #1056 added TITLE it was 24 widths — 45-58 and 73-82, which included 78 and 80 — and adding TITLE moved it. Any column added anywhere will move it again.
The fix is a title that fits a fitted column.CTX(1M) is seven columns and clears every width the table claims to work at — measured the same way, 0 clipped widths at every width from 45 to 200 under all three conditions.
Not just a rename: eight comments across app.go, styles.go, detail_fetch.go, sessions_money_test.go, event_retention_test.go and sessions_title_test.go refer to the column by its literal heading, and cmd/abctl/README.md names it in prose and in a rendered screen sample. All of those move with it, which is why this is its own change rather than a line in an unrelated PR.
Until then, table_ansi_test.go's heading sweep — which asserts no column heading is wider than its fitted column, at every width from 45 up — exempts this one column, with the measurement recorded beside the exemption. Delete the exemption with the fix.
Found by that sweep in #1073. The column is #1078's; #1082 touched its data source and highlight and left the title at eleven columns.
Activity
fix(abctl): align the drawer's left column, share one cadence clamp, …
fix: Shorten the sessions table's context heading to CTX(1M)