Skip to content

Commit effbd87

Browse files
jmelahmanclaude
andcommitted
chore(cli): fix gocritic appendAssign in picker test
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1343137 commit effbd87

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cli/internal/tui/commands_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ func TestFormatPickerLabelAlignsDetail(t *testing.T) {
187187
}
188188

189189
// A long label truncates so its detail stays on the shared column.
190-
long := append(rows, pickerItem{label: strings.Repeat("x", 60), detail: "Ollama"})
191-
col = pickerDetailCol(long, avail)
192-
got := formatPickerLabel(long[3], avail, col)
190+
longRow := pickerItem{label: strings.Repeat("x", 60), detail: "Ollama"}
191+
col = pickerDetailCol(append(rows[:len(rows):len(rows)], longRow), avail)
192+
got := formatPickerLabel(longRow, avail, col)
193193
if len([]rune(got)) > avail {
194194
t.Errorf("long label: width = %d, want <= %d", len([]rune(got)), avail)
195195
}

0 commit comments

Comments
 (0)