Skip to content

Fix Windows setup and skills install flow - #82

Merged
touch2be merged 1 commit into
masterfrom
fix/windows-install-onboarding
Jun 12, 2026
Merged

touch2be merged 1 commit into
masterfrom
fix/windows-install-onboarding

Conversation

@touch2be

@touch2be touch2be commented Jun 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Fix Windows allowed-root directory checks using path.relative instead of slash-prefix matching
  • Make skills install/update/remove work on Windows by using npx.cmd, shell execution, and a safe cwd fallback
  • Mark plugin install progress as completed/failed from the action result and refresh providers after success
  • Make the setup wizard smaller, transparent over the app, less card-heavy, and clearer about agent/model readiness
  • Fall back provider setup to the user home directory when no active project is selected, fixing GitHub Copilot setup from Settings

Verification

  • pnpm install
  • pnpm exec vp build
  • Windows VM: pnpm.cmd exec vp build
  • Windows VM: restarted OpenGUI via OpenGUI-Interactive scheduled task
  • Windows VM: verified OpenCode server is healthy
  • Windows VM: verified GitHub Copilot OAuth no longer fails with No connection available
  • pnpm exec vp check (fails on existing formatting issue in untouched src/components/settings/GeneralSettings.tsx)

@github-actions

Copy link
Copy Markdown

Here's my review of PR "Fix Windows setup and skills install flow":


Issues Found

1. Potentially redundant exitCode check in DiscoverPlugins.tsx

The action handlers pluginsApi.install(), .update(), .remove() all pass through unwrapBridgeResult which strips the exitCode field — on success they return undefined. The result?.exitCode check will always be undefined, so the "failed" branch via exit code is dead code. The catch block (thrown error) is the only way failures are detected.

// src/components/DiscoverPlugins.tsx:217-218
const result = await action();
if (result?.exitCode !== undefined && result.exitCode !== 0) {

If exit-code-based success signaling is intended, unwrapBridgeResult / the bridge handlers would need to propagate exitCode in the data payload. Otherwise this branch is unreachable and should be simplified to just treat any non-thrown return as success.

Severity: Low — not a bug, but misleading. The catch block correctly catches failures.

2. Windows root-directory edge case in cwd fallback

// opencode-bridge.ts:2327
const workingDirectory = globalScope || !cwd || cwd === "/" ? homedir() : cwd;

The cwd === "/" check guards against Linux root but doesn't cover Windows drive roots (e.g., C:\). If cwd is ever a bare Windows drive root, spawn could fail or behave unexpectedly.

Severity: Low — unlikely in practice since the app's cwd management probably doesn't produce bare drive roots on Windows.


No issues found in:

  • server/web-server.ts — isWithinAllowedRoot using path.relative is a correct drop-in replacement that properly handles Windows backslashes and eliminates false prefix matches.
  • src/App.tsx — suppressBootErrors is cleanly wired; the effect dependency array is complete and the guard prevents toasts during onboarding.
  • src/components/SetupWizard.tsx — Scrollable, closable card with proper responsive padding; close button correctly calls onComplete and cleans up state.
  • opencode-bridge.ts — npx.cmd, shell: process.platform === "win32", and homedir() fallback are all correct patterns for Windows compatibility.

Summary

Well-structured, focused PR. The Windows path fix (isWithinAllowedRoot) is the most important change, properly fixing the slash-prefix matching bug. The remaining changes are sensible UX improvements with no correctness issues.

Confidence Score: 5/5

New%20session%20-%202026-06-12T01%3A09%3A01.593Z
opencode session  |  github run

@touch2be
touch2be merged commit fee2ada into master Jun 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant