Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 25, 2025

Summary

This PR fixes two issues reported in #6218:

  1. Test ErrorBoundary button visible in production: The "Test ErrorBoundary" button in the About component was showing in production builds when it should only be visible during development.

  2. Claude CLI command not found error: When using the claude-code provider without having the Claude CLI installed, users were getting an unhelpful ENOENT error.

Changes

1. Hide Test ErrorBoundary button in production

  • Added a check for process.env.NODE_ENV !== "production" to conditionally render the Test ErrorBoundary button
  • The button is now only visible during development

2. Improve Claude CLI error handling

  • Added try-catch block around the execa call in runClaudeCode
  • When an ENOENT error occurs (command not found), we now show a helpful error message with:
    • Clear indication that the Claude CLI is not found
    • Installation instructions
    • Link to the Claude CLI repository
    • Information about specifying a custom path in settings

3. Added tests

  • Added comprehensive tests for the new ENOENT error handling
  • Tests cover both default and custom path scenarios
  • Tests ensure non-ENOENT errors are rethrown unchanged

Testing

  • All existing tests pass ✅
  • New tests added for error handling ✅
  • Manually tested that the Test ErrorBoundary button is hidden in production builds
  • Type checking passes ✅
  • Linting passes ✅

Fixes #6218


Important

Hide "Test ErrorBoundary" button in production and improve runClaudeCode error handling for missing Claude CLI.

  • Behavior:
    • Hide "Test ErrorBoundary" button in About.tsx during production by checking process.env.NODE_ENV.
    • Improve error handling in run.ts for runClaudeCode by catching ENOENT errors and providing a helpful message.
  • Testing:
    • Add tests in run.spec.ts for ENOENT error handling, covering default and custom path scenarios.
    • Ensure non-ENOENT errors are rethrown unchanged.

This description was created by Ellipsis for 08188ad. You can customize this summary. It will automatically update as commits are pushed.

…CLI error handling

- Hide the Test ErrorBoundary button in production builds by checking process.env.NODE_ENV
- Add better error handling for missing claude CLI command with helpful installation instructions
- Add tests for ENOENT error handling in claude-code integration

Fixes #6218
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 25, 2025 19:35
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working UI/UX UI/UX related or focused labels Jul 25, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 25, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Jul 28, 2025
@daniel-lxs
Copy link
Member

Duplicate #6215

@daniel-lxs daniel-lxs closed this Jul 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 28, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jul 28, 2025
@daniel-lxs daniel-lxs deleted the fix/issue-6218-error-boundary-and-claude-cli branch July 28, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Something went wrong (v3.23.19) -

4 participants