Kaynağa Gözat

feat(skills/fleet-ops): wire commit-graph rails per lane

cmd_fleet now computes commits-ahead-of-base per lane via
git rev-list --count, and passes that to term_rail to render the
commit-graph leaf glyph (●─●─●─◉ for in-flight, ●─●─⊗ for conflict).

Before:
  +-- oauth-pkce      ─                  2m

After:
  +-- oauth-pkce      *-*-*-@            2m   (●─●─●─◉ in TTY)

Tests still 21/21.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0xDarkMatter 1 ay önce
ebeveyn
işleme
3b48d1195e
1 değiştirilmiş dosya ile 10 ekleme ve 1 silme
  1. 10 1
      skills/fleet-ops/scripts/fleet.sh

+ 10 - 1
skills/fleet-ops/scripts/fleet.sh

@@ -224,7 +224,16 @@ cmd_fleet() {
       [[ -z "$branch" ]] && continue
       local c_conn
       if [[ $c_idx -eq $c_last ]]; then c_conn="$TERM_TREE_LAST"; else c_conn="$TERM_TREE_BRANCH"; fi
-      term_leaf_line "$c_conn" "$branch" "─" "${meta:-}" "$age"
+
+      # Build the rail glyph from this lane's commits-ahead and state.
+      local ahead head_kind rail
+      ahead=$(git rev-list --count "${BASE_BRANCH}..${branch}" 2>/dev/null || echo 0)
+      head_kind="HEAD"
+      [[ "$state" == "CONFLICT" ]] && head_kind="CONFLICT"
+      [[ "$state" == "FAILED" ]] && head_kind="CONFLICT"
+      rail=$(term_rail "$ahead" "$head_kind")
+
+      term_leaf_line "$c_conn" "$branch" "$rail" "${meta:-}" "$age"
       c_idx=$((c_idx+1))
     done <<< "$lines"
     term_panel_vert