Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(cli): show real MEMBERS count in `multica squad list` (#3307)
Bohan Jiangdf02fcf175f8
diff --git a/server/cmd/multica/cmd_squad.go b/server/cmd/multica/cmd_squad.goindex 35261bbc0c..5e9617aaad 100644--- a/server/cmd/multica/cmd_squad.go+++ b/server/cmd/multica/cmd_squad.go@@ -4,6 +4,7 @@ import ("context""fmt""os"+ "strconv""text/tabwriter""time"@@ -52,12 +53,25 @@ func runSquadList(cmd *cobra.Command, _ []string) error {w := tabwriter.NewWriter(os.Stdout, 0, 4, 2, ' ', 0)fmt.Fprintln(w, "ID\tNAME\tLEADER ID\tMEMBERS")for _, s := range squads {- fmt.Fprintf(w, "%s\t%s\t%s\t-\n",- strVal(s, "id"), strVal(s, "name"), strVal(s, "leader_id"))+ fmt.Fprintf(w, "%s\t%s\t%s\t%s\n",+ strVal(s, "id"), strVal(s, "name"), strVal(s, "leader_id"),+ memberCountDisplay(s))}return w.Flush()}+func memberCountDisplay(m map[string]any) string {+ v, ok := m["member_count"]+ if !ok || v == nil {+ return "-"+ }+ n, ok := v.(float64)+ if !ok || n <= 0 {+ return "-"+ }+ return strconv.Itoa(int(n))+}+// ── Get ─────────────────────────────────────────────────────────────────────var squadGetCmd = &cobra.Command{