Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ these entries stays in the GitHub releases and the Git history.

## Unreleased

### Changed

- Open the developer page on the interface, over the whole window, once the project has a preview; the terminal moves to a floating, movable window behind a tab on the right edge that shows the session's state, and keeps its session when collapsed. Its shortcut is F9, or the manifest's new optional `developer.terminalShortcut`. Environment sources 0.9.1, not published yet (#539, `docs/DEVELOPER_ENVIRONMENT.md`).

### Fixed

- Build with `-DWEBFRONT_EMBED_CEF=ON` on Linux aarch64 instead of failing on `-m64`, and cross-compile CEF: WebFront pins CEF 156.0.28, whose package selects the archive and `PROJECT_ARCH` from the target (#523).
Expand Down
58 changes: 53 additions & 5 deletions docs/DEVELOPER_ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ installed or required (see [Type checking](#type-checking-wf-check)).
The generated `DeveloperReleaseData.hpp` selects the default environment and its integrity. Published
versions stay immutable. Environment **0.6.3** adds automation API v1 and the shared human/agent execution
lease; version 0.6.2 predates that API. Environment **0.6.4** adds the project setup operations of the automation
runner (`init`, `create`, `install`, `restore`, `embed`). Environment **0.6.6** adds the `call` operation, the terminal and `wf help` notice of automation and the starter's `AGENTS.md`. The release pin selects 0.6.6, published under the dedicated
runner (`init`, `create`, `install`, `restore`, `embed`). Environment **0.6.6** adds the `call` operation, the terminal and `wf help` notice of automation and the starter's `AGENTS.md`. It was published under the dedicated
`developer-v0.6.6` tag and verified after deployment. The test bootstrap (`cmake/WebFrontBootstrap.cmake`) stays on the
published 0.6.3 and advances in a separate pull request. Publication and pin changes follow
published 0.6.3 and advances in a separate pull request. The sources advance to **0.9.1** (the page layout: full-window
interface and floating terminal, #539), which is not published yet; the release pin stays on the published 0.9.0. Publication and pin changes follow
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
[PUBLISHING](../js/developer/tools/PUBLISHING.md).

## Minimal C++ application
Expand Down Expand Up @@ -180,15 +181,17 @@ A project has one manifest, which every `wf` command reads:
"entries": {"main": "ui/main.tsx"},
"providers": {"LifeUI": {"entry": "main", "output": "generated/LifeUI.hpp"}},
"test": {"specs": []},
"permissions": {}
"permissions": {},
"developer": {"terminalShortcut": "F9"}
}
```

Only `format`, `name` and `version` are required. Validation is strict: an unknown key, a format
newer than the environment reads, a path leaving the project, a non-HTTPS registry or origin and an
unknown permission are errors printed in the terminal, never silently ignored. `scripts` and `permissions` are
used by `wf run` and `wf exec` (below); `test.specs` lists the spec files of `wf test`. Permissions only frame
the operations of the `context` API of scripts; they are not a sandbox.
the operations of the `context` API of scripts; they are not a sandbox. `developer.terminalShortcut` (environment 0.9.1;
an earlier environment refuses the key) is the shortcut of the [terminal window](#the-page-interface-and-floating-terminal).

- `wf init [name]` writes `webfront.project.json` at the project root (or in the application's manifest directory, below),
the manifest every `wf` command reads; it never replaces an existing one. When a lock already exists (a project installed before
Expand Down Expand Up @@ -365,6 +368,51 @@ wf check
terminated with `worker.terminate()` after the two-second grace period. The exit code is 130 (Ctrl+C) or 124 (time
limit), and the terminal stays usable.

## The page: interface and floating terminal

The page of `bootstrap("developer")` shows one thing at a time by default (environment 0.9.1, #539; the layout belongs to the
environment's `mount`, not to the embedded bootstrap page):

- **No interface yet** (first launch, or a project that never ran `wf dev` or `wf preview`): the terminal alone, under the
status line. No tab and no empty preview are shown, also when the first build of `wf dev` fails: its diagnostic is in
the terminal.
- **An interface exists**: the page opens on it, over the whole window, with the terminal collapsed. "Exists" means a
published preview, `.webfront/developer/preview/index.html`. `wf dev` and `wf preview` publish it; `wf create` and
`wf build` (which publishes under `build/`) do not. A publication replaces the directory in one step, so an interrupted
`wf dev` or a failed build leaves the last successful interface, which the next launch shows as it was built: run `wf dev`
to rebuild it.
- **The tab** with the WebFront swallow, against the right edge of the window over the interface, opens the terminal in a
**floating window**; the tab again, the window's close button or **F9** (in the terminal or in the interface) collapses it. Collapsing only
hides the terminal: the session, its scrollback, the line being typed and a running command (`wf dev`, `wf test`) are
kept, and the keys go back to the interface. The first preview of a session leaves the terminal open over the interface,
since it is in use. A notice of automation opens it, so that the notice is seen.
- **Moving and resizing**: drag the title bar, or focus it and use the arrow keys (Shift with an arrow key resizes); the
bottom-right corner resizes with the pointer. The window stays inside the browser window, shrinks with it and returns to
its place when there is room again; xterm.js is fitted to it. Its place and size are kept per project in
`.webfront/developer/terminal-window.json`.
- **The tab shows the session's state**, so that a collapsed terminal still tells what it does: three bars when nothing
runs, a ring while a command runs or `wf dev` builds, a full dot when `wf dev` has built the interface and watches its
inputs, an amber diamond when the last build failed. The tab's name and tooltip say it in words.
- **The shortcut** is F9 by default. The developer page takes it before the interface does: the page of a preview
announces its window before its scripts run (one inline script, absent from `wf build` and from an embedded
application), so the page's listener is the first of that window and no listener of the application sees the shortcut.
A frame that the application embeds is covered once the page has seen it, after any listener its own document installs
while loading; so is a preview published by an environment before 0.9.1, until `wf dev` or `wf preview` rebuilds it.
An application that uses
F9 itself names another one in its manifest, and receives F9 as it does in its embedded form:
`"developer": {"terminalShortcut": "Ctrl+Shift+F9"}`. A shortcut is a function key, F1 to F12, optionally after `Ctrl`,
`Alt`, `Shift` or `Meta`, joined by `+`; anything else is a manifest error. The page reads it when it opens: relaunch
the application after changing it. The tab's tooltip names the shortcut in use.
- While the terminal is collapsed, `wf dev` keeps reloading the full-window interface, and a failed build still shows its
diagnostic over it.

The tab is a button (`aria-expanded`, 44 px target) and the window a non-modal dialog. The interface stays in the preview
frame, as before: the layout adds nothing to the application's documents except the shortcut's listener and the preview page's announcement, installed in the interface
and in the same-origin frames it embeds (not in a frame of another origin, nor one inside a shadow tree: click the interface
or the tab first). This is a layout, not a
sandbox (see [limitations](#dependencies-storage-and-limitations)). A page that mounts the terminal itself (`runtime.mount`) with a preview frame gets
the same layout; `workspace: false` keeps the page as it is.

## The terminal and the application's commands

The terminal of the environment (developer distribution 0.5.0, #308) is the only WebFront terminal; it is served
Expand Down Expand Up @@ -705,7 +753,7 @@ WKWebView and all 14 Linux CEF/Xvfb cases with both GCC and Clang in
The packed 0.3.0 version passes WKWebView and all 14 GCC CEF/Xvfb cases in
[run 39490581423](https://github.com/ambroise-leclerc/WebFront/actions/runs/39490581423).
For Linux, select CEF and Xvfb instead; the same developer tests use the selected test frontend.
`DeveloperBrowserIntegration` (the application part: starter, build, `wf dev`, Life preview, embedding) and `DeveloperBrowserIntegration-scripts`, `-typescript`, `-jasmine` and `-terminal` exercise, in parallel and each from its own project, the real WASM compiler, local registry, `wf test` under the locked jasmine-core (pass, fail, pending, asynchronous failures, pattern, time limit, Ctrl+C, non-interactive report to C++), build without navigation, incremental dev reload/error/recovery/Ctrl+C, the Life preview, C++ generation/animation and repeatable header generation. Its CTest fixtures then build that
`DeveloperBrowserIntegration` (the application part: starter, build, `wf dev`, Life preview, embedding) and `DeveloperBrowserIntegration-scripts`, `-typescript`, `-jasmine`, `-terminal` and `-workspace` (the page layout: first launch, launch on an existing interface, floating terminal and its session) exercise, in parallel and each from its own project, the real WASM compiler, local registry, `wf test` under the locked jasmine-core (pass, fail, pending, asynchronous failures, pattern, time limit, Ctrl+C, non-interactive report to C++), build without navigation, incremental dev reload/error/recovery/Ctrl+C, the Life preview, C++ generation/animation and repeatable header generation. Its CTest fixtures then build that
**browser-generated** header and run `LifeEmbeddedIntegration` from an empty working directory
with no developer callbacks.
Deadline and grace-period regressions advance a scoped clock instead of sleeping for seconds; Worker startup,
Expand Down
6 changes: 4 additions & 2 deletions docs/PROJECT_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ WebFront is a header-only C++23 HTTP/WebSocket core plus a standalone developer
`install`, `restore`, `run`, `exec`, `check`, `test`, `build`, `dev`, `preview`, `embed`, `list` and `help`. The manifest and lock describe
dependencies, entries, providers, scripts and permissions. TypeScript/TSX compilation uses
esbuild-wasm; type checking uses the project's locked TypeScript. Application commands use
`webfront::Commands`. See the [developer reference](DEVELOPER_ENVIRONMENT.md).
`webfront::Commands`. From environment 0.9.1 (sources; the pin is still 0.9.0), a project that has a preview opens
on its interface over the whole window, with the terminal in a floating window behind a tab on the window's edge. See the
[developer reference](DEVELOPER_ENVIRONMENT.md).
- **Distribution.** `wf embed` generates the application's compressed C++ provider.
`NativeAppWithAssets<Provider>` runs without project files, developer callbacks or tool cache.
Native-engine deployment remains application work. The [README walkthrough](../README.md)
Expand All @@ -32,7 +34,7 @@ WebFront is a header-only C++23 HTTP/WebSocket core plus a standalone developer
native attachment. This does not discover arbitrary processes or isolate untrusted project code.
An application opts in to being driven with `automation::enableAutomation` (its own window and callbacks), shared sessions are
listed by `webfront-agent --list`, and `--print-mcp-config` generates the client configuration. The owner may allow-list application callbacks that an agent reaches through the `call` operation, and the terminal, `wf help` and
the starter's `AGENTS.md` announce automation (environment 0.6.6). Environment 0.6.6 is published and pinned.
the starter's `AGENTS.md` announce automation (environment 0.6.6). Environment 0.6.6 is published; the release pin selects 0.9.0.
- **Maintaining WebFront.** The repository is itself a `wf` project, selected with
`--manifest-dir js/developer`. Build and publish its environment using
[PUBLISHING](../js/developer/tools/PUBLISHING.md). Regenerate the core's versioned headers
Expand Down
15 changes: 8 additions & 7 deletions js/developer/environment/bundles.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"LICENSE": "0b96b3ed27eb64ba777eaa049093d0047c7f9a4e690b6e68b52fde2844226ccd",
"js/developer/environment/manifest.mjs": "8a655810fd7bd380d861adad9a7870bb677fd530483cf9113ca240e03facdce5",
"js/developer/environment/manifest.mjs": "98203e18e4c85b806d03db9fe52d619cc6d8d5e8acf267daeb6944c2b7956806",
"js/developer/environment/project.mjs": "280cced29e41bc48d5d9d69934186ababfdbbc9dc32ed9517e17af4f19d3bd73",
"js/developer/environment/installer.mjs": "1159404b151dc8c580d9a155a9ec0dfa3fcb6a8e073d8586d29b329ce91b741b",
"js/developer/environment/restore.mjs": "cdd22eebd55d68bd705685cd5ee3059e228a35053eaad116ab99c4c05b908098",
Expand All @@ -17,11 +17,12 @@
"js/developer/environment/packages.mjs": "37fe2a410e211264cfeaedbff3df50f7e62b02f8088130127d94f92081e2a5ad",
"js/developer/environment/starter.mjs": "89ccab43be4455ed9598c54355b4bbe5adea1afd7a0ae5d755a14317e3ca39df",
"js/developer/environment/paths.mjs": "3b6114df78eb193161c5c84499dda084cb7ff91c56a4496371c30295d00880e3",
"js/developer/environment/runtime.mjs": "19ea1924209915bbdb517212d5c2bc25cbb1b39ea3fde898b86efeab8c6ba220",
"js/developer/environment/runtime.mjs": "5ce088084c84874e143e7e3f5e4d55d7151064f01c0137071343880dfa4acd4d",
"js/developer/environment/automation.mjs": "79405c89ba7025c1774bc13c9b78d814a07592755dcde018c8659a8015c4b8ed",
"js/developer/environment/development.mjs": "1125043016727111031a452fbebec358b9e78231f82fe91df7dea0fe8b22f015",
"js/developer/environment/development.mjs": "168a2619c4d74544eed2b2ae1121e87c3afc776dc6140a3c7d1ba1d0d6168cd8",
"js/developer/environment/testing.mjs": "aeb584505fab5957b9c02e78536e12f7d7f3d12f8adb2e17f1a1a6e395e43f3c",
"js/developer/environment/terminal.mjs": "7ffcf7ac6ef63c35cdf5ef70284b384525b13ba18422af069289e53b6c4f6be1",
"js/developer/environment/workspace.mjs": "4fe794b140515579c4f80a226d8b1beca254a3488e2e4d9f6ba580e077a11558",
"js/developer/environment/tarball.mjs": "1c1e1aea067910e1fec74e85b4bf9fbefed9b38187a04d8d2764f0b9a96fca39",
"js/developer/environment/commands.mjs": "8de20c01f02f33c0566f204fcf1ee2382a23344d2103581fe2914469ec570531",
"js/developer/environment/compiler.mjs": "0158931132aa9b43b7bbbd01de6fa4fc34fce8c65515d593dd494930f7a1910f",
Expand All @@ -36,15 +37,15 @@
"js/developer/environment/pins.mjs": "df07f6f01edaf86a1052d0e76f6c6745cb6e7a3309bbd256ac720ee8adc85297",
"js/developer/environment/peers.mjs": "e1d999892138682fc0134ef1f4d4b19b9a9ad8d7fb16e37fc9c6c684bd853896",
"js/developer/environment/resolve.mjs": "8b96b850af215be51f5cb85cc9c69e057afa04dfb8a57e572620c07059c17fa3",
"js/developer/environment/embed.mjs": "3e6bc10200939fa30d5f60a96f01eb33ddf3da87661390ad433a18366bf52547",
"js/developer/environment/embed.mjs": "3d3b5036c34c23a1fa0512c1eea42f26d5f30e054545b61fe83a5c378b74e09e",
"examples/life/ui/main.tsx": "7b1ff285d2a6b8f897ef12df872886e61ef4b24e2358a9423b76b38ab75c85d3",
"examples/life/ui/style.css": "9bb55eb0f0a3287e5b7dc78af9d69608b87ff42c4d9c8a653bc83a52fe293c44",
"js/developer/tools/distribution.json": "a9314cb421c6113c0bb901bc57247e2373bf2670f65d1708923241940f6133db",
"js/developer/tools/distribution.json": "0de03c0bd22fdcfe87c686d6c1456d26eeb57b09b03d0d680bb81557906f31a0",
"js/developer/tools/archive.mjs": "da63bb9d796ddfd24ed945b15c53f66a0400eb177886fd4f1c8fd10cafb5a91b",
"js/developer/tools/distribution.mjs": "43dfdccc912693db46fd095fd78ae79325abab672d99f89fd569914ef3499cad",
"js/developer/scripts/build.mjs": "def3c0ccecbc776b76e20571d015f9a1f23a267c0bd6c0c7a07a81ce9293a663",
"js/developer/webfront.project.json": "3c25620969d4cb3dcb7ed01ada2cd72f56f9e2660d67433ca2133e0be6211a9c",
"js/developer/webfront.project.json": "6f4f56783012a792ca8eb1ac8a1ca0be51e6fcc83d760545d65da67c8687dd61",
"js/core/bootstrap/bootstrap.bundle.mjs": "536831257f0fc92e31911841750e1e59247f7c64e756b0fcb878efd9860a741f",
"js/developer/environment/packages.bundle.mjs": "2d62f3fcdece8e898f15814d7e80fc3a27ea062f45514cf8e5c3ae32fd9d26c5",
"js/developer/environment/packages.bundle.mjs": "c9d5b0c3516b5c14e0583aa12b6f7993dd8b4290997b6281bfaacdfbcd98b9d4",
"include/webfront/system/DeveloperReleaseData.hpp": "98094418f18a0ce30f6334c94fb8a1ab2df6d9026a2203223aa11796b622b4ee"
}
Loading
Loading