Skip to content

Keep a gap after a long label in --status and align every value [patch] - #76

Merged
matt-edmondson merged 2 commits into
mainfrom
fix/75-status-label-gap
Nov 4, 2026
Merged

matt-edmondson merged 2 commits into
mainfrom
fix/75-status-label-gap

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

StatusReport.AppendRow padded every label to a fixed 15 columns. With a label of 14 or more characters, the value ended up right after the colon (Power assertion:held).

Build now gathers the rows first and sets the value column to max(15, longestLabel + 2). Every row keeps at least one space after its colon, and all values start in the same column. Reports whose labels are all short come out the same as before.

Tests

  • New: Build_WithALongDetailLabel_KeepsAGapAndAlignsEveryValue. It fails on main with Power assertion:held and passes with this change.
  • All 162 tests pass (161 succeeded, 1 skipped because it is platform-specific).

Note: open PR #64 also edits StatusReport.Build. Whichever of the two merges second will need a small rebase.

Fixes #75


Generated by Claude Code

StatusReport padded each label to a fixed 15 columns, so a label of 14 or
more characters had its value glued to the colon. The value column is now
sized from the longest label printed, with at least one space after it.

Fixes #75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW5JsJWSEGD7D4Jhs1d
Comment thread TrayApp.Test/StatusReportTests.cs Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017vfJW5jpiuVuBRXSgitSY1
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit d5d6faf into main Nov 4, 2026
14 checks passed
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.

--status glues a detail's value onto its label when the label is 14+ characters: "Power assertion:held", "Inhibitor path:/usr/bin/systemd-inhibit"

2 participants