Skip to content

fix(zellij): pair the panel's resource rows so four GPUs fit - #39

Merged
jayhesselberth merged 2 commits into
mainfrom
worktree-panel-gpu-grid
Aug 30, 2026
Merged

fix(zellij): pair the panel's resource rows so four GPUs fit#39
jayhesselberth merged 2 commits into
mainfrom
worktree-panel-gpu-grid

Conversation

@jayhesselberth

@jayhesselberth jayhesselberth commented Aug 30, 2026

Copy link
Copy Markdown
Member

Why

The monitor panel is five rows — job strip, cpu, mem, and two left over — so a four-GPU node showed gpu0 and gpu1 and silently dropped gpu2 and gpu3.

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 — cpu beside mem, then the GPUs in pairs — so all four fit with the trend row still spare:

147845 mywork  1/1                                                                ^b m focus · ^b ,/. job
cpu   █████████░░░░░░░░░░░░░░░  34%  of 8 · load 3.2          mem   █████████░░░░░░░░░░░░░░░  37%   12G / 32G
gpu0  █████░░░░░░░░░░░░░░░░░░░  20%   31G / 40G   61°C 240W  ███████░   gpu1  ██████████░░░░░░░░░░░░░░  40%   31G / 40G   61°C 240W  ███████░
gpu2  ███████████████░░░░░░░░░  60%   31G / 40G   61°C 240W  ███████░   gpu3  ████████████████████░░░░  80%   31G / 40G   61°C 240W  ███████░
trend ▁▄▇▃

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 trend sparkline 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

jayhesselberth and others added 2 commits August 30, 2026 05:49
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
@jayhesselberth
jayhesselberth merged commit 192a688 into main Aug 30, 2026
3 checks passed
@jayhesselberth
jayhesselberth deleted the worktree-panel-gpu-grid branch August 30, 2026 19:23
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