Repository navigation
WebFront 1.3 ships with developer environment 1.3.0. The developer environment gains inspectors of the running application
(registered functions, browsers and tasks, watches declared with app.watch, locked packages, the bridge), which an agent can
also read through MCP; one process can serve several independent users with application spaces, under a sub-path of a site;
a plain interface directory can be embedded from CMake; and the BDD framework splits into lighter headers. It has breaking
changes: Ctrl+C in the terminal, custom frontends that prove their view, the reserved webfront.inspector. names and external
tools that write the project; each entry below gives its migration.
Breaking
- In the developer environment's terminal, Ctrl+C no longer interrupts a command nor clears the line: press Escape (with no text selected) or the terminal's Stop button; the interruption is unchanged (exit code 130,
webfront.commands.cancel, the grace period of scripts, statusinterrupted), its messages sayinterrupted(#721,docs/DEVELOPER_ENVIRONMENT.md). - A custom frontend whose
open()takesconst ViewLaunch&declaresstatic bool providesViewProof(),truewhen it gives the proof to its view andfalseotherwise, or the developer environment no longer compiles with it: undeclared, its proven view would leave project writes and C++ commands unguarded (#680, ADR-027,docs/FRONTENDS.md). cppFunction(andSpace::cppFunction) refuses the names starting withwebfront.inspector., reserved to the inspectors, withstd::invalid_argument: rename such a function, and itswebFront.cppFunction(...)calls in the page, to a name of your own (#680, ADR-027).- An external tool that writes the project (
webfront.developer.*writes) or starts terminal commands (webfront.commands.start,cancel) through the bridge is refused withwebfront.inspector.deniedwhen the frontend proves its view: run it in that view, use MCP automation, or settrustLoopbackClientsknowingly (#680, ADR-027,docs/DEVELOPER_ENVIRONMENT.md).
Added
- Copy, paste, cut and select all in the terminal of the developer environment with the system's shortcuts, Ctrl+C/V/X/A (Cmd on macOS), on CEF, WebView2, WebKitGTK, WKWebView and a system browser: they no longer become control characters, and a paste of several lines still runs them one after the other (#721,
docs/DEVELOPER_ENVIRONMENT.md). - Open the inspectors from the WebFront tab's menu, floating in the page or detached to a native window: Functions (TypeScript signatures, calls, failures, durations;
app.registeredFunctions()in C++), Browsers and tasks, Packages (the lock as a tree withwf whychains) and Bridge (webFront.ready, pending calls, rejected Promises) (#680, #681, #683, #684, ADR-027,docs/DEVELOPER_ENVIRONMENT.md). - Declare watches with
app.watch(name, source), whose handle removes the watch, and explore them in the Watches panel as a tree refreshed while the interface runs, by pages, with a pause and the changed values highlighted; a distribution build registers nothing (#680, #682, #723, ADR-027,docs/WATCHES.md). - Choose how a watch reaches its object (a visitor under your lock, a reference on its executor, a copy, a source owning its state), page a large container with
inspect::PagedSource, and edit a writable watch (Visit<T>) in place, applied only if the target still shows what was displayed (#682, ADR-027,docs/WATCHES.md). - Let an agent read the running application through MCP with the
stategrant (webfront.state.*: registered functions, calls to JavaScript, browsers and tasks, watches, read-only) and the locked packages with thepackagesgrant (list,why,info, environment 1.2.1 or later) (#685, ADR-027,docs/DEVELOPING_WITH_AGENTS.md,docs/AUTOMATION.md). - Embed a plain interface directory (HTML, JavaScript, CSS, vendored files) from CMake with
webfront_embed_directory(app ui CLASS AppUI), without the developer environment: the build regenerates the provider when a file changes, andfs::DocumentRootFirstFSWith<AppUI>lets a development root serve in front of it (#675,docs/EMBEDDED_ASSETS.md). - Set from the configuration
Referrer-Policy(contentPolicy.referrerPolicy:"no-referrer"forbids explicitly that a capability in your URLs leaves inReferer),X-Content-Type-Options: nosniff(noSniff) and theCache-Controlof HTML pages (htmlCacheControl), on files, route and generated replies unless a reply sets its own (#674,docs/CONTENT_POLICY.md). - Keep a capability carried by your URLs out of WebFront's logs with
app.addSecretPrefix("/s/"): the segment after the prefix is logged as*(/s/*/index.html) for files, routes, WebSocket upgrades and their failures, whose error messages are not logged (#673,docs/HTTP_ASSETS.md). - Serve several independent users from one process with application spaces:
app.spaces("/s/", resolver)gives each/s/<id>/its owncppFunctions, page handlers, broadcasts and routes (WebFront::Space) and tells the application when its last page closes;ui.path()gives the path from which a browser opened its bridge (#671, #672,docs/SPACES.md). - Write tests with lighter headers and richer checks:
<webfront/testing/bdd/Core.hpp>and only the parts a file uses,checkEqual/requireEqualreporting both operands (webfront::bdd::Printerfor your types),approx(v)with.epsilon()and.margin(), and arunEndinglistener called before the summary and the JUnit report (#669,docs/BDD.md). - The test helpers,
webfront_add_jasmine_testincluded, export the realXDG_DATA_HOMEandXDG_CACHE_HOMEasWEBFRONT_TEST_REAL_XDG_DATA_HOMEandWEBFRONT_TEST_REAL_XDG_CACHE_HOME, so an application under test can keep the throwaway WebKitGTK profile away from the programs it starts (#664,docs/CONSUMER_TESTING.md).
Changed
- Detach and attach an inspector panel with small icons, a frame with an arrow leaving it or entering it, instead of the Detach and Attach words; their tooltip and accessible name say the action, and a greyed detach icon still says why (#722,
docs/DEVELOPER_ENVIRONMENT.md). wf teststopped at its time limit or by an interruption says how far its runner got, in its message and in the report's newstage: the last step reached, the spec in progress, and the runner files that never finished loading (#690,docs/DEVELOPER_ENVIRONMENT.md).- Destroying the handle of a watch (
inspect::Watch) waits for an operation of the inspectors in progress on another thread: destroy it outside every lock its source takes, or declare the watch with the state it owns (#682, ADR-027,docs/WATCHES.md). cppFunctionandSpace::cppFunctiontake a last, defaultedstd::source_location, which the inspectors show; existing calls compile unchanged, the explicitcppFunction<R, Args...>form included (#681, ADR-027).- Document the security contract of the application's callbacks: one that writes the project or what the server serves, starts a process or exposes a sensitive state takes the calling
UIand checksui.isLocalClient(), since WebFront guards only its own functions (#686, ADR-027,docs/DEVELOPING_WITH_AGENTS.md). WebFront.jsopens its WebSocket on the directory of the page (ws://host/dir/instead ofws://host), which tells the server a page's space (#671) and lets an application be deployed under a sub-path of a site (#672).- A file request whose path holds a control character (
%00...) is refused with 400, as a..already was, and a+in its path is a literal+, as for the routes, the spaces andui.path():/a+b.htmlservesa+b.html, which/a%20b.htmlno longer shares (#672).
Fixed
- A client connected to the MCP listener when it closes, because the session closed or the application stopped, and completes its request within a second reads its answer (a closed session says so) instead of a connection reset; a request that arrived just before its peer's two-second deadline is served rather than reset (#720,
docs/AUTOMATION.md). - A closed secondary window disconnects at once, its WKWebView page closed explicitly and never suspended while inactive on macOS 14+, its WebView2 page navigated to
about:blankfirst, and a WebView2 one opened while the first starts waits for its load (#681, #702, #708, #716,docs/WKWEBVIEW.md,docs/WEBVIEW2.md). - A WKWebView page whose web content process ends says why: its memory or CPU limit, the application's request, or a crash of the WebKit engine, which
DeveloperBrowserIntegration-jasminemet on the macOS runner while esbuild ran in its Worker, instead of only that the process terminated (#706,docs/WKWEBVIEW.md). webfront.sessionnames the native deadline that revoked a session (revocation:operation-deadlineorstartup-deadline, empty otherwise), andSession::revokedBy()gives it in C++:AutomationMcpWatchdogno longer fails when the window closes after the deadline, since its host recognised only a reason that the deadline never wrote (#709,docs/AUTOMATION.md).- An invalid content policy (an origin of
bridgeAllowedOriginsornavigationAllowedOrigins, areferrerPolicy, ahtmlCacheControl) throwsstd::invalid_argumentbefore the server binds its port, as documented, instead of an "address already in use" error when that port is taken (#674). - Browser tests that a loaded runner failed:
CEFLifecycle-navigation-allow-listcounts only the cancellation of its own navigation (#731),WebFrontBrowserIntegrationon CEF has 120 s and awf teststopped by the driver's limit names the stage it reached (#730), andDeveloperBrowserIntegration-workspacegives the relaunched page 60 s to start and to draw its collapsed terminal's prompt (#660, #729). - Applications started from the terminal of a Snap-packaged editor (VSCodium) now run on WebKitGTK without cleaning the environment by hand;
WEBFRONT_KEEP_SNAP_ENVIRONMENT=1opts out (#662,docs/WEBKITGTK.md).
Security
- Require an admitted client for developer project writes and native terminal commands when the frontend proves its view (ADR-027, #680).