Skip to content

Commit b3cca3b

Browse files
branchseerclaude
andcommitted
feat: Align package headers with top-level items in task selector
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bad8334 commit b3cca3b

13 files changed

+42
-42
lines changed

crates/vite_select/src/interactive.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ pub fn render_items(writer: &mut impl Write, params: &RenderParams<'_>) -> anyho
343343
if is_interactive {
344344
write!(
345345
writer,
346-
" {dim}{name}{reset}{line_ending}",
346+
" {dim}{name}{reset}{line_ending}",
347347
dim = SetAttribute(Attribute::Dim),
348348
name = group_name,
349349
reset = SetAttribute(Attribute::Reset),
@@ -797,7 +797,7 @@ mod tests {
797797
assert_eq!(item_lines[0], " \u{203a} build: echo build app");
798798
assert_eq!(item_lines[1], " lint: echo lint app");
799799
// Group header
800-
assert_eq!(item_lines[2], " lib (packages/lib)");
800+
assert_eq!(item_lines[2], " lib (packages/lib)");
801801
// Grouped items (indented by 2 more, less padding)
802802
assert_eq!(item_lines[3], " build: echo build lib");
803803
assert_eq!(item_lines[4], " lint: echo lint lib");
@@ -816,7 +816,7 @@ mod tests {
816816
// All commands start at column 17 regardless of indent level
817817
assert_eq!(item_lines[0], " \u{203a} build: echo build");
818818
assert_eq!(item_lines[1], " typecheck: echo tc");
819-
assert_eq!(item_lines[2], " lib");
819+
assert_eq!(item_lines[2], " lib");
820820
assert_eq!(item_lines[3], " build: echo build lib");
821821
}
822822

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive enter with no results does nothing.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1111
build: echo build app
1212
lint: echo lint app
1313
test: echo test app
14-
lib (packages/lib)
14+
lib (packages/lib)
1515
build: echo build lib
1616
lint: echo lint lib
1717
test: echo test lib
1818
typecheck: echo typecheck lib
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -34,12 +34,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
3434
build: echo build app
3535
lint: echo lint app
3636
test: echo test app
37-
lib (packages/lib)
37+
lib (packages/lib)
3838
build: echo build lib
3939
lint: echo lint lib
4040
test: echo test lib
4141
typecheck: echo typecheck lib
42-
task-select-test (workspace root)
42+
task-select-test (workspace root)
4343
check: echo check root
4444
clean: echo clean root
4545
deploy: echo deploy root

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive escape clears query.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1111
build: echo build app
1212
lint: echo lint app
1313
test: echo test app
14-
lib (packages/lib)
14+
lib (packages/lib)
1515
build: echo build lib
1616
lint: echo lint lib
1717
test: echo test lib
1818
typecheck: echo typecheck lib
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -26,7 +26,7 @@ Select a task (↑/↓, Enter to run, Esc to clear):
2626
Select a task (↑/↓, Enter to run, Esc to clear): lin
2727

2828
lint: echo lint app
29-
lib (packages/lib)
29+
lib (packages/lib)
3030
lint: echo lint lib
3131
@ write-key: escape
3232
@ expect-milestone: task-select::0
@@ -35,12 +35,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
3535
build: echo build app
3636
lint: echo lint app
3737
test: echo test app
38-
lib (packages/lib)
38+
lib (packages/lib)
3939
build: echo build lib
4040
lint: echo lint lib
4141
test: echo test lib
4242
typecheck: echo typecheck lib
43-
task-select-test (workspace root)
43+
task-select-test (workspace root)
4444
check: echo check root
4545
clean: echo clean root
4646
deploy: echo deploy root

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive scroll long list.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1111
build: echo build app
1212
lint: echo lint app
1313
test: echo test app
14-
lib (packages/lib)
14+
lib (packages/lib)
1515
build: echo build lib
1616
lint: echo lint lib
1717
test: echo test lib
1818
typecheck: echo typecheck lib
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -35,12 +35,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
3535
build: echo build app
3636
lint: echo lint app
3737
test: echo test app
38-
lib (packages/lib)
38+
lib (packages/lib)
3939
build: echo build lib
4040
lint: echo lint lib
4141
test: echo test lib
4242
typecheck: echo typecheck lib
43-
task-select-test (workspace root)
43+
task-select-test (workspace root)
4444
check: echo check root
4545
clean: echo clean root
4646
deploy: echo deploy root
@@ -59,12 +59,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
5959
build: echo build app
6060
lint: echo lint app
6161
test: echo test app
62-
lib (packages/lib)
62+
lib (packages/lib)
6363
build: echo build lib
6464
lint: echo lint lib
6565
test: echo test lib
6666
typecheck: echo typecheck lib
67-
task-select-test (workspace root)
67+
task-select-test (workspace root)
6868
check: echo check root
6969
clean: echo clean root
7070
deploy: echo deploy root

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search other package task.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1111
build: echo build app
1212
lint: echo lint app
1313
test: echo test app
14-
lib (packages/lib)
14+
lib (packages/lib)
1515
build: echo build lib
1616
lint: echo lint lib
1717
test: echo test lib
1818
typecheck: echo typecheck lib
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -25,7 +25,7 @@ Select a task (↑/↓, Enter to run, Esc to clear):
2525
@ expect-milestone: task-select:typec:0
2626
Select a task (↑/↓, Enter to run, Esc to clear): typec
2727

28-
lib (packages/lib)
28+
lib (packages/lib)
2929
typecheck: echo typecheck lib
3030
@ write-key: enter
3131
Selected task: lib#typecheck

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search preserves rating within package.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1212
lint: echo lint lib
1313
test: echo test lib
1414
typecheck: echo typecheck lib
15-
app (packages/app)
15+
app (packages/app)
1616
build: echo build app
1717
lint: echo lint app
1818
test: echo test app
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -28,7 +28,7 @@ Select a task (↑/↓, Enter to run, Esc to clear): t
2828
test: echo test lib
2929
typecheck: echo typecheck lib
3030
lint: echo lint lib
31-
task-select-test (workspace root)
31+
task-select-test (workspace root)
3232
check: echo check root
3333
clean: echo clean root
3434
deploy: echo deploy root

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search then select.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1111
build: echo build app
1212
lint: echo lint app
1313
test: echo test app
14-
lib (packages/lib)
14+
lib (packages/lib)
1515
build: echo build lib
1616
lint: echo lint lib
1717
test: echo test lib
1818
typecheck: echo typecheck lib
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -26,7 +26,7 @@ Select a task (↑/↓, Enter to run, Esc to clear):
2626
Select a task (↑/↓, Enter to run, Esc to clear): lin
2727

2828
lint: echo lint app
29-
lib (packages/lib)
29+
lib (packages/lib)
3030
lint: echo lint lib
3131
@ write-key: enter
3232
Selected task: lint

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search with hash skips reorder.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1111
build: echo build app
1212
lint: echo lint app
1313
test: echo test app
14-
lib (packages/lib)
14+
lib (packages/lib)
1515
build: echo build lib
1616
lint: echo lint lib
1717
test: echo test lib
1818
typecheck: echo typecheck lib
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -25,7 +25,7 @@ Select a task (↑/↓, Enter to run, Esc to clear):
2525
@ expect-milestone: task-select:lib#:0
2626
Select a task (↑/↓, Enter to run, Esc to clear): lib#
2727

28-
lib (packages/lib)
28+
lib (packages/lib)
2929
build: echo build lib
3030
lint: echo lint lib
3131
test: echo test lib

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select from other package.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1111
build: echo build app
1212
lint: echo lint app
1313
test: echo test app
14-
lib (packages/lib)
14+
lib (packages/lib)
1515
build: echo build lib
1616
lint: echo lint lib
1717
test: echo test lib
1818
typecheck: echo typecheck lib
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root
@@ -30,12 +30,12 @@ Select a task (↑/↓, Enter to run, Esc to clear):
3030
build: echo build app
3131
lint: echo lint app
3232
test: echo test app
33-
lib (packages/lib)
33+
lib (packages/lib)
3434
build: echo build lib
3535
lint: echo lint lib
3636
test: echo test lib
3737
typecheck: echo typecheck lib
38-
task-select-test (workspace root)
38+
task-select-test (workspace root)
3939
check: echo check root
4040
clean: echo clean root
4141
deploy: echo deploy root

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task from lib.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Select a task (↑/↓, Enter to run, Esc to clear):
1212
lint: echo lint lib
1313
test: echo test lib
1414
typecheck: echo typecheck lib
15-
app (packages/app)
15+
app (packages/app)
1616
build: echo build app
1717
lint: echo lint app
1818
test: echo test app
19-
task-select-test (workspace root)
19+
task-select-test (workspace root)
2020
check: echo check root
2121
clean: echo clean root
2222
deploy: echo deploy root

0 commit comments

Comments
 (0)