Feat: default StaticWebAssetsRuntimeFileProvider for BlazorWebView #248
Merged
AnnaSasDev merged 7 commits intocorefrom Apr 22, 2026
Merged
Feat: default StaticWebAssetsRuntimeFileProvider for BlazorWebView #248AnnaSasDev merged 7 commits intocorefrom
StaticWebAssetsRuntimeFileProvider for BlazorWebView #248AnnaSasDev merged 7 commits intocorefrom
Conversation
… asset management and update BlazorWebView architecture - Added `StaticWebAssetsRuntimeFileProvider` to support runtime static web asset resolution with composite and physical file providers. - Updated file provider configuration in `InfiniFrameBlazorAppBuilder` to improve web asset management. - Removed redundant `wwwroot` configurations from project files. - Added `InternalsVisibleTo` for test projects and introduced unit tests for `StaticWebAssetsRuntimeFileProvider`. - Enhanced solution structure with new project references and test cases.
…p://localhost` scheme in Windows WebView
…prove fallback content type handling - Unified `BlazorAppScheme` to use `app://localhost/` across all platforms, removing OS-specific logic. - Added `GetFallbackContentType` method for improved MIME type resolution. - Updated documentation to reflect changes to the internal origin scheme. - Minor code cleanup and file provider reordering in `InfiniFrameBlazorAppBuilder`. - Annotated static web asset types with `[UsedImplicitly]` to suppress inspection warnings.
…nd add unit test coverage.
…nd reorganize `StaticWebAssetsRuntimeFileProvider` internals - Moved `StaticWebAsset`, `StaticWebAssetPattern`, `NodeTraversalState`, `ManifestCandidate`, and related classes to separate files under `FileProviders.Static`. - Updated namespace references in affected files and tests for consistency. - Improved maintainability of `StaticWebAssetsRuntimeFileProvider` by restructuring internal implementations.
…setManifest` deserialization - Introduced `StaticWebAssetsManifestJsonContext` using `JsonSerializerContext` for optimized deserialization. - Replaced manual `JsonSerializerOptions` with source-generated context in `StaticWebAssetsRuntimeFileProvider`.
Contributor
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
…dling - Enhanced WebView2 initialization on Windows to validate custom scheme registration support. - Added fallback error messaging for unsupported WebView2 runtime. - Updated StaticWebAssets to use `ConcurrentDictionary` for thread safety and added deterministic tie-breaking for manifest scoring. - Expanded unit tests for `StaticWebAssetsRuntimeFileProvider` to ensure stability and correctness under concurrent access. - Updated documentation to reflect platform-specific notes for BlazorWebView initialization.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes BlazorWebView resource/module loading and trims/AOT compatibility regressions introduced around static web assets resolution and host messaging.
It standardizes BlazorWebView internal origin handling to
app://localhost, improves static web assets manifest selection/loading, suppresses noisy Blazor internal__bwv:message warnings inInfiniFrame.js, and updates docs to match runtime behavior.Type of Change
Affected Modules / Scope
Changes Introduced
app://localhostand aligned request handling/content-type fallback for module/static asset responses.System.Text.Jsoncontext.__bwv:messages (no false “No handler registered” warnings), added regression tests, and updated BlazorWebView/migration docs to reflect current internal origin behavior.Related Issues
Checklist