GeezerVison is showing github.com — fix(gui-extensions): put the WSL probeDistro answers on their own lines by dezren39 · Pull Request #301 · developing-today-forks/opencode
Conversation
dezren39
commented
Oct 22, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Closes #294
Problem
probeDistro in packages/gui-extensions/src/wsl/runtime.ts ran command -v bash >/dev/null && printf yes || printf no (and the curl twin) via runWslSh — a login shell (sh -lc). The printf had no leading newline, and parseProbeAnswer reads the last non-empty trimmed line, requiring it to be exactly yes. If preceding login-shell output (banner/MOTD/profile) ended without a trailing newline, the answer glued onto it — welcome to dev boxyes ≠ yes — so an installed bash/curl read as missing and the distro could never become ready. This was the one sibling read left unframed by #293.
Reproduced on main 291ff1e4e3 with the real probe command: unterminated preceding output yields stdout welcome to dev boxyes, parsed ≠ yes.
Solution
Following the #293 / version-frame precedent (leading newline in the probe print):
- Extracted the probe command into an exported
probeScript(tool) that prints printf '\nyes\n' / printf '\nno\n' — the answer always lands on its own line, whatever preceded it.
probeDistro now runs probeScript("bash") / probeScript("curl"). parseProbeAnswer is unchanged: the last line is the answer, so a banner ending in yes cannot become a false positive for a missing tool (the glued-no and banner-yes cases are covered by tests).
Single-repo: GitHub code search confirms no parseProbeAnswer/probeDistro copies in developing-today/code, developing-today/openchamber, or dezren39/nix.
Tests
- New tests in
runtime.test.ts run the real probeScript through sh and read it with the real parseProbeAnswer: no preceding output, terminated preceding output, and unterminated preceding output — for bash and curl (yes) and for a missing tool (no), including banners ending in yes.
- Ablation: removing the leading newlines makes the new through-the-script test fail with the exact reported
welcome to dev boxyes.
bun test src/ in packages/gui-extensions: 212 pass, 1 skip (WSL-only), 0 fail. Package typecheck passes. lint:changed against origin/main: 0 problems in the 2 changed files.
![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 detection of Bash and curl availability in WSL environments when shell startup messages appear before the probe result.
- Probe results are now separated from preceding shell output, helping ensure available tools are recognized and missing tools are reported accurately.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with eyes emoji
|
This PR doesn't fully meet our contributing guidelines and PR template.
What needs to be fixed:
- PR description is missing required template sections. Please use the PR template.
Please edit this PR description to address the above within 72 hours, or it will be automatically closed.
If you believe this was flagged incorrectly, please let a maintainer know.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
🔄 Running since 2026-10-22T22:48:35.824555Z |
920bf7e |
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 22, 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:
1147cd9c-499e-4792-851a-e11cadbd4b5e
📥 Commits
-
Reviewing files that changed from the base of the PR and between 291ff1e and 920bf7e.
📒 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
-
The WSL Bash and curl availability checks now use newline-delimited probe answers. Tests verify that preceding login-shell output does not alter the parsed result.
Changes: WSL tool probe framing
| Layer / File(s) |
Summary |
Probe answer framing packages/gui-extensions/src/wsl/runtime.ts, packages/gui-extensions/src/wsl/runtime.test.ts |
probeScript surrounds yes and no answers with newlines. probeDistro uses the helper for its Bash and curl checks. Tests cover preceding output with and without a trailing newline, including output ending in yes. |
Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: hona
Merge Risk: ⚪ Minimal · up to 920bf
-
The WSL probe answer framing appears ready to merge after normal checks.
Pre-merge checks: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 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 clearly and concisely describes the primary WSL probeDistro fix. |
| Description check |
 |
The description explains the issue, solution, verification steps, test results, and linked issue. It omits the template's explicit Type of change and Checklist sections, but the required technical con… |
| Linked Issues check |
 |
The pull request addresses all coding requirements in [#294]. probeScript(tool) adds leading and trailing newlines to both yes and no answers. probeDistro uses it for both the bash and curl ch… |
| Out of Scope Changes check |
 |
The changes stay within [#294]. The source change extracts the WSL probe script and updates only the bash and curl probe calls. The added tests directly verify the required probe behavior. No unrelate… |
Full details: Description check
-
Explanation
The description explains the issue, solution, verification steps, test results, and linked issue. It omits the template's explicit Type of change and Checklist sections, but the required technical context is otherwise complete.
Full details: Linked Issues check
-
Explanation
The pull request addresses all coding requirements in [#294]. probeScript(tool) adds leading and trailing newlines to both yes and no answers. probeDistro uses it for both the bash and curl checks. Tests execute the real script through sh and parse output with parseProbeAnswer for no preceding output, terminated output, unterminated output, available tools, and a missing tool. The tests also cover banners ending in yes. The changed parser behavior preserves whole-line matching. The reported WSL suite and typecheck pass.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within [#294]. The source change extracts the WSL probe script and updates only the bash and curl probe calls. The added tests directly verify the required probe behavior. No unrelated product behavior or repository scope is changed.
✨ 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.
|
The following comment was made by an LLM, it may be inaccurate:
|
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 22, 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.
|