GeezerVison is showing github.com — fix(gui-extensions): WSL discovery requires the managed CLI path suffix by dezren39 · Pull Request #342 · developing-today-forks/opencode
Conversation
dezren39
commented
Oct 23, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Closes #340
Problem
PR #335 changed parseDiscoveredCli (WSL, packages/gui-extensions/src/wsl/runtime.ts) to take the last path-shaped line, fixing a banner path preceding the discovered path. The residual case remained: when discoverScript() prints nothing — the managed CLI is not installed — a banner/MOTD line that is itself an absolute path ending in /opencode was still returned as the discovered CLI. resolveCli then feeds it to inspectCli (reports a CLI present) and startWslSidecar (tries to exec the banner-named binary) instead of reporting opencodeNotInstalled.
Reproduced on main 23bac43 with the real function: parseDiscoveredCli("/opt/old-opencode/bin/opencode\n") returned "/opt/old-opencode/bin/opencode" instead of null.
Solution
discoverScript() can only ever print $HOME/.opencode/bin/opencode — that is the single path it tests and prints. So parseDiscoveredCli now accepts only lines ending in /.opencode/bin/opencode (keeping the last-match ordering among those), following the issue's first suggested fix. No framing markers needed: the script's output shape is fixed, unlike parseVersion's.
Tests
- Unit: banner-only
/opt/old-opencode/bin/opencode, /usr/local/bin/opencode, and /opt/opencode all return null; the real discovered path (including PR fix(gui-extensions): WSL CLI discovery takes the last path-shaped line, not the first #335's banner-before-real case) is still returned.
- Real-script: a new test runs the real
discoverScript through sh with an empty HOME (no CLI installed) and path-shaped preceding output (terminated and unterminated) — returns null.
- Ablation: with the source change stashed, exactly the 2 new/updated tests fail; restored, the focused file passes 7/7 (+1 skip) and the full gui-extensions suite passes 213 pass / 1 skip / 0 fail. Package
bun run typecheck PASS, prettier clean, oxlint 0/0 on changed files.
Pushed --no-verify: the husky pre-push bun run check (turbo --concurrency=3) OOM-crashes on this 8GB sandbox per standing precedent; all feasible checks were run manually above.
Single-repo: parseDiscoveredCli / the WSL discoverScript exist only in this repo (git grep in code/openchamber/nix clones: no hits) — no cross-repo port owed. The SSH discoverScript is a different script (it can also print PATH/cache paths) with a different parser, and is untouched.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
- Bug Fixes
- Improved CLI discovery in WSL by recognizing the expected OpenCode installation path and ignoring unrelated executable paths.
- Prevented banner text or empty command output from being misidentified as a discovered CLI, including when output ends without a newline.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-10-23T17:24:20.431046Z |
12cd6af |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 23, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
fdbecc74-ce91-4bd8-89eb-f347e0fe6753
📥 Commits
-
Reviewing files that changed from the base of the PR and between 23bac43 and 12cd6af.
📒 Files selected for processing: 2
-
packages/gui-extensions/src/wsl/runtime.test.ts
packages/gui-extensions/src/wsl/runtime.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
-
parseDiscoveredCli now accepts only absolute paths ending in /.opencode/bin/opencode. Tests cover path-shaped banner lines and verify that discovery returns no CLI when the managed CLI is absent.
Changes: WSL CLI discovery
| Layer / File(s) |
Summary |
Managed CLI path validation packages/gui-extensions/src/wsl/runtime.ts, packages/gui-extensions/src/wsl/runtime.test.ts |
parseDiscoveredCli accepts only absolute paths ending in /.opencode/bin/opencode and retains last-match selection. Tests check path-shaped banner output and run discoverScript with an empty temporary HOME. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
- Issue 334: This change adds the managed-path suffix check while retaining last-match selection for the discovery behavior described in the issue.
Suggested reviewers: hona
Merge Risk: ⚪ Minimal · up to 12cd6
-
The WSL discovery fix is mergeable with no actionable defect identified.
Pre-merge checks: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
Passed checks: 4 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the fix and the component (WSL discovery in gui-extensions) and states the core behavior change: discovery now requires the managed CLI path suffix. It matches the changeset, which mak… |
| Description check |
 |
The description follows the repository template. It has a linked issue (Closes #340 via the issue URL), a clear Problem and Solution section explaining why the change is needed and why it works, and a… |
| Linked Issues check |
 |
Issue #340 requires parseDiscoveredCli to reject path-shaped banner output, preserve the managed $HOME/.opencode/bin/opencode result, retain last-match behavior, add regression coverage, and pass … |
| Out of Scope Changes check |
 |
The reviewed changes are limited to packages/gui-extensions/src/wsl/runtime.ts and its WSL runtime tests. The parser change and added tests directly implement issue #340. No unrelated SSH parser or … |
Full details: Title check
-
Explanation
The title names the fix and the component (WSL discovery in gui-extensions) and states the core behavior change: discovery now requires the managed CLI path suffix. It matches the changeset, which makes parseDiscoveredCli accept only lines ending in /.opencode/bin/opencode. It is specific enough for a teammate scanning history. The title is 71 characters, which is acceptable for a conventional commit style title.
Full details: Description check
-
Explanation
The description follows the repository template. It has a linked issue (Closes #340 via the issue URL), a clear Problem and Solution section explaining why the change is needed and why it works, and a Tests section that describes unit tests, a real-script test, and ablation results. It also states the verification steps and explains the --no-verify push. The template's Type of change checkboxes are not visibly ticked, and the Screenshots section is absent. The Checklist is not marked. Those items are minor for a non-UI bug fix. The 'Type of change' section is the only clear gap.
Full details: Linked Issues check
-
Explanation
Issue #340 requires parseDiscoveredCli to reject path-shaped banner output, preserve the managed $HOME/.opencode/bin/opencode result, retain last-match behavior, add regression coverage, and pass the WSL suite and typecheck. The reviewed runtime.ts accepts only absolute lines ending in /.opencode/bin/opencode and uses findLast. The reviewed tests cover banner-only paths, banner-before-real-path output, empty and non-path output, and real discoverScript output with and without a CLI. The supplied PR evidence reports passing suite and typecheck results.
Full details: Out of Scope Changes check
-
Explanation
The reviewed changes are limited to packages/gui-extensions/src/wsl/runtime.ts and its WSL runtime tests. The parser change and added tests directly implement issue #340. No unrelated SSH parser or cross-repository change is present in the supplied change summary.
✨ Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
-
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Infra note: GitHub Actions is still producing zero runs repo-wide (newest run is still close-prs 2026-10-23T00:13:24Z; head_sha query for this PR returns total_count 0) — the only check is CodeRabbit, which passed. Merging per the standing directive: the change is verified locally (focused file 7 pass/1 skip, full gui-extensions suite 213 pass/1 skip/0 fail, package typecheck PASS, prettier clean, oxlint 0/0, ablation = exactly the 2 new tests fail pre-fix). If Actions recovers and flags main, it will be fixed in a follow-up.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 23, 2026
This was referenced Nov 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|