#9796: fix(cli): correct fallback path for bundled Chrome extension (#9772)
cli
stale
Cluster:
Browser Extension Fixes
Fixes #9772
The fallback path `../../assets/chrome-extension` from `dist/` resolves to `node_modules/assets/chrome-extension` instead of `openclaw/assets/chrome-extension`.
Changed to `../assets/chrome-extension` which correctly resolves to the package's assets directory.
This also fixes related issues: #9558, #9504, #9522, #9191
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adjusts the fallback resolution for the bundled Chrome extension directory in the CLI. Specifically, `resolveBundledExtensionRootDir()` now falls back to `../assets/chrome-extension` relative to the compiled `dist/cli` location (instead of `../../...`), avoiding accidental resolution into `node_modules/assets/...` when the CLI is executed from within a dependency tree.
The change is localized to `src/cli/browser-cli-extension.ts` and affects the source directory used by `installChromeExtension()` when the upward directory walk does not find an `assets/chrome-extension/manifest.json`.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- The change is a single-path adjustment to a fallback resolver, and existing resolution logic (walking up and verifying `manifest.json`) remains unchanged; no new side effects or security-sensitive behavior is introduced.
- No files require special attention
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#9398: Fix browser extension install path calculation
by vishaltandale00 · 2026-02-05
90.3%
#10937: fix(browser): correct fallback path for bundled Chrome extension
by dddabtc · 2026-02-07
89.9%
#10589: fix: chrome extension install fails in bundled dist layout
by joetomasone · 2026-02-06
87.2%
#9259: Fix: Restore explicit glob patterns in package.json files field
by vishaltandale00 · 2026-02-05
82.8%
#14944: fix(browser): prefer openclaw profile in headless/noSandbox environ...
by BenediktSchackenberg · 2026-02-12
76.9%
#12849: fix(plugins): fallback bundled channel specs when npm install retur...
by vincentkoc · 2026-02-09
76.6%
#20424: Fix plugin extension path traversal in discovery/install
by markmusson · 2026-02-18
76.0%
#6193: fix(browser): default to openclaw profile instead of chrome extensi...
by mikezaoldyeck · 2026-02-01
75.9%
#8614: fix(browser): detect early chromium exit to prevent startup hang
by Wren-OC · 2026-02-04
75.5%
#7781: fix: resolve Google Gemini CLI auth credential extraction #4585
by ManojPanda3 · 2026-02-03
75.4%