Skip to content

Commit 116730a

Browse files
branchseerclaude
andcommitted
fix: simplify cache disabled inline messages
Remove verbose reason suffixes from "cache disabled" inline status messages (": no cache config" and ": built-in command"). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent af03f79 commit 116730a

27 files changed

Lines changed: 44 additions & 51 deletions

File tree

crates/vite_task/src/session/cache/display.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use vite_str::Str;
99
use vite_task_plan::cache_metadata::SpawnFingerprint;
1010

1111
use super::{CacheMiss, FingerprintMismatch};
12-
use crate::session::event::{CacheDisabledReason, CacheStatus};
12+
use crate::session::event::CacheStatus;
1313

1414
/// Describes a single atomic change between two spawn fingerprints.
1515
///
@@ -216,13 +216,6 @@ pub fn format_cache_status_inline(cache_status: &CacheStatus) -> Option<Str> {
216216
};
217217
Some(vite_str::format!("✗ cache miss: {reason}, executing"))
218218
}
219-
CacheStatus::Disabled(reason) => {
220-
// Show inline message for disabled cache
221-
let message = match reason {
222-
CacheDisabledReason::InProcessExecution => "cache disabled: built-in command",
223-
CacheDisabledReason::NoCacheMetadata => "cache disabled: no cache config",
224-
};
225-
Some(vite_str::format!("⊘ {message}"))
226-
}
219+
CacheStatus::Disabled(_) => Some(Str::from("⊘ cache disabled")),
227220
}
228221
}

crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache disabled.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
55
> vp run no-cache-task # cache miss
6-
$ print-file test.txtcache disabled: no cache config
6+
$ print-file test.txtcache disabled
77
test content
88
> vp run no-cache-task # cache disabled, runs again
9-
$ print-file test.txtcache disabled: no cache config
9+
$ print-file test.txtcache disabled
1010
test content

crates/vite_task_bin/tests/e2e_snapshots/fixtures/stdin-inheritance/snapshots/multiple tasks get null stdin.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ expression: e2e_outputs
55
> echo from-stdin | vp run -r read-stdin
66
~/packages/other$ read-stdin
77

8-
$ read-stdincache disabled: no cache config
8+
$ read-stdincache disabled
99

1010
---
1111
[vp run] 0/2 cache hit (0%). (Run `vp run --last-details` for full details)

crates/vite_task_bin/tests/e2e_snapshots/fixtures/stdin-inheritance/snapshots/single task no cache inherits stdin.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
55
> echo from-stdin | vp run read-stdin
6-
$ read-stdincache disabled: no cache config
6+
$ read-stdincache disabled
77
from-stdin

crates/vite_task_bin/tests/e2e_snapshots/fixtures/stdio-detection/snapshots/multiple tasks, cache disabled.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ stdin:not-tty
88
stdout:not-tty
99
stderr:not-tty
1010

11-
$ check-ttycache disabled: no cache config
11+
$ check-ttycache disabled
1212
stdin:not-tty
1313
stdout:not-tty
1414
stderr:not-tty

crates/vite_task_bin/tests/e2e_snapshots/fixtures/stdio-detection/snapshots/single task, cache disabled.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
55
> vp run check-tty
6-
$ check-ttycache disabled: no cache config
6+
$ check-ttycache disabled
77
stdin:tty
88
stdout:tty
99
stderr:tty

crates/vite_task_bin/tests/e2e_snapshots/fixtures/stdio-graph-criteria/snapshots/multi-node ancestor forces piped for nested single-node graph.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
55
> vp run -r foo-nested
6-
~/packages/other$ check-ttycache disabled: no cache config
6+
~/packages/other$ check-ttycache disabled
77
stdin:not-tty
88
stdout:not-tty
99
stderr:not-tty
1010

11-
$ check-ttycache disabled: no cache config
11+
$ check-ttycache disabled
1212
stdin:not-tty
1313
stdout:not-tty
1414
stderr:not-tty

crates/vite_task_bin/tests/e2e_snapshots/fixtures/stdio-graph-criteria/snapshots/single-node chains inherit even with multi-node sibling graph.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
55
> vp run foo
6-
$ check-ttycache disabled: no cache config
6+
$ check-ttycache disabled
77
stdin:tty
88
stdout:tty
99
stderr:tty
1010

11-
$ check-ttycache disabled: no cache config
11+
$ check-ttycache disabled
1212
stdin:tty
1313
stdout:tty
1414
stderr:tty
1515

16-
~/packages/other$ check-ttycache disabled: no cache config
16+
~/packages/other$ check-ttycache disabled
1717
stdin:not-tty
1818
stdout:not-tty
1919
stderr:not-tty
2020

21-
$ check-ttycache disabled: no cache config
21+
$ check-ttycache disabled
2222
stdin:not-tty
2323
stdout:not-tty
2424
stderr:not-tty

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/vp run in script.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ expression: e2e_outputs
44
---
55
> vp run list-tasks
66
@ expect-milestone: task-select::0
7-
$ vp runcache disabled: no cache config
7+
$ vp runcache disabled
88
Search task (↑/to move, enter to select):
99
> hello: echo hello from root
1010
list-tasks: vp run
@@ -13,6 +13,6 @@ Search task (↑/↓ to move, enter to select):
1313
app#test: echo test app
1414
lib#build: echo build lib
1515
@ write-key: enter
16-
$ vp runcache disabled: no cache config
17-
$ echo hello from rootcache disabled: built-in command
16+
$ vp runcache disabled
17+
$ echo hello from rootcache disabled
1818
hello from root

crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-no-trailing-newline/snapshots/no trailing newline.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ source: crates/vite_task_bin/tests/e2e_snapshots/main.rs
33
expression: e2e_outputs
44
---
55
> vp run hello # runs echo -n hello
6-
$ echo -n foocache disabled: built-in command
6+
$ echo -n foocache disabled
77
foo
8-
$ echo barcache disabled: built-in command
8+
$ echo barcache disabled
99
bar
1010

1111
---

0 commit comments

Comments
 (0)