Detect Vite+-managed Codex installs (#42071)

## Why

Vite+ launches Codex through the same JavaScript shim as npm, so Codex could
misidentify Vite+-owned installations and recommend npm for updates.

## What changed

- Detect Vite+ global installs from their package ownership metadata and pass a
  dedicated `CODEX_MANAGED_BY_VITE_PLUS` marker to the native binary.
- Represent Vite+ in install context and `codex doctor` output.
- Recommend `vp install -g @openai/codex` in update and repair flows for
  Vite+-managed installs.

See https://github.com/openai/codex/pull/30880.

GitOrigin-RevId: 8add724eefd31170a078086392609dbbd7f20b26
This commit is contained in:
Charlie Marsh authored and copyberry committed 2026-09-01 15:12:53 +00:00
1 parent 82461c9990
commit d141438342
12 files changed
+114 -10

No files matched your search

@@ -0,0 +1,11 @@
---
source: tui/src/history_cell/tests.rs
expression: rendered
---
╭─────────────────────────────────────────────────╮
│ ✨ Update available! 0.0.0 -> 9.9.9 │
│ Run vp install -g @openai/codex to update. │
│ │
│ See full release notes: │
│ https://github.com/openai/codex/releases/latest │
╰─────────────────────────────────────────────────╯
+11
View File
@@ -1463,6 +1463,17 @@ fn pnpm_update_available_history_cell_snapshot() {
insta::assert_snapshot!(rendered);
}
#[test]
fn vite_plus_update_available_history_cell_snapshot() {
let cell = UpdateAvailableHistoryCell::new(
"9.9.9".to_string(),
Some(UpdateAction::VitePlusGlobalLatest),
);
let rendered = render_lines(&cell.display_lines(/*width*/ 110)).join("\n");
insta::assert_snapshot!(rendered);
}
#[test]
fn web_search_history_cell_without_detail_snapshot() {
let cell = new_web_search_call("call-1".to_string(), String::new(), WebSearchAction::Other);