Skip to content

fix: clean up upgrade output and hide empty table headers#459

Merged
BYK merged 3 commits intomainfrom
byk/fix/upgrade-output
Mar 18, 2026
Merged

fix: clean up upgrade output and hide empty table headers#459
BYK merged 3 commits intomainfrom
byk/fix/upgrade-output

Conversation

@BYK
Copy link
Copy Markdown
Member

@BYK BYK commented Mar 18, 2026

Clean up the ugly cli upgrade output and fix a systemic issue with
empty header rows in box-drawing tables across the codebase.

Upgrade output

Before:

Binary: Installed to /home/byk/.local/bin/sentry
✓ Upgraded to  0.18.0-dev.1773836960
0.18.0-dev.1773794950 → 0.18.0-dev.1773836960

╭─────────┬─────────╮
│         │         │
├─────────┼─────────┤
│ Method  │ curl    │
│ Channel │ nightly │
╰─────────┴─────────╯

After:

✓ Upgraded to 0.18.0-dev.1773836960 (from 0.18.0-dev.1773794950)
  Method: curl · Channel: nightly

Changes:

  • Replace metadata table with a compact muted inline line
  • Remove redundant version arrow; fold "from" version into success line
  • Add --quiet to cli setup subprocess to suppress leaked stdout

Systemic table fix

mdKvTable() without a heading produces | | | empty header cells,
which rendered as an ugly empty bordered row in box-drawing tables.
This affected 12 call sites: auth status, issue/org/project details,
trace/span/log views, and more.

Fix: add hideHeaders option to renderTextTable and auto-detect
all-empty headers in renderTableToken to skip the header row while
still using it for column width measurement.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 18, 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 ✨

  • Refactor SKILL.md into modular reference files by BYK in #458

Bug Fixes 🐛

  • (test) Use os.tmpdir() for test temp directories by BYK in #457
  • Clean up upgrade output and hide empty table headers by BYK in #459
  • Improve error messages — fix ContextError/ResolutionError misuse by BYK in #456

Internal Changes 🔧

  • (list) Align all list commands to issue list standards by BYK in #453

🤖 This preview updates automatically when you update the PR.

Clean up the ugly `cli upgrade` output and fix a systemic issue with
empty header rows in box-drawing tables across the codebase.

## Upgrade output

Before:
```
Binary: Installed to /home/byk/.local/bin/sentry
✓ Upgraded to  0.18.0-dev.1773836960
0.18.0-dev.1773794950 → 0.18.0-dev.1773836960

╭─────────┬─────────╮
│         │         │
├─────────┼─────────┤
│ Method  │ curl    │
│ Channel │ nightly │
╰─────────┴─────────╯
```

After:
```
✓ Upgraded to 0.18.0-dev.1773836960 (from 0.18.0-dev.1773794950)
  Method: curl · Channel: nightly
```

Changes:
- Replace metadata table with a compact muted inline line
- Remove redundant version arrow; fold "from" version into success line
- Add `--quiet` to `cli setup` subprocess to suppress leaked stdout

## Systemic table fix

`mdKvTable()` without a heading produces `| | |` empty header cells,
which rendered as an ugly empty bordered row in box-drawing tables.
This affected 12 call sites: auth status, issue/org/project details,
trace/span/log views, and more.

Fix: add `hideHeaders` option to `renderTextTable` and auto-detect
all-empty headers in `renderTableToken` to skip the header row while
still using it for column width measurement.
@BYK BYK force-pushed the byk/fix/upgrade-output branch from 53be35d to d41b0bd Compare March 18, 2026 14:40
@BYK BYK marked this pull request as ready for review March 18, 2026 14:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 18, 2026

Codecov Results 📊

116 passed | Total: 116 | 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 1147 uncovered lines.
✅ Project coverage is 95.21%. Comparing base (base) to head (head).

Files with missing lines (2)
File Patch % Lines
human.ts 96.35% ⚠️ 46 Missing
markdown.ts 91.04% ⚠️ 30 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    95.21%    95.21%        —%
==========================================
  Files          176       176         —
  Lines        23930     23934        +4
  Branches         0         0         —
==========================================
+ Hits         22783     22787        +4
- Misses        1147      1147         —
- Partials         0         0         —

Generated by Codecov Action

Per review feedback, the empty-header detection logic now lives in
renderTextTable itself (auto-detects when all headers are empty/whitespace)
rather than requiring each caller to detect and pass hideHeaders.

renderTableToken in markdown.ts no longer needs special handling —
renderTextTable handles it transparently.
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

The destructuring default only fires when the property is undefined,
making the options.hideHeaders ?? fallback redundant inside it. Extract
to a separate const with ?? so explicit false from callers is preserved.
@BYK BYK merged commit 0cf6f36 into main Mar 18, 2026
22 checks passed
@BYK BYK deleted the byk/fix/upgrade-output branch March 18, 2026 15:32
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