Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fall back to js bundle when local webview app not running in development #757

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

cte
Copy link
Collaborator

@cte cte commented Feb 3, 2025

Description

I you're dev React server isn't running then fall back to getHtmlContent with an error message.

Screenshot 2025-02-03 at 9 18 59 AM

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

ClineProvider now falls back to a pre-built HTML bundle if the local dev server is not running, with updated tests and configuration.

  • Behavior:
    • ClineProvider now falls back to getHtmlContent if local dev server is not running, with an error message.
    • Updated resolveWebviewView() and getHMRHtmlContent() in ClineProvider.ts to handle server check.
  • Testing:
    • Updated tests in ClineProvider.test.ts to mock server unavailability and verify fallback behavior.
    • Added async handling in task.test.ts for resolveWebviewView().
  • Configuration:
    • Added "<rootDir>/webview-ui/src" to roots in jest.config.js.

This description was created by Ellipsis for 2ad57ba. It will automatically update as commits are pushed.

Copy link

changeset-bot bot commented Feb 3, 2025

⚠️ No Changeset found

Latest commit: 2ad57ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cte cte merged commit bf7ec31 into main Feb 3, 2025
9 checks passed
@cte cte deleted the cte/hmr-dx branch February 3, 2025 20:31
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.

2 participants