Skip to content

Commit ca40fce

Browse files
committed
chore(release): sync v2.7.0 modules and UI examples
1 parent ee79aea commit ca40fce

24 files changed

Lines changed: 932 additions & 167 deletions

.github/workflows/MODULE_TESTS_CI.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ jobs:
123123
-DVIX_TEMPLATE_BUILD_BENCH=OFF \
124124
-DTEMPLATE_BUILD_BENCHMARKS=OFF \
125125
-DVIX_ENABLE_UI=ON \
126+
-DVIX_CLI_ENABLE_DESKTOP=ON \
127+
-DVIX_UI_ENABLE_LINUX_WEBVIEW=OFF \
126128
-DVIX_UI_BUILD_TESTS=ON \
127129
-DUI_BUILD_TESTS=ON \
128130
-DVIX_UI_BUILD_EXAMPLES=OFF \
@@ -226,6 +228,8 @@ jobs:
226228
-DVIX_TEMPLATE_BUILD_BENCH=OFF \
227229
-DTEMPLATE_BUILD_BENCHMARKS=OFF \
228230
-DVIX_ENABLE_UI=ON \
231+
-DVIX_CLI_ENABLE_DESKTOP=OFF \
232+
-DVIX_UI_ENABLE_LINUX_WEBVIEW=OFF \
229233
-DVIX_UI_BUILD_TESTS=ON \
230234
-DUI_BUILD_TESTS=ON \
231235
-DVIX_UI_BUILD_EXAMPLES=OFF \

.github/workflows/build-safety.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ jobs:
6969
-DVIX_CORE_WITH_MYSQL=OFF \
7070
-DVIX_ENABLE_TEMPLATE=ON \
7171
-DVIX_ENABLE_UI=ON \
72+
-DVIX_CLI_ENABLE_DESKTOP=ON \
73+
-DVIX_UI_ENABLE_LINUX_WEBVIEW=OFF \
7274
-DVIX_UI_BUILD_TESTS=OFF \
7375
-DVIX_UI_BUILD_EXAMPLES=OFF \
7476
-DVIX_UI_BUILD_BENCHMARKS=OFF \

CHANGELOG.md

Lines changed: 193 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## v2.7.0
99

10-
Vix.cpp v2.7.0 introduces two new foundations for the framework: `vix::ui` for server-rendered interfaces and `vix::note` for visual, runnable C++ learning documents.
10+
Vix.cpp v2.7.0 introduces three new foundations for the framework: `vix::ui` for server-rendered interfaces, `vix::note` for visual runnable C++ learning documents, and the first CLI foundations for desktop and mobile app shells.
1111

12-
This release keeps the core framework focused while adding first-class UI and notebook workflows to the umbrella build, SDK packaging, examples, CLI, and CI validation.
12+
This release keeps the core framework focused while adding first-class UI, notebook, desktop shell, and mobile WebView workflows to the umbrella build, SDK packaging, examples, CLI, and CI validation.
1313

1414
### Added
1515

