fix(zellij): pair the panel's resource rows so four GPUs fit - #39
Merged
Conversation
The monitor panel is five rows: the job strip, cpu, mem, and two left over. A four-GPU node therefore showed gpu0 and gpu1 and silently dropped the rest — the two GPUs most likely to be the ones idling. Growing the pane was the obvious fix and the wrong one: the panel is a fixed-height pane zellij will not resize, and every row it takes is a row off the shell for CPU-only jobs too. The width was going spare instead. In a pane 122 columns or wider the resources now go two to a row — cpu beside mem, then the GPUs in pairs — so all four fit with the trend row still spare. The threshold is where each half still gets a 12-cell bar; narrower panes keep the stacked layout, and its 24-cell bars, exactly as before, so nothing changes for anyone whose pane was already too narrow for a second column. Both halves share one grid — the right column's label, bar and slash land in the same place on every paired row — and the layout depends only on the pane's width, never on the selected host, so the bars stay put as the selection moves between a CPU job and a GPU job. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSoaHVi6BUcdLXySPQDn4G
The trend sparkline was as wide as the pane allowed, which in practice meant as wide as the sixty-sample history: it ran well past the cpu and mem rows above it and, with the rows now paired, out from under the left column towards the right one. A sparkline is one more row of the bar column, so it is now the bars' width and sits under them — the last 24 samples on a wide pane, fewer as the bar gives way — in both layouts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSoaHVi6BUcdLXySPQDn4G
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.
Why
The monitor panel is five rows — job strip, cpu, mem, and two left over — so a four-GPU node showed
gpu0andgpu1and silently droppedgpu2andgpu3.Growing the pane was the obvious fix and the wrong one: the panel is a fixed-height pane zellij will not resize, and every row it takes is a row off the shell for CPU-only jobs too. The width was going spare instead.
What
In a pane 122 columns or wider the resources go two to a row —
cpubesidemem, then the GPUs in pairs — so all four fit with the trend row still spare:The threshold is where each half still gets a 12-cell bar (
MIN_WIDE_BAR). Narrower panes keep the stacked layout, and its 24-cell bars, exactly as before. The layout depends only on the pane's width, never on the selected host, so the bars stay put as the selection moves between a CPU job and a GPU job; both halves share one grid, so the right column's label, bar and slash line up on every paired row.Second commit: the
trendsparkline is now the bars' width and sits under them (the last 24 samples on a wide pane, fewer as the bar gives way) instead of running out to wherever the 60-sample history ended — past the cpu/mem rows, and with pairing, out from under the left column.Test covers: stacked at 100 cols (gpu2 absent), paired at 160 (all four + trend, right-column grid, two full bars), an odd GPU count, and both sides of the threshold. Docs and changelog updated.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VSoaHVi6BUcdLXySPQDn4G