Conversation
- Guard window width/height, frame bounds, and opacity against Infinity/NaN values that crash System.Text.Json on GTK - Log request errors with type and message instead of silently swallowing
- AddMauiBlazorDevFlowTools() now auto-wires CDP to Agent and starts WebView discovery — no manual WireBlazorCdpToAgent() call needed - WebView discovery scans visual tree for BlazorWebView, extracts WebKit.WebView from handler's Gtk.Box platform view - Inject chobitsu.js from embedded resource when not present in page (no manual script tag needed in wwwroot/index.html) - Verified end-to-end: all MAUI and CDP commands work on Linux/GTK
- Agent.Gtk now registers with the broker daemon on startup (same pattern as standard Agent) - Reads project/TFM from assembly metadata for agent identity - Reports platform as 'Linux' for broker agent list - Auto-reconnects to broker if started after the app - Falls back to .mauidevflow/default port if broker unavailable
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.
This pull request introduces several improvements and bug fixes to the MauiDevFlow Agent and Blazor GTK integration, focusing on more robust WebView discovery, safer numeric handling, improved logging, and better resource management. The most significant changes are grouped below:
Blazor WebView Discovery and Initialization:
GtkBlazorWebViewDebugServiceto automatically locate and capture theWebKit.WebViewused by BlazorWebView, improving reliability of CDP (Chrome DevTools Protocol) integration on Linux. This includes visual tree traversal and type-safe extraction of the WebView.AddMauiBlazorDevFlowToolsextension now automatically wires the Blazor CDP service to the agent and starts WebView discovery after app startup, reducing manual setup. [1] [2]Robustness and Error Handling:
double.IsFinitebefore reporting them in the agent's status and visual tree APIs, preventing NaN/Infinity issues. [1] [2] [3]Console.WriteLinefor better visibility in production and development environments. [1] [2] [3]WebView JavaScript Injection Improvements:
chobitsuand inject it from an embedded resource if missing, with improved verification and logging of the injection process.Resource Management:
GtkBlazorWebViewDebugServiceto avoid resource leaks.