Fix bd gate list: Separate closed gates into own section

Previously, displayGates() always showed 'Open Gates' header even when
closed gates were included via --all flag. Also, closed gates would
appear mixed with open gates under the misleading 'Open Gates' header.

Changes:
- Modified displayGates() to accept showAll parameter
- Separates gates into 'Open Gates' and 'Closed Gates' sections
- Closed gates only shown when --all flag is used
- Fixed handleGateList RPC handler to use ExcludeStatus instead of
  Status filter for consistency with CLI behavior

Fixes gas-town issue go-47m
This commit is contained in:
nux
2026-01-13 00:46:50 -08:00
committed by Spencer Tobin
parent a55b9c3064
commit d69bf4faa8
2 changed files with 62 additions and 32 deletions

View File

@@ -2108,9 +2108,9 @@ func (s *Server) handleGateList(req *Request) Response {
filter := types.IssueFilter{
IssueType: &gateType,
}
// By default, exclude closed gates (consistent with CLI behavior)
if !args.All {
openStatus := types.StatusOpen
filter.Status = &openStatus
filter.ExcludeStatus = []types.Status{types.StatusClosed}
}
gates, err := store.SearchIssues(ctx, "", filter)