extract app builder from module builder - #103
Open
iurimatias wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extracts UI/QML app-building responsibilities out of logos-module-builder into logos-app-builder to simplify the module builder and remove a circular dependency.
Changes:
- Removed UI/QML builders (
mkLogosQmlModule,mkStandaloneApp) and dependency collection helper (collectAllModuleDeps) fromlogos-module-builder, while keeping/exposingbuildCppPluginfor reuse. - Removed UI/QML templates and related tests/integration checks from this repo.
- Updated README/docs/skills to redirect UI/QML guidance to
logos-app-builder.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test-templates.nix | Drops UI/QML template assertions; keeps core template validation. |
| tests/test-qml-integration.nix | Removes QML integration test tied to mkLogosQmlModule. |
| tests/test-common.nix | Removes collectAllModuleDeps test now that helper moved out. |
| tests/test-collectAllModuleDeps.nix | Removes dedicated dependency-walker test suite (function moved out). |
| tests/default.nix | Stops importing/running removed dependency-walker tests. |
| templates/ui-qml/metadata.json | Removes QML-only template content from this repo. |
| templates/ui-qml/Main.qml | Removes QML-only template content from this repo. |
| templates/ui-qml/flake.nix | Removes QML-only template flake from this repo. |
| templates/ui-qml-backend/src/ui_example.rep | Removes UI backend template content from this repo. |
| templates/ui-qml-backend/src/ui_example_plugin.h | Removes UI backend template content from this repo. |
| templates/ui-qml-backend/src/ui_example_plugin.cpp | Removes UI backend template content from this repo. |
| templates/ui-qml-backend/src/ui_example_interface.h | Removes UI backend template content from this repo. |
| templates/ui-qml-backend/src/qml/Main.qml | Removes UI backend template content from this repo. |
| templates/ui-qml-backend/metadata.json | Removes UI backend template content from this repo. |
| templates/ui-qml-backend/flake.nix | Removes UI backend template flake from this repo. |
| templates/ui-qml-backend/CMakeLists.txt | Removes UI backend template build file from this repo. |
| skills/create-ui-module.md | Updates UI module guidance to use logos-app-builder. |
| skills/create-qml-module.md | Updates QML-only module guidance to use logos-app-builder. |
| README.md | Removes in-repo UI/QML instructions and redirects to logos-app-builder. |
| lib/mkStandaloneApp.nix | Deletes standalone app launcher builder (moved out). |
| lib/mkLogosQmlModule.nix | Deletes QML module builder (moved out). |
| lib/mkLogosModule.nix | Removes nix run/standalone-app wiring; keeps module build/test outputs. |
| lib/default.nix | Stops exporting removed app/QML builders; exports buildCppPlugin for reuse. |
| lib/common.nix | Removes collectAllModuleDeps; retains shared utility helpers. |
| flake.nix | Drops logos-standalone-app input, removes UI templates, removes QML integration check. |
| docs/nix-api.md | Updates API overview to reflect moved functions and new buildCppPlugin focus. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
14
to
18
| > **Note:** `mkLogosQmlModule`, `mkStandaloneApp`, and `collectAllModuleDeps` have been moved to [`logos-app-builder`](https://github.com/logos-co/logos-app-builder). Use `logos-app-builder.lib.mkLogosQmlModule` for `ui_qml` modules. | ||
|
|
||
| ## mkLogosModule | ||
|
|
||
| Builder for core C++ modules and legacy UI widget modules. For `ui_qml` modules (QML view with optional C++ backend), use `mkLogosQmlModule` instead. |
Comment on lines
247
to
251
| ## mkLogosQmlModule (moved to logos-app-builder) | ||
|
|
||
| > **Moved:** This function is now in `logos-app-builder.lib.mkLogosQmlModule`. The documentation below is kept for reference. | ||
|
|
||
| Builder for `ui_qml` modules — QML view with an optional C++ backend. Validates that `metadata.json` has `"type": "ui_qml"` and a non-null `"view"` field. When `"main"` is declared, compiles the C++ backend via `buildCppPlugin` and bundles it alongside the QML view. When `"main"` is absent, produces a QML-only output (no compilation). Always wires `apps.default`. |
Comment on lines
441
to
445
| ### mkStandaloneApp (moved to logos-app-builder) | ||
|
|
||
| > **Moved:** This function is now in `logos-app-builder.lib.mkStandaloneApp`. | ||
|
|
||
| Build the `apps.default` entry for `nix run`. |
Comment on lines
+82
to
+86
| ### UI modules | ||
|
|
||
| For `type: "ui_qml"` modules, `logos-module-builder` automatically wires up `apps.default` so `nix run .` launches the module in `logos-standalone-app`. No separate `logos-standalone-app` input is needed — it is bundled inside `logos-module-builder`. | ||
| UI/QML module building and standalone app launching have been moved to [`logos-app-builder`](https://github.com/logos-co/logos-app-builder). Use `logos-app-builder.lib.mkLogosQmlModule` for `type: "ui_qml"` modules and `logos-app-builder.lib.mkLogosApp` to add `nix run` support to legacy UI modules. | ||
|
|
||
| **With C++ backend** (`mkLogosQmlModule` — validates `"type": "ui_qml"` + `"view"` field, compiles backend when `"main"` is set): | ||
|
|
||
| The C++ plugin runs in a separate `ui-host` process (process-isolated), and the QML view is loaded in the host application. Communication happens via Qt Remote Objects over a private socket. Use `logos.module()` from QML to access the backend replica. | ||
|
|
||
| ```nix | ||
| { | ||
| inputs = { | ||
| logos-module-builder.url = "github:logos-co/logos-module-builder"; | ||
| # Add backend dependencies as inputs: | ||
| # calc_module.url = "github:logos-co/logos-tutorial?dir=logos-calc-module"; | ||
| }; | ||
|
|
||
| outputs = inputs@{ logos-module-builder, ... }: | ||
| logos-module-builder.lib.mkLogosQmlModule { | ||
| src = ./.; | ||
| configFile = ./metadata.json; | ||
| flakeInputs = inputs; | ||
| }; | ||
| } | ||
| ``` | ||
|
|
||
| **QML-only** (`mkLogosQmlModule` — no C++ compilation, runs in-process): | ||
| ```nix | ||
| { | ||
| inputs = { | ||
| logos-module-builder.url = "github:logos-co/logos-module-builder"; | ||
| }; | ||
|
|
||
| outputs = inputs@{ logos-module-builder, ... }: | ||
| logos-module-builder.lib.mkLogosQmlModule { | ||
| src = ./.; | ||
| configFile = ./metadata.json; | ||
| flakeInputs = inputs; | ||
| }; | ||
| } | ||
| ``` | ||
|
|
||
| Then `nix run .` launches the module in `logos-standalone-app`. Dependencies listed in `metadata.json` are automatically bundled from their LGX packages and loaded at runtime. | ||
|
|
||
| See `templates/ui-qml-backend`, `templates/ui-qml`, and `lib/mkLogosQmlModule.nix`. | ||
|
|
||
| ### UI integration tests | ||
|
|
||
| For `ui_qml` modules, `mkLogosQmlModule` auto-detects `.mjs` test files in the `tests/` directory and wires up integration testing using [logos-qt-mcp](https://github.com/logos-co/logos-qt-mcp)'s test framework. No extra flake inputs needed. | ||
|
|
||
| ```bash | ||
| # Run tests hermetically (builds everything, launches headless, runs tests) | ||
| nix build .#integration-test -L | ||
|
|
||
| # Build the test framework for interactive use (one-time) | ||
| nix build .#test-framework -o result-mcp | ||
|
|
||
| # Run tests interactively (app must be running with inspector on :3768) | ||
| node tests/ui-tests.mjs | ||
| ``` | ||
|
|
||
| Tests use the QML inspector to interact with the running UI — finding elements, clicking buttons, verifying text. Example test file (`tests/ui-tests.mjs`): | ||
|
|
||
| ```javascript | ||
| import { resolve } from "node:path"; | ||
|
|
||
| // CI sets LOGOS_QT_MCP automatically; for interactive use: nix build .#test-framework -o result-mcp | ||
| const root = process.env.LOGOS_QT_MCP || new URL("../result-mcp", import.meta.url).pathname; | ||
| const { test, run } = await import(resolve(root, "test-framework/framework.mjs")); | ||
|
|
||
| test("my_module: loads UI", async (app) => { | ||
| await app.waitFor( | ||
| async () => { await app.expectTexts(["Hello"]); }, | ||
| { timeout: 15000, interval: 500, description: "UI to load" } | ||
| ); | ||
| }); | ||
|
|
||
| run(); | ||
| ``` | ||
|
|
||
| See the [logos-qt-mcp](https://github.com/logos-co/logos-qt-mcp) test framework for available assertions and helpers. | ||
| See the [logos-app-builder README](https://github.com/logos-co/logos-app-builder) for details. |
extract app builder from module builder ci fix update docs
iurimatias
force-pushed
the
extract_app_builder
branch
from
May 26, 2026 18:04
6799296 to
a960afa
Compare
dlipicar
added a commit
that referenced
this pull request
Jul 17, 2026
Bumps the SDK inputs to the merged fixes surfaced by the full_api test chain: - logos-protocol -> 4775e63 (#21, qvariantToNlohmann container int-preservation) - logos-cpp-sdk -> 2f34804 (#103, bstr + composite-any codegen) - logos-qt-sdk -> 089142d (#10, QtProviderObject QVariantList/Map args) - logos-rust-sdk -> a55fdac (#26, clone any event params) Validated: all five test-modules full_api modules (C++/Rust providers, C++/Rust proxies, ui_qml plugin) build through this module-builder with no SDK overrides. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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 simplifies the code here and also removes a circular dependency