Skip to content

Make Glaze native-GUI only and fail fast on missing WebView - #6

Merged
turinglambdaai merged 29 commits into
mainfrom
fix/gui-first-webview-feedback
Sep 20, 2026
Merged

turinglambdaai merged 29 commits into
mainfrom
fix/gui-first-webview-feedback

Conversation

@turinglambdaai

@turinglambdaai turinglambdaai commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Summary

Make Glaze consistently behave as a native desktop GUI framework instead of silently degrading into a browser application.

GUI-first behavior

  • raco glaze init now scaffolds a native run-app entry point.
  • raco glaze dev runs the project's actual main.rkt, so development and packaged apps use the same native path.
  • Removed #:fallback-browser? from run-app, open-window, and open-webview.
  • Native WebView startup failures are fatal; the underlying backend error is preserved.
  • If run-app has already started its local server and native window creation fails, the server is shut down before the exception is propagated.
  • open-browser remains only as an explicit utility for external documentation/OAuth/support URLs; it is never an application-startup fallback.

Actionable dependency feedback

  • Windows: directs users to Microsoft Edge WebView2 Runtime (Evergreen), includes the winget command and Microsoft's official download page. Glaze still ships WebView2Loader.dll.
  • Linux: names GTK 3 / WebKitGTK packages and the graphical-session requirement.
  • macOS: explains that WKWebView is built into macOS and preserves the initialization error for diagnosis.
  • Packaged GUI applications also attempt to show an OS-level error dialog before exiting, because Windows raco exe --gui applications may have no visible console. CI suppresses dialogs automatically; GLAZE_NO_STARTUP_DIALOG=1 disables them explicitly.

CLI, packaging, examples, and docs

  • The generated main.rkt uses top-level run-app; this is required because build-app's generated wrapper loads the entry with require, so a module+ main-only scaffold would not start after packaging.
  • examples/webview-demo.rkt is now explicitly cross-platform and native-only.
  • README / README.zh-CN / Scribble / maintainer docs now describe the GUI-first contract and platform prerequisites consistently.
  • Added docs/gui-first.md.

Tests and fixes exposed by CI

  • Added glaze-test/gui-first-test.rkt to prevent reintroduction of #:fallback-browser? and verify dependency guidance.
  • Fixed the AppKit menu e2e gate so the macOS-only Objective-C test cannot run on Windows merely because WebView2 is available.
  • Fixed two small pre-existing CLI parser issues encountered while touching the scaffold: --timestamp-url now preserves URL schemes, and license sign|verify subcommand detection correctly handles the initial #f state.

Compatibility note

This intentionally removes the old browser-fallback API. Callers that passed #:fallback-browser? must remove it; native WebView availability is now a startup prerequisite.

@turinglambdaai
turinglambdaai marked this pull request as ready for review September 20, 2026 09:36
@turinglambdaai
turinglambdaai merged commit 1ec954d into main Sep 20, 2026
9 checks passed
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.

1 participant