Skip to content

fix: proportional column scaling across all tabs when the detail pane opens#37

Merged
crazyguitar merged 5 commits into
mainfrom
fix/scale
Jul 12, 2026
Merged

fix: proportional column scaling across all tabs when the detail pane opens#37
crazyguitar merged 5 commits into
mainfrom
fix/scale

Conversation

@crazyguitar

Copy link
Copy Markdown
Member

Purpose

Columns shrink by a common fraction of their natural width

Checklist

  • cargo fmt --check passes
  • cargo clippy -- -D warnings passes
  • cargo test passes
  • Tested on RDMA-capable hardware (or explained why not in the Test Plan)
  • Docs/README updated if behavior or flags changed

Signed-off-by: chang-ning <spiderpower02@gmail.com>
Signed-off-by: chang-ning <spiderpower02@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make table columns shrink proportionally (by a common fraction of their “natural” widths) when the detail pane reduces available width, keeping the UI consistent across tabs and avoiding abrupt per-column clipping.

Changes:

  • Parameterized throughput/gauge bar rendering so bar widths can follow column widths.
  • Introduced shared proportional width-scaling helpers and applied them to GPU and RDMA tables.
  • Added/updated unit tests for gauge text formatting and column-width scaling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tui/ui.rs
Comment thread src/tui/ui.rs
Signed-off-by: chang-ning <spiderpower02@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread src/tui/ui.rs Outdated
Comment thread src/tui/ui.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread src/tui/ui.rs
Comment thread src/tui/ui.rs Outdated
Comment thread src/tui/ui.rs
Signed-off-by: chang-ning <spiderpower02@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread src/tui/ui.rs
Comment on lines +558 to +561
// Block borders (2) and the "▶ " highlight column (2) shrink what the
// Table layout actually distributes among columns; scale to fit that.
let avail = area.width.saturating_sub(2 + 2);
let widths = gpu_col_widths(avail);
Comment thread src/tui/ui.rs
Comment on lines +2512 to +2518
#[test]
fn gpu_col_widths_wide_returns_natural() {
assert_eq!(
gpu_col_widths(200),
[9, 16, 16, 16, 5, 6, 12, 7, 12, 7, 6, 5]
);
}
Signed-off-by: chang-ning <spiderpower02@gmail.com>
@crazyguitar
crazyguitar merged commit eba27b2 into main Jul 12, 2026
4 checks passed
@crazyguitar
crazyguitar deleted the fix/scale branch July 12, 2026 03:40
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