Skip to content

Commit 556cf90

Browse files
wesmclaude
andcommitted
Add list filter tests, use red for Fail and orange for Error
- Add integration tests for --open, --closed, --unaddressed query params and mutual-exclusion validation (--closed + --open, --closed + --unaddressed) - Change Fail verdict color to red (124/196) and Error status to orange (166/208) for clearer semantics: red = findings, orange = job failure - Change Canceled color to gray (243/245) to avoid collision with Error Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 70b09d1 commit 556cf90

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

cmd/roborev/list_test.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,36 @@ func TestListCommand(t *testing.T) {
190190
}
191191
},
192192
},
193+
{
194+
name: "--open sends addressed=false query param",
195+
args: []string{"--open"},
196+
handler: jobsHandler([]storage.ReviewJob{}, false),
197+
wantQuery: []string{"addressed=false"},
198+
},
199+
{
200+
name: "--closed sends addressed=true query param",
201+
args: []string{"--closed"},
202+
handler: jobsHandler([]storage.ReviewJob{}, false),
203+
wantQuery: []string{"addressed=true"},
204+
},
205+
{
206+
name: "--unaddressed alias sends addressed=false query param",
207+
args: []string{"--unaddressed"},
208+
handler: jobsHandler([]storage.ReviewJob{}, false),
209+
wantQuery: []string{"addressed=false"},
210+
},
211+
{
212+
name: "--closed and --open conflict",
213+
args: []string{"--closed", "--open"},
214+
handler: jobsHandler([]storage.ReviewJob{}, false),
215+
wantError: "if any flags in the group",
216+
},
217+
{
218+
name: "--closed and --unaddressed conflict",
219+
args: []string{"--closed", "--unaddressed"},
220+
handler: jobsHandler([]storage.ReviewJob{}, false),
221+
wantError: "if any flags in the group",
222+
},
193223
{
194224
name: "explicit --repo with worktree path normalizes to main repo",
195225
repoSetup: func(t *testing.T) repoSetupResult {

cmd/roborev/tui/tui.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ var (
4646
queuedStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "136", Dark: "226"}) // Yellow/Gold
4747
runningStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "25", Dark: "33"}) // Blue
4848
doneStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "28", Dark: "46"}) // Green
49-
failedStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "124", Dark: "196"}) // Red (job error)
50-
canceledStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "166", Dark: "208"}) // Orange
49+
failedStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "166", Dark: "208"}) // Orange (job error)
50+
canceledStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "243", Dark: "245"}) // Gray
5151

5252
passStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "28", Dark: "46"}) // Green
53-
failStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "172", Dark: "214"}) // Yellow/Orange (review found issues)
53+
failStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "124", Dark: "196"}) // Red (review found issues)
5454
addressedStyle = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Light: "30", Dark: "51"}) // Cyan
5555

5656
helpStyle = lipgloss.NewStyle().

0 commit comments

Comments
 (0)