trail: align status values with the server's simplified set · Entire

trail: align status values with the server's simplified set

4767f3d→main·

matthiaswenz·1mo ago·6 files·+51 added/-49 removed

The server folded in_progress and in_review into open (migration 20260603120300_simplify_repo_trail_status); the API now accepts and emits exactly draft, open, merged, closed. Drop the two retired statuses from the trail package and default trail list to open instead of in_progress, which the server can no longer return.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

Sessions

0a6a3860cd0cView transcript

Changes

6

255 unmodified lines

... (truncated for brevity)...

// Status represents the lifecycle status of a trail.
type Status string

// The status set mirrors the server's repo_trails check constraint
// ('draft', 'open', 'merged', 'closed'). The former in_progress and
// in_review statuses were folded into open server-side.
const (
    StatusDraft      Status = "draft"
    StatusOpen       Status = "open"
    StatusInProgress Status = "in_progress"
    StatusInReview   Status = "in_review"
    StatusMerged     Status = "merged"
    StatusClosed     Status = "closed"
)

// ValidStatuses returns all valid trail statuses in lifecycle order.
func ValidStatuses() []Status {
    return []Status{
        StatusDraft,
        StatusOpen,
        StatusInProgress,
        StatusInReview,
        StatusMerged,
        StatusClosed,
    }
}

... (truncated for brevity)...

func printTrailListEmpty(w io.Writer, authorFilter string, statusFilters []trail.Status) { // empty-state message logic }