trail list: name active status filter in empty state; align statuses with server#1425
Open
matthiaswenz wants to merge 6 commits into
Open
trail list: name active status filter in empty state; align statuses with server#1425matthiaswenz wants to merge 6 commits into
matthiaswenz wants to merge 6 commits into
Conversation
`entire trail list` defaults to the in_progress status filter, so a repo with trails in other statuses (open, merged, etc.) rendered a bare "No trails found." that read as "this repo has no trails." Extract the empty-state into printTrailListEmpty, which names the active status filter and the author when set, and hints at `--status any` whenever a status filter narrowed the results. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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> Entire-Checkpoint: 0a6a3860cd0c
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the entire trail command set to match the server’s simplified trail status vocabulary and to make trail list less misleading when the default status filter yields no results.
Changes:
- Aligns trail status constants/validation with the server’s allowed set (
draft,open,merged,closed) and updates thetrail listdefault status toopen. - Improves
trail listempty-state output to name the active status filter (and author filter when set) and to suggest--status anywhen a status filter is active. - Updates unit tests to reflect the new status set, ordering/grouping, and empty-state rendering behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/trail/trail.go | Removes retired statuses and constrains ValidStatuses() to the server-aligned set. |
| cmd/entire/cli/trail/trail_test.go | Updates status validation/ordering tests to match the new 4-status set. |
| cmd/entire/cli/trail/store_test.go | Adjusts store tests to use open instead of the removed in_progress. |
| cmd/entire/cli/trail_review_cmd_test.go | Updates review dashboard tests to use open instead of in_review. |
| cmd/entire/cli/trail_cmd.go | Switches default list status to open, updates grouping order, and adds printTrailListEmpty() to render filter-aware empty states. |
| cmd/entire/cli/trail_cmd_test.go | Updates status parsing/list rendering expectations and adds tests for the new empty-state output. |
A capped page rendered "Recent trails · 10", reading as the total number of matches rather than the page size. Header, per-status group counts, and the Other bucket now render "shown/total" when --limit dropped rows, and the header noun pluralizes by the total. Also fix the --json flag help, which claimed only --status is respected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Entire-Checkpoint: 72bbfd94df45
The list endpoint paginates (default 50 rows, max 200), but the CLI fetched it bare and filtered client-side, so only trails among the 50 most recently updated were ever visible and the shown/total counts were computed against that page instead of the real match count. Send status, author, and limit as query params, read the server's total for the shown/total display, and drop the client-side filter/sort/limit machinery. --limit above 200 is clamped with a note when matches exceed the page. The grouped-by-status view is replaced by a flat list with a STATUS column whenever more than one status can appear, so unknown server statuses stay visible without aggregation. findTrail (trail show/update lookups) had the same first-page blindness; as a stopgap it now requests the 200-row server max. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Entire-Checkpoint: 6b684484518f
Soph
approved these changes
Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four related changes to
entire trail list:Empty-state message names the active filter. A bare
entire trail listapplies a default status filter, so the old flat "No trails found." misleadingly suggested the repo had no trails at all when trails existed in other statuses. The empty state now names the filter ("No open trails found."), appends the author filter when set, and hints at--status any.Trail statuses aligned with the server's simplified set. The server folded
in_progressandin_reviewintoopen(migration20260603120300_simplify_repo_trail_statusin entire.io); the API now accepts and emits exactlydraft, open, merged, closed. The CLI still carried the six-value set, andtrail listdefaulted toin_progress— a status the server can no longer return, which would have made the default listing permanently empty. The retired statuses are dropped from thetrailpackage,trail listnow defaults toopen.create/update/--statusvalidation all derive fromValidStatuses(), so they reflect the new set automatically.Truncated counts render as shown/total. When
--limit(default 10) cut the list short, the header read "Recent trails · 10" — suggesting 10 was the total match count. It now renders "shown/total" (e.g. "Recent trails · 10/137") whenever rows were dropped, with the header noun pluralized by the total. Untruncated lists keep plain counts. Also fixes the--jsonflag help, which claimed only--statusis respected when JSON output also honors--authorand--limit.Filtering, sorting, and truncation pushed to the server. The list endpoint paginates (default 50 rows, max 200), but the CLI fetched it bare and filtered client-side — so only trails among the 50 most recently updated were ever visible, capping every listing at whatever subset of that page matched the filters, and the shown/total counts were computed against the page instead of the real match count. The CLI now sends
status(comma-separated),author, andlimitas query params and reads the server'stotalfor the shown/total display.--limitabove 200 is clamped, with an explicit note when matches exceed the page ("Note: --limit 500 exceeds the server maximum of 200 trails per request."). The grouped-by-status view is replaced by a flat list with a STATUS column whenever more than one status can appear (no client-side aggregation; unknown server statuses render verbatim instead of an "Other" bucket).findTrail(backingtrail show/updatelookups) had the same first-page blindness and now requests the 200-row server max as a stopgap.Follow-up
findTraillookups by branch/number are still blind past 200 trails — a real fix needs a server-sidebranchfilter param on the list endpoint, or using the by-number detail endpoint for number lookups.Test plan
--status anyhint, author suffix)in_progress/in_revieware now rejected byStatus.IsValid()and the--statusparsertrailListQuery(param encoding,--status anyomitting the status param, 200 cap) and for truncated shown/total headersmise run check(fmt, lint, unit + integration + e2e canary) passes🤖 Generated with Claude Code