summaryrefslogtreecommitdiff
path: root/internal/display/display_test.go
AgeCommit message (Collapse)Author
2026-02-16Add global average CPU line toggled with hotkey gv0.10.0Paul Buetow
Draw a 1px red horizontal line spanning the full window width showing the mean CPU usage across all monitored hosts. Toggled with 'g' hotkey and persistable to ~/.loadbarsrc via 'w'. Bump version to 0.10.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16Fix multi-core display bug: distribute remainder pixels evenlyv0.9.1Paul Buetow
Fixes issue where integer division (winW / numBars) left unused pixels on the right side of the window. The more cores displayed, the more obvious the gap became. Changes: - Add barBounds() helper to calculate exact position and width for each bar - Distribute remainder pixels evenly using scaled division - Update drawing functions to use pre-calculated positions - Update test to verify bars now fill entire window width Increment version to 0.9.1 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14Aggregate all net interfaces, remove n hotkey, fix net bar decay bugv0.9.0Paul Buetow
Sum RX/TX across all non-lo interfaces instead of picking a single one. Remove the n hotkey (cycle interface), netint config field, and --netint flag since they are no longer needed. Fix pre-existing bug where net bars decayed to zero between collector updates (~19 of 20 frames had target=0, making bars invisible even during heavy downloads). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14Implement f/v hotkeys for link scale and add hotkey unit testsPaul Buetow
Add missing f/v hotkey handlers to cycle NetLink through mbit/10mbit/100mbit/gbit/10gbit, closing the gap between README documentation and actual implementation. Add 13 unit tests covering all hotkey behaviors including visual pixel assertions for toggles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14Fix stale pixels at right edge when toggling bar layoutv0.8.3Paul Buetow
drawFrame() only cleared the window on layout changes, leaving remainder pixels (from integer division winW/numBars) with stale content from the double-buffered back buffer. Now clears every frame per SDL2 best practice. Adds comprehensive SDL visual test harness using software renderer with pixel spot-checking for CPU, memory, network bars, and the remainder bug. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>