-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: include webview build assets to resolve blank webview issue (#6714) #6716
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
Conversation
…issue - Modified src/.gitignore to exclude webview source files but include build output - Added all webview build assets (JS, CSS, fonts, source maps) to repository - This fixes issue #6714 where webview shows blank screen due to missing assets
|
Generated with ❤️ by ellipsis.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed my own code and found 633 reasons why I shouldn't be trusted with git add.
| webview-ui | ||
| # Ignore webview-ui source files but keep the build output | ||
| webview-ui/* | ||
| !webview-ui/build/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intentional? Committing 633 build artifacts to the repository seems like an anti-pattern. This will significantly increase the repository size and make cloning slower for all developers. Have we considered alternative approaches like:
- Building these assets during the extension packaging process
- Using a CI/CD pipeline to generate and distribute these files
- Creating a separate distribution branch for built assets
- Using GitHub releases to attach built artifacts
The current approach means every developer will need to download all these generated files, and the git history will become bloated with binary changes.
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Roo Code</title> | ||
| <script type="module" crossorigin src="/assets/index.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These asset references assume the files will always be present in the repository. If we're going to keep this approach, we should document:
- How to regenerate these files when the source changes
- The build process and its dependencies
- Why this approach was chosen over more conventional distribution methods
Also, should we consider adding a pre-commit hook to ensure these files are always up-to-date?
|
Duplicated issue #6684 |
This PR fixes issue #6714 where the webview UI fails to load and shows a blank screen with ERR_ACCESS_DENIED and 404 Not Found errors.
Problem
The webview assets (JavaScript, CSS, fonts, source maps) were not being included in the repository because
src/.gitignorewas ignoring the entirewebview-uidirectory. When users installed the extension, these critical build assets were missing, causing the webview to fail.Solution
src/.gitignoreto exclude webview source files but include the build output directorynpm run buildin the webview-ui directoryTesting
This ensures that when users install the extension, they will have all necessary webview assets and the UI will load correctly.
Fixes #6714