feat(ui): make every pod column sortable - #26
Merged
Conversation
Sorting was limited to Namespace/Name/Status/Age. Now `s` steps left-to-right through every column of the current view, and `:sort` accepts them all: - Pods: + Restarts, CPU, %CPU/R, %CPU/L, MEM, %MEM/R, %MEM/L, IP, Node - Other kinds: the four universal columns (a pod-only sort is normalized away on kind switch) The active sort column shows the direction arrow in its header (numeric headers included now), and the [SORT] indicator uses each column's short label. Entity-derived columns (Restarts/IP/Node) sort in the projector. Metric columns (CPU/MEM and the request/limit %s) re-sort in the App layer from the live usage map — recomputed when metrics refresh (a new `metrics_gen` keys the view cache), so the order is stable between the ~15s refreshes rather than churning. Tests: cycle order through all pod columns + non-pod normalization; metric sort orders pods by live usage; `:sort` parsing/labels. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Sorting was limited to Namespace/Name/Status/Age. Now
ssteps left-to-right through every column of the current view, and:sortaccepts them all:Restarts,CPU,%CPU/R,%CPU/L,MEM,%MEM/R,%MEM/L,IP,NodeThe active sort column shows its direction arrow in the header (numeric headers included now), and
[SORT]uses each column's short label.:sort <ns|name|status|age|restarts|cpu|cpu/r|cpu/l|mem|mem/r|mem/l|ip|node> [asc|desc]How it works
metrics_genkeys the view cache) — so the order is stable between the ~15s refreshes rather than churning each frame.Testing
make validategreen (109 tests + release build):sortparsing/labels🤖 Generated with Claude Code