Skip to content

fix(formatters): expand streaming table to fill terminal width#314

Merged
BYK merged 3 commits intomainfrom
fix/streaming-table-width
Mar 2, 2026
Merged

fix(formatters): expand streaming table to fill terminal width#314
BYK merged 3 commits intomainfrom
fix/streaming-table-width

Conversation

@betegon
Copy link
Member

@betegon betegon commented Mar 2, 2026

PRE:
Screenshot 2026-03-02 at 13 34 16

POST:
Screenshot 2026-03-02 at 13 34 35

Summary

The sentry logs --follow streaming table rendered ~72 columns wide even on wide terminals. The Message column wrapped unnecessarily despite ample space.

fitColumns only shrinks columns — when hint rows (short placeholder data) produce intrinsic widths below the terminal width, it returns them as-is with no expansion. After fitColumns, the StreamingTable constructor now expands the last column to absorb remaining space. renderTextTable is unaffected since it uses real data.

Test plan

  • bun test test/lib/formatters/text-table.test.ts — 32 tests pass
  • bun test test/lib/formatters/log.test.ts — 34 tests pass
  • Manual: sentry logs --follow fills terminal width
  • Manual: sentry issue list table unaffected

StreamingTable computed column widths from hint rows, which are short
placeholder data. When the total intrinsic width was less than the
terminal width, fitColumns returned those narrow widths as-is — the
table rendered ~72 columns wide instead of filling the terminal.

After fitColumns, expand the last column to absorb remaining space.
This is scoped to StreamingTable only; renderTextTable uses real data
and doesn't need expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (formatters) Render all terminal output as markdown by BYK in #297
  • (issue-list) Global limit with fair distribution, compound cursor, and richer progress by BYK in #306

Bug Fixes 🐛

Api

  • Use limit param for issues endpoint page size by BYK in #309
  • Auto-correct ':' to '=' in --field values with a warning by BYK in #302

Other

  • (ci) Generate JUnit XML to silence codecov-action warnings by BYK in #300
  • (formatters) Expand streaming table to fill terminal width by betegon in #314
  • (nightly) Push to GHCR from artifacts dir so layer titles are bare filenames by BYK in #301
  • (test) Handle 0/-0 in getComparator anti-symmetry property test by BYK in #308

Internal Changes 🔧

  • (api) Wire listIssuesPaginated through @sentry/api SDK for type safety by BYK in #310

🤖 This preview updates automatically when you update the PR.

@betegon betegon marked this pull request as ready for review March 2, 2026 12:34
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Codecov Results 📊

2268 passed | Total: 2268 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 3235 uncovered lines.
✅ Project coverage is 80.06%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    80.05%    80.06%    +0.01%
==========================================
  Files          120       120         —
  Lines        16218     16224        +6
  Branches         0         0         —
==========================================
+ Hits         12983     12989        +6
- Misses        3235      3235         —
- Partials         0         0         —

Generated by Codecov Action

betegon and others added 2 commits March 2, 2026 13:35
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@BYK BYK merged commit bc81573 into main Mar 2, 2026
20 checks passed
@BYK BYK deleted the fix/streaming-table-width branch March 2, 2026 13:54
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.

2 participants