@@ -22,13 +22,15 @@ This release keeps the core framework focused while adding first-class UI and no
2222
- `vix::ui::ViewContext`
2323
- `vix::ui::ViewResult`
2424
- `vix::ui::HtmlResponse`
25+
2526
- Added HTML helpers for escaping, attributes, and small HTML generation tasks.
2627
- Added asset pipeline helpers:
2728
- `Asset`
2829
- `AssetManifest`
2930
- `AssetManager`
3031
- `AssetMap`
3132
- `AssetMode`
33+
3234
- Added support for asset versioning, manifest lookup, hashed asset paths, CSS/JS grouping, preload helpers, module scripts, and production/development asset modes.
3335
- Added server-rendered form helpers for fields, select options, checkbox/radio state, file inputs, form data binding, old values, CSRF helpers, and validation errors.
3436
- Added live UI helpers for fragments, WebSocket-friendly updates, flash messages, and toast notifications.
@@ -40,6 +42,7 @@ This release keeps the core framework focused while adding first-class UI and no
4042
- `ServerReadiness`
4143
- descriptor shell backend
4244
- Linux WebView shell backend
45+
4346
- Added platform descriptors for web, desktop, and mobile targets.
4447
- Added `examples/ui/`.
4548
- Added SDK and install support for `#include <vix/ui.hpp>`.
@@ -56,6 +59,7 @@ This release keeps the core framework focused while adding first-class UI and no
5659
- `vix::note::NoteResult`
5760
- `vix::note::NoteOutput`
5861
- `vix::note::NoteError`
62+
5963
- Added C++ cell execution through `vix run`.
6064
- Added Reply cell execution through the embedded Vix Reply runtime.
6165
- Added runtime session and kernel support for running cells, storing outputs, and tracking execution records.
@@ -66,25 +70,188 @@ This release keeps the core framework focused while adding first-class UI and no
6670
- Added Note API routes for document loading, cell editing, cell execution, cell movement, run-all, and document saving.
6771
- Added browser UI rendering for cells, execution status, outputs, and errors.
6872
- Added static HTML export for `.vixnote` lessons.
69-
- Added `vix note <file.vixnote>`.
73+
- Added `vix note` workspace mode, allowing Vix Note to start directly in the current directory without requiring an existing `.vixnote` file.
74+
- Added `vix note <file.vixnote>` for opening an existing note document.
75+
- Added `vix note --desktop` and `vix note <file.vixnote> --desktop` for opening Vix Note in a desktop WebView shell.
76+
- Added desktop shell options for Vix Note:
77+
- `--desktop`
78+
- `--shell`
79+
- `--browser`
80+
- `--width`
81+
- `--height`
82+
- `--devtools`
83+
- `--fullscreen`
84+
- `--no-resizable`
85+
7086
- Added `vix note export <file.vixnote> --out <file.html>`.
7187
- Added modern C++, Reply, and HTML `.vixnote` learning examples.
7288

89+
#### CLI desktop shell
90+
91+
- Added `vix desktop` as the CLI entry point for desktop app shell workflows.
92+
- Added `vix desktop run` for development desktop workflows.
93+
- Added simple target-based desktop run support:
94+
95+
```bash
96+
vix desktop run ui_dashboard.cpp
97+
vix desktop ui_dashboard.cpp
98+
```
99+
100+
- Added `vix desktop run --url <url>` for opening an existing local or remote web app in a desktop shell.
101+
- Added support for launching a desktop shell around a local server command:
102+
103+
```bash
104+
vix desktop run --server "vix run --force-server main.cpp" --port 8080
105+
```
106+
107+
- Added automatic desktop server environment forwarding through `SERVER_HOST` and `SERVER_PORT`.
108+
- Added `vix desktop build <target.cpp|binary>` for generating a distributable desktop folder.
109+
- Added `vix desktop package <target.cpp|binary> --target dir` as the first packaging target.
110+
- Added support for packaging an already-built server binary through:
111+
112+
```bash
113+
vix desktop build --binary ./build/my_server
114+
vix desktop package --server-binary ./build/my_server --target dir
115+
```
116+
117+
- Added generated desktop bundle layout:
118+
119+
```txt
120+
dist/<app-name>/
121+
<app-name>
122+
<app-name>.desktop
123+
vix-desktop.json
124+
bin/
125+
vix
126+
<server-binary>
127+
resources/
128+
<icon>
129+
```
130+
131+
- Added generated launcher script for running the packaged desktop app.
132+
133+
- Added generated `vix-desktop.json` manifest with app metadata, server path, URL, window size, readiness URL, and desktop options.
134+
135+
- Added generated Linux `.desktop` file for directory-based desktop bundles.
136+
137+
- Added desktop build/package options:
138+
- `--out`
139+
- `--target`
140+
- `--binary`
141+
- `--server-binary`
142+
- `--clean`
143+
- `-j`
144+
- `--jobs`
145+
- `--with-sqlite`
146+
- `--with-mysql`
147+
- `--local-cache`
148+
149+
- Added desktop metadata options:
150+
- `--name`
151+
- `--title`
152+
- `--app-id`
153+
- `--app-version`
154+
- `--version`
155+
- `--vendor`
156+
- `--icon`
157+
158+
- Added desktop shell options for app name, title, URL, host, port, size, fullscreen mode, resizable mode, devtools, startup timeout, server readiness, and package output.
159+
160+
- Added CLI integration with `vix::ui::AppShell` and `vix::ui::ShellConfig`.
161+
162+
- Added optional build detection for `vix::ui` through `VIX_CLI_HAS_UI`.
163+
164+
#### CLI mobile shell
165+
166+
- Added `vix mobile` as the CLI entry point for mobile WebView shell workflows.
167+
- Added Android WebView shell generation:
168+
- `vix mobile init android`
169+
- `vix mobile android`
170+
171+
- Added Android project generation for WebView/PWA wrappers, including:
172+
- Gradle project files
173+
- Android manifest
174+
- Java `MainActivity`
175+
- app resources
176+
- generated README
177+
- optional `local.properties` SDK detection
178+
179+
- Added Android build support:
180+
- `vix mobile build`
181+
- `vix mobile build android`
182+
183+
- Added Android run support:
184+
- `vix mobile run`
185+
- `vix mobile run android`
186+
187+
- Added Gradle wrapper generation:
188+
- `vix mobile wrapper`
189+
- `vix mobile wrapper android`
190+
191+
- Added Android device listing:
192+
- `vix mobile devices`
193+
194+
- Added Android mobile shell options:
195+
- `--name`
196+
- `--url`
197+
- `--package`
198+
- `--output`
199+
- `--min-sdk`
200+
- `--target-sdk`
201+
- `--compile-sdk`
202+
- `--version-code`
203+
- `--version-name`
204+
- `--agp`
205+
- `--allow-cleartext`
206+
- `--no-cleartext`
207+
- `--gradle`
208+
- `--gradle-version`
209+
- `--distribution-type`
210+
- `--project`
211+
- `--debug`
212+
- `--release`
213+
- `--no-install`
214+
- `--force`
215+
216+
- Added support for launching generated Android shells on connected devices through `adb`.
217+
73218
### Changed
74219

75220
- Updated the umbrella build so `vix::ui` and `vix::note` are built, linked, installed, and exported as part of Vix.cpp.
76221
- Updated `vix::vix` to link `vix::ui` and `vix::note` when enabled.
77222
- Updated Core to support optional UI response integration.
78223
- Updated the HTTP response layer to return Vix UI responses and views directly.
79-
- Updated the CLI registry to expose the new `vix note` command.
224+
- Updated the CLI registry to expose the new `vix note`, `vix desktop`, and `vix mobile` commands.
225+
- Updated `vix note` so a note file is optional. Running `vix note` now starts a workspace in the current directory, similar to notebook workflows.
226+
- Updated `vix note` so existing `.vixnote` files can still be opened explicitly with `vix note <file.vixnote>`.
227+
- Updated `vix note` to support desktop WebView mode through `vix note --desktop`.
80228
- Updated Vix Note assets so the browser UI is served from real local assets with embedded fallback.
81229
- Updated Note routing so the UI can fetch document state, edit cells, save documents, and execute cells through API calls.
82230
- Updated Note serialization to preserve stable cell ids and titles during save/load cycles.
231+
- Updated C++ note execution defaults to avoid unnecessary clean rebuilds during normal cell execution.
83232
- Updated module examples to focus on UI and Note workflows.
84233
- Updated release, SDK, module test, security, and build-safety CI profiles to cover UI and Note.
234+
- Updated CLI release and strict CI profiles to cover desktop shell and mobile shell command registration.
85235
- Updated package validation so UI and Note headers/libraries are checked after installation.
86236
- Updated Vix Note documentation, roadmap, and version metadata for the v1.0.0 stable release.
87237

238+
* Updated `vix desktop` so `run` is clearly the development workflow, while `build` and `package --target dir` generate distributable desktop folders.
239+
* Updated `vix desktop run` to accept a direct C++ target:
240+
241+
```bash
242+
vix desktop run ui_dashboard.cpp
243+
```
244+
245+
- Updated `vix desktop` so a direct target defaults to desktop run mode:
246+
247+
```bash
248+
vix desktop ui_dashboard.cpp
249+
```
250+
251+
- Updated desktop server startup so the configured host and port are forwarded to the launched server through `SERVER_HOST` and `SERVER_PORT`.
252+
- Updated desktop startup timeout defaults for server-backed desktop apps.
253+
- Updated desktop CLI help to document run, build, package, metadata, window, server, and build/package options.
254+
88255
### Fixed
89256

90257
- Fixed package export validation for `vix::ui` and `vix::note`.
@@ -97,8 +264,20 @@ This release keeps the core framework focused while adding first-class UI and no
97264
- Fixed Note server and route tests for local HTTP behavior, document JSON, cell execution, run-all execution, static assets, and custom asset directories.
98265
- Fixed Note storage tests for stable metadata preservation after save/load.
99266
- Fixed Note serialization so cell ids are not lost after editing and saving `.vixnote` documents.
267+
- Fixed Vix Note startup behavior so the command can start from the current directory without requiring a pre-existing note file.
268+
- Fixed Vix Note desktop mode so the local Note server is started in-process and opened through `AppShell`.
269+
- Fixed Android mobile shell generation so the generated project can build without missing launcher icon resources.
270+
- Fixed Android mobile shell build behavior to prefer `./gradlew` when a Gradle wrapper exists.
271+
- Fixed Android mobile shell project detection so `vix mobile build`, `vix mobile run`, and `vix mobile wrapper` work from inside the generated Android project directory.
272+
- Fixed Android mobile launch behavior to use the generated package and `MainActivity`.
100273
- Fixed scheduler and worker test behavior in the threadpool module for the release branch.
101274

275+
* Fixed desktop shell startup so the WebView waits for the configured server readiness URL before opening.
276+
* Fixed desktop shell behavior when the readiness endpoint is already in use by another process.
277+
* Fixed desktop server lifecycle handling so server processes launched by `vix desktop run` are cleaned up when the desktop shell closes.
278+
* Fixed supervised server shutdown so `vix run --force-server` does not report a normal desktop shutdown as a runtime error.
279+
* Fixed desktop server startup so `--port` is applied to both the shell URL and the launched server process.
280+
102281
### Removed
103282

104283
- Removed early Note prototype examples:
@@ -113,22 +292,29 @@ Vix.cpp v2.7.0 is a foundation release for:
113292
```txt
114293
Vix UI
115294
Vix Note
295+
Vix Desktop Shell
296+
Vix Mobile Shell
116297
```
117298

118299
Vix UI provides the server-rendered interface layer for C++ applications.
119300

120-
Vix Note provides the visual learning workspace for C++ and Vix.cpp lessons, with runnable C++ and Reply cells, saved `.vixnote` files, browser-based editing, and static HTML export.
301+
Vix Note provides the visual learning workspace for C++ and Vix.cpp lessons, with runnable C++ and Reply cells, saved `.vixnote` files, browser-based editing, desktop WebView mode, workspace startup, and static HTML export.
302+
303+
Vix Desktop Shell provides the first CLI workflow for opening Vix web applications in a native desktop WebView shell, plus the first distributable desktop folder workflow through `vix desktop build` and `vix desktop package --target dir`.
304+
305+
Vix Mobile Shell provides the first CLI workflow for generating, building, and running Android WebView wrappers around Vix web or PWA applications.
121306

122307
The direction of this release is:
123308

124309
```txt
125310
server-rendered UI first
126311
visual C++ learning with Vix Note
127-
WebView app shell later
312+
desktop and mobile WebView shells for real apps
313+
PWA as the mobile foundation
128314
native UI only when truly needed
129315
```
130316

131-
The goal is to make C++ development easier to teach, inspect, and turn into real interfaces without making the core runtime heavier by default.
317+
The goal is to make C++ development easier to teach, inspect, package, and turn into real interfaces without making the core runtime heavier by default.
132318

133319
## v2.6.3
134320

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ option(VIX_UI_BUILD_TESTS "Build vix::ui tests"
221221
option(VIX_UI_BUILD_EXAMPLES "Build vix::ui examples" OFF)
222222
option(VIX_UI_BUILD_BENCHMARKS "Build vix::ui benchmarks" OFF)
223223
option(VIX_UI_ENABLE_LINUX_WEBVIEW "Enable Linux desktop WebView backend for vix::ui" OFF)
224+
option(VIX_CLI_ENABLE_DESKTOP "Build vix desktop CLI support through vix::ui" ${VIX_ENABLE_UI})
224225

225226
option(VIX_ENABLE_NOTE "Build Vix Note module" ON)
226227
option(VIX_NOTE_BUILD_TESTS "Build vix::note tests" ${VIX_BUILD_TESTS})
@@ -279,6 +280,7 @@ set(VIX_P2P_HTTP_BUILD_TESTS ${VIX_BUILD_TESTS} CACHE BOOL "Build vix::p2p_htt
279280
set(VIX_DB_BUILD_TESTS ${VIX_BUILD_TESTS} CACHE BOOL "Build vix::db tests")
280281
set(VIX_MIDDLEWARE_BUILD_TESTS ${VIX_BUILD_TESTS} CACHE BOOL "Build vix::middleware tests")
281282
set(VIX_CLI_BUILD_TESTS ${VIX_BUILD_TESTS} CACHE BOOL "Build vix::cli tests")
283+
set(VIX_CLI_ENABLE_DESKTOP ${VIX_CLI_ENABLE_DESKTOP} CACHE BOOL "Build vix desktop CLI support through vix::ui")
282284
set(VIX_WEBSOCKET_BUILD_TESTS ${VIX_BUILD_TESTS} CACHE BOOL "Build vix::websocket tests")
283285
set(VIX_UI_BUILD_TESTS ${VIX_BUILD_TESTS} CACHE BOOL "Build vix::ui tests")
284286
set(VIX_NOTE_BUILD_TESTS ${VIX_BUILD_TESTS} CACHE BOOL "Build vix::note tests")
@@ -1242,6 +1244,8 @@ endif()
12421244
# --- CLI (optional) ---
12431245
if (VIX_ENABLE_CLI AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/modules/cli/CMakeLists.txt")
12441246
message(STATUS "Adding 'modules/cli'...")
1247+
set(VIX_CLI_ENABLE_DESKTOP ${VIX_CLI_ENABLE_DESKTOP}
1248+
CACHE BOOL "Build vix desktop CLI support through vix::ui" FORCE)
12451249
add_subdirectory(modules/cli cli_build)
12461250
else()
12471251
message(STATUS "CLI: disabled or not present.")

examples/ui/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Vix UI examples
2+
3+
This directory contains examples for the `vix::ui` module.
4+
5+
## Examples
6+
7+
```bash
8+
vix run examples/ui/ui_html.cpp
9+
vix run examples/ui/ui_assets.cpp
10+
vix run examples/ui/ui_view.cpp
11+
vix run examples/ui/ui_forms.cpp
12+
vix run examples/ui/ui_live.cpp
13+
vix run examples/ui/ui_pwa.cpp
14+
vix run examples/ui/ui_dashboard.cpp
15+
```
16+
17+
## Desktop
18+
19+
```bash
20+
vix desktop run examples/ui/ui_dashboard.cpp \
21+
--name "Vix UI Dashboard" \
22+
--width 1100 \
23+
--height 760
24+
25+
vix desktop build examples/ui/ui_dashboard.cpp \
26+
--name "Vix UI Dashboard" \
27+
--app-id com.vixcpp.dashboard \
28+
--version 1.0.0 \
29+
--width 1100 \
30+
--height 760
31+
```
32+
33+
## What each example shows
34+
35+
- `ui_html.cpp` — low-level HTML helpers
36+
- `ui_assets.cpp` — asset manifest rendering
37+
- `ui_view.cpp` — template-backed views
38+
- `ui_forms.cpp` — form fields and CSRF helpers
39+
- `ui_live.cpp` — flash messages, toasts and fragments
40+
- `ui_pwa.cpp` — PWA metadata, manifest and safe-area CSS
41+
- `ui_dashboard.cpp` — complete server-rendered dashboard
42+
- `ui_shell.cpp` — desktop shell configuration

examples/ui/assets/app.css

Whitespace-only changes.

0 commit comments

Comments
 (0)