Skip to content

Commit bf84b8a

Browse files
committed
refactor(plan): remove unused ExecutionItemDisplay::and_item_index field
The `and_item_index` field on `ExecutionItemDisplay` was only ever written, never read by any reporter or execution code. Remove it and regenerate the plan snapshots. The distinct `and_item_index` on `ExecutionCacheKey::UserTask` is part of the cache key and is unaffected. https://claude.ai/code/session_01LXLpjxLchyX5FyD8Fzmxqp
1 parent c945cc0 commit bf84b8a

60 files changed

Lines changed: 0 additions & 99 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crates/vite_task/src/session/reporter/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ pub mod test_fixtures {
465465
ExecutionItemDisplay {
466466
task_display: test_task_display(name),
467467
command: name.into(),
468-
and_item_index: None,
469468
cwd: test_path(),
470469
}
471470
}

crates/vite_task_plan/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ pub struct ExecutionItemDisplay {
103103
/// `SpawnExecution` contains the actual args for execution.
104104
pub command: Str,
105105

106-
/// The index of this execution item among all items in the task's command split by `&&`.
107-
/// If the task's command doesn't have `&&`, this will be `None`.
108-
pub and_item_index: Option<usize>,
109-
110106
/// The cwd when this execution item is planned.
111107
/// This is for displaying purpose only.
112108
///

crates/vite_task_plan/src/plan.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ async fn plan_task_as_execution_node(
175175
}
176176
command
177177
},
178-
and_item_index: if and_item_count > 1 { Some(index) } else { None },
179178
cwd: Arc::clone(&cwd),
180179
task_display: task_node.task_display.clone(),
181180
};
@@ -345,7 +344,6 @@ async fn plan_task_as_execution_node(
345344

346345
let execution_item_display = ExecutionItemDisplay {
347346
command: command_str.into(),
348-
and_item_index: None,
349347
cwd,
350348
task_display: task_node.task_display.clone(),
351349
};

crates/vite_task_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"package_path": "<workspace>/"
2222
},
2323
"command": "TEST_VAR=hello_world vt tool print-env TEST_VAR",
24-
"and_item_index": null,
2524
"cwd": "<workspace>/"
2625
},
2726
"kind": {

crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_does_not_override_per_task_cache_false.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"package_path": "<workspace>/"
2222
},
2323
"command": "vtt print-file vite-task.json",
24-
"and_item_index": null,
2524
"cwd": "<workspace>/"
2625
},
2726
"kind": {

crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"package_path": "<workspace>/"
2222
},
2323
"command": "vtt print-file package.json",
24-
"and_item_index": null,
2524
"cwd": "<workspace>/"
2625
},
2726
"kind": {

crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_task_caching_even_when_cache_tasks_is_false.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"package_path": "<workspace>/"
2222
},
2323
"command": "vtt print-file package.json",
24-
"and_item_index": null,
2524
"cwd": "<workspace>/"
2625
},
2726
"kind": {

crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_on_task_with_per_task_cache_true_enables_caching.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"package_path": "<workspace>/"
2222
},
2323
"command": "vtt print-file package.json",
24-
"and_item_index": null,
2524
"cwd": "<workspace>/"
2625
},
2726
"kind": {

crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_disables_task_caching.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"package_path": "<workspace>/"
2222
},
2323
"command": "vtt print-file package.json",
24-
"and_item_index": null,
2524
"cwd": "<workspace>/"
2625
},
2726
"kind": {

crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_overrides_per_task_cache_true.jsonc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"package_path": "<workspace>/"
2222
},
2323
"command": "vtt print-file package.json",
24-
"and_item_index": null,
2524
"cwd": "<workspace>/"
2625
},
2726
"kind": {

0 commit comments

Comments
 (0)