Fix/hardware card layout#20
Merged
Merged
Conversation
Charts pinned to the top of each hardware card with items-start, leaving empty space below. Switching to items-center centers the gauge+chart row within the card's available height.
The Memory card used a fixed py-1 wrapper, so the gauge sat near the top while neighboring cards centered their content. Use the same flex-1 + items-center pattern as the other hardware cards so the gauge aligns visually across the row.
…d RX/TX series Disk I/O previously showed only the read throughput line; Network showed only RX. Render each as a 3-line chart: Total (sum of the two component series, aligned by timestamp) plus the two components, with a small legend so each line is identifiable in the cramped hardware tile.
`/proc/meminfo` MemTotal under-reports the marketed capacity on unified-
memory NVIDIA platforms because firmware/GPU carve-outs are subtracted
before Linux sees the pool (~6 GiB on a 128 GB GB10 box, ~8 GiB on a
64 GB Jetson Orin). NVML's `memory_info()` exposes the full hardware
total on some platforms but returns NotSupported on GB10, so neither
source alone covers the lineup.
Add a derived `MemoryMetrics.display_total_bytes` chosen by:
1. NVML total when it reports >= MemTotal (full hardware pool);
2. otherwise, when the GPU is on a known unified-memory family, round
MemTotal up to the next power-of-two GiB (every shipping Spark/
Grace/Jetson/DRIVE SKU is power-of-two, so 122 GiB -> 128 GiB);
3. otherwise, the kernel-visible total.
`detect_unified_memory` now also matches GPU names against a curated
list of unified families (GB10/GB200/GB300/GH200/Grace/Spark/Jetson/
Tegra/Orin/Xavier/Thor/TX1/TX2/Nano/AGX/DRIVE), needed for GB10 where
the size-comparison heuristic can't fire without `memory_info()`.
`used`/`available` continue to come from the kernel so utilisation
percentages remain honest against what's actually addressable.
Emits kernel_total_bytes, nvml_total_bytes, display_total_bytes, and is_unified at info level on the first metrics tick, so unified-memory detection can be verified on a target host without parsing the WebSocket stream. Diagnostic — safe to remove once we trust the heuristic on Spark, Jetson, and discrete deployments.
…abels formatBytes now divides by 1024 (KiB/MiB/GiB) under the conventional "KB"/"MB"/"GB" labels — what every OS-level memory tool (free -h, htop, macOS, Windows) shows. Previously it divided by 1000 under the same label, so a 122 GiB system displayed "131 GB". Adds formatGiB(bytes, decimals?) for the headline memory total, which needs integer GiB rather than the auto-scaling formatBytes path.
Backend now ships a derived headline total that reflects the marketed unified-memory pool on Spark/Grace/Jetson (kernel MemTotal under- reports it by the firmware carve-out). Make the field optional on the type so older snapshots and existing tests still typecheck.
MemoryCard subtitle and the Dashboard hardware-grid Memory tile now render formatGiB(display_total_bytes ?? total_bytes) so a 128 GB DGX Spark shows "128 GB Unified" instead of "131 GB" or "122 GB". The gauge segments still divide against total_bytes (kernel-visible) so utilisation percentages remain honest against what's addressable. The discrete-GPU VRAM section also moves to formatGiB for consistency. Test fixtures in MemoryCard.test.tsx switched from decimal-shaped byte counts (multiples of 10^9) to true binary GiB so the displayed "64 GB" / "24 GB" assertions match the new binary scaling.
Fixes CI 'cargo fmt --all -- --check' failure on fix/hardware-card-layout. Pure whitespace: comment-column alignment in UNIFIED_FAMILIES and a single-line form for select_display_total.
Codifies the pre-commit checklist (cargo fmt/clippy/test, frontend build/test) and the metrics cross-stack contract so feature changes don't ship without matching test updates on the other side.
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.
No description provided.