TABLE output only ever set a minimum width per column (format!("{value:<width$}")), so a user-supplied target label longer than 18 chars pushed every later column out of alignment.
Added table-only truncation scoped to Column::Target: labels within table_width() (18) render unchanged, longer labels keep a character-boundary-safe prefix and end with "..." so the cell is exactly 18 chars.
Regression
Previously: any target label over 18 characters misaligned every subsequent table column, with no bound on how far.
Now protected by table_row_with_long_target_keeps_next_column_aligned, which asserts the event column starts at the same offset for both a short and an overlong (40-char) target label. Additional coverage: unchanged-at-or-under-18, exact-18 unchanged, deterministic prefix+"..." truncation, UTF-8/multibyte safety (no panic, no split code point), and explicit custom TABLE columns containing target get the same truncation as the default table.
Scope
Deliberately NOT changed: Remote, Message, WarningKind, or any other variable-width column, even though they could theoretically have the same overflow issue — out of scope for this fix.
No numeric/measurement column is truncated; the fix is localized to the Column::Target case inside format_table_cell.
CSV, TSV, and JSONL are untouched — they continue to emit the full, untruncated target label (verified by new csv_preserves_full_long_target_label, tsv_preserves_full_long_target_label, jsonl_preserves_full_long_target_label tests).
COR-04 (panic=abort terminal restoration) is explicitly out of scope and not touched.
No dependency additions, no crate version bumps, no CHANGELOG updates.
## Summary
- TABLE output only ever set a *minimum* width per column (`format!("{value:<width$}")`), so a user-supplied target label longer than 18 chars pushed every later column out of alignment.
- Added table-only truncation scoped to `Column::Target`: labels within `table_width()` (18) render unchanged, longer labels keep a character-boundary-safe prefix and end with `"..."` so the cell is exactly 18 chars.
## Regression
Previously: any target label over 18 characters misaligned every subsequent table column, with no bound on how far.
Now protected by `table_row_with_long_target_keeps_next_column_aligned`, which asserts the `event` column starts at the same offset for both a short and an overlong (40-char) target label. Additional coverage: unchanged-at-or-under-18, exact-18 unchanged, deterministic prefix+`"..."` truncation, UTF-8/multibyte safety (no panic, no split code point), and explicit custom TABLE columns containing `target` get the same truncation as the default table.
## Scope
- Deliberately NOT changed: Remote, Message, WarningKind, or any other variable-width column, even though they could theoretically have the same overflow issue — out of scope for this fix.
- No numeric/measurement column is truncated; the fix is localized to the `Column::Target` case inside `format_table_cell`.
- CSV, TSV, and JSONL are untouched — they continue to emit the full, untruncated target label (verified by new `csv_preserves_full_long_target_label`, `tsv_preserves_full_long_target_label`, `jsonl_preserves_full_long_target_label` tests).
- COR-04 (panic=abort terminal restoration) is explicitly out of scope and not touched.
- No dependency additions, no crate version bumps, no CHANGELOG updates.
## Verification
```
cargo fmt --all -- --check
cargo check --workspace --all-targets --all-features --locked
cargo test --workspace --all-targets --all-features --locked
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --locked
cargo check -p irtt-cli --no-default-features --all-targets --locked
git diff --check
```
All passed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
format!("{value:<width$}")), so a user-supplied target label longer than 18 chars pushed every later column out of alignment.Column::Target: labels withintable_width()(18) render unchanged, longer labels keep a character-boundary-safe prefix and end with"..."so the cell is exactly 18 chars.Regression
Previously: any target label over 18 characters misaligned every subsequent table column, with no bound on how far.
Now protected by
table_row_with_long_target_keeps_next_column_aligned, which asserts theeventcolumn starts at the same offset for both a short and an overlong (40-char) target label. Additional coverage: unchanged-at-or-under-18, exact-18 unchanged, deterministic prefix+"..."truncation, UTF-8/multibyte safety (no panic, no split code point), and explicit custom TABLE columns containingtargetget the same truncation as the default table.Scope
Column::Targetcase insideformat_table_cell.csv_preserves_full_long_target_label,tsv_preserves_full_long_target_label,jsonl_preserves_full_long_target_labeltests).Verification
All passed.