fix(@scripts/session-tools): 🐛 fix triage sorting for global priority display
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
13ff01a997
commit
7086061c83
1 changed files with 7 additions and 1 deletions
|
|
@ -421,7 +421,13 @@ cmd_resume() {
|
|||
# picker even when triage produces > (35 - tmux_count) rows on a single
|
||||
# host that would otherwise crowd them out.
|
||||
_tmux=$(scan_hosts | while IFS= read -r h; do list_tmux_on "$h"; done)
|
||||
_triage=$(scan_hosts | while IFS= read -r h; do list_triage_on "$h"; done)
|
||||
# Triage rows: col 4 = priority, col 9 = mtime. Each host's rows come
|
||||
# pre-sorted by priority desc, but the per-host blocks are concatenated
|
||||
# so a P5 on apricot would sit after all local rows and get truncated.
|
||||
# Re-sort globally by (priority desc, mtime desc) so the top of the
|
||||
# picker is the actual highest priority across the fleet.
|
||||
_triage=$(scan_hosts | while IFS= read -r h; do list_triage_on "$h"; done \
|
||||
| sort -t"$(printf '\t')" -k4,4nr -k9,9nr)
|
||||
_t_count=0
|
||||
[ -n "$_tmux" ] && _t_count=$(printf '%s\n' "$_tmux" | wc -l | tr -d ' ')
|
||||
[ -n "$_triage" ] && _d_total=$(printf '%s\n' "$_triage" | wc -l | tr -d ' ')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue