← Back to PRs

#9227: Fix: Windows Web UI shows 'brew not installed' for all skills

by vishaltandale00 open 2026-02-05 01:16 View on GitHub →
agents stale
## Summary Fixes #9216 where the Web UI Skills panel shows 'brew not installed' on native Windows and marks many skills as 'blocked', even though the CLI (`clawhub install`) works fine. ## Problem Analysis The `selectPreferredInstallSpec` function was returning brew install specs even when Homebrew wasn't available. This caused skills with ONLY brew specs to show install buttons in the Web UI that would fail immediately on Windows with 'brew not installed'. The CLI works because it has different logic, but the Web UI was offering brew installation regardless of platform. ## Solution Implemented ### 1. Smart Install Spec Selection (skills-status.ts) - **Line 101-103**: Added `hasBinary('brew')` check before returning brewSpec - **Line 108-117**: Added fallback logic to filter out brew specs when brew is unavailable - Skills with alternative install methods (npm, download, go, uv) will now be preferred on Windows ### 2. Platform-Specific Error Messages (skills-install.ts) - **Line 386-393**: Check `process.platform === 'win32'` - **Windows**: "brew not available on Windows (use CLI: clawhub install <skill-name>)" - **macOS/Linux**: "brew not installed" (original message) ## Impact **Before:** - Skills with ONLY brew specs showed install button on Windows - Clicking install → immediate 'brew not installed' error - User confused: "Why does the UI offer an install button that doesn't work?" **After:** - **No install button** shown for brew-only skills on Windows (empty `install` array) - **Alternative installers** (npm, download, etc.) are preferred and shown - **Clear error message** if brew install somehow attempted: guides to CLI workaround ## Testing Verification - ✅ TypeScript compilation passes - ✅ Code formatted with oxfmt - ✅ Logic verified: brew specs skipped when brew unavailable - ✅ Fallback handles skills with multiple install options - ✅ Error message platform-aware ## Design Trade-offs **Why not hide brew-only skills entirely on Windows?** - The skills are still visible for informational purposes - Users can still install via CLI (`clawhub install <skill-name>`) - Better UX to show the skill and explain the limitation than hide it completely **Why filter at selection time vs load time?** - Maintains skill visibility in the list - Provides better error messaging - Preserves backward compatibility - Skills with multiple install options (e.g., brew OR npm) work correctly ## Environment - Tested on: macOS/Linux (CI will test on Windows) - OpenClaw version: 2026.2.3 - Affects: Web UI Skills panel only (CLI already works) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adjusts Web UI skill install option selection to avoid offering Homebrew-based installers when `brew` isn't available (notably on Windows), and updates the brew error message in `installSkill` to be platform-aware. Key changes are in `src/agents/skills-status.ts` (install spec preference / fallback selection) and `src/agents/skills-install.ts` (brew-specific error messaging). <h3>Confidence Score: 4/5</h3> - This PR is likely safe to merge, with one small correctness/maintainability issue to address. - Changes are narrow and platform-gated; I only found a comment/behavior mismatch that should be corrected to prevent confusion about intended platform scoping. - src/agents/skills-status.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs