fix(ui): remove margin from progress bar grids to use full terminal width#6
Merged
Conversation
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix widths of progress bar grids for better display
fix(ui): remove margin from progress bar grids to use full terminal width
Feb 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a visual inconsistency where progress bar grids (CPU/Memory stats and CPU cores) had a 2-character right margin while the process list used the full terminal width. The fix removes this margin to make all UI elements consistent.
Changes:
- Remove 2-character margin from main stats grid and CPU cores grid width calculations
- Add tests validating width calculations across different terminal sizes
- Add
sysmon-*pattern to .gitignore to exclude versioned binaries
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| main.go | Remove 2-character margin from availableWidth calculations for both main stats and CPU cores grids (lines 160, 199) |
| main_test.go | Add TestProgressBarWidths to validate width math and TestViewRendersCorrectly to verify basic view rendering |
| .gitignore | Add pattern to ignore versioned binaries like sysmon-v1.0.0 |
Contributor
|
@copilot apply changes based on the comments in this thread |
Replace duplicated width calculation logic with actual View() rendering. This eliminates test maintenance burden and validates the real implementation instead of duplicating the math. Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
- Rename "narrow terminal" to "medium terminal" to match width of 100 - Clarify error message to explicitly state acceptable range [width-1, width] Co-authored-by: narthur <4655422+narthur@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix progress bar widths to use full terminal width
Summary
Problem: Progress bars for CPU/Memory and GPU stats weren't using the full terminal width, leaving empty space on the right side of both grids, while the process list was using full width.
Root Cause: The width calculation used
m.width - 2(leaving a 2-character margin) instead ofm.width.Solution: Changed two lines in
main.go:availableWidth := m.width - 2→availableWidth := m.widthavailableWidth = m.width - 2→availableWidth = m.widthImpact:
Testing:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.