Add Node.js sample using a native WinUI 3 Application and Window#624
Open
lei9444 wants to merge 13 commits into
Open
Add Node.js sample using a native WinUI 3 Application and Window#624lei9444 wants to merge 13 commits into
lei9444 wants to merge 13 commits into
Conversation
Contributor
Build Metrics ReportBinary Sizes
Test Results✅ 3338 passed, 4 skipped out of 3342 tests in 872.9s (+135.3s vs. baseline) Test Coverage✅ 86.3% line coverage, 80% branch coverage · ✅ no change vs. baseline CLI Startup Time52ms median (x64, Updated 2026-07-16 13:46:21 UTC · commit |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1cf82a54-b9a0-4437-ab3f-ea9af28a68a8
lei9444
marked this pull request as ready for review
July 16, 2026 13:19
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Node.js sample that demonstrates creating a native WinUI 3 Application + Window directly from JavaScript using dynwinrt, along with CI coverage to keep the sample working over time.
Changes:
- Adds the
samples/node-winuisample project (restore/generate scripts, WinUI worker implementation, and documentation). - Adds a Pester test for the new sample and wires it into the
test-samples.ymlmatrix. - Updates the repo root
README.mdto include the new sample in the Samples table.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| samples/node-winui/winui-worker.js | Worker-thread WinUI Application.start() sample UI composition + event wiring. |
| samples/node-winui/main.js | Bootstraps Windows App SDK and starts the WinUI worker. |
| samples/node-winui/package.json | Declares sample scripts, #winapp/bindings imports, dynwinrt deps, and winapp.jsBindings config. |
| samples/node-winui/README.md | Sample usage + architecture explanation + binding regeneration guidance. |
| samples/node-winui/winapp.yaml | WinApp restore package set for generating WinUI bindings. |
| samples/node-winui/test.Tests.ps1 | Pester validation for restore + generated bindings + basic JS syntax checks. |
| samples/node-winui/.gitignore | Ignores .winapp/ output and node_modules/. |
| samples/node-winui/.npmrc | Sets npm registry (see review comment). |
| README.md | Fixes formatting in install section and adds the new sample to the Samples table. |
| .github/workflows/test-samples.yml | Adds node-winui to workflow_dispatch options, matrix, and Node setup gating. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1 @@ | |||
| registry=https://registry.npmjs.org/ | |||
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.
Description
Usage Example
Related Issue
Type of Change
Checklist
docs/fragments/skills/(if CLI commands/workflows changed)Screenshots / Demo
Additional Notes
AI Description
This pull request introduces a new sample demonstrating how to create a WinUI 3 application and window directly from Node.js, using the Microsoft.UI.Xaml controls projected into JavaScript. It includes necessary files like
main.js,package.json, and a README for usage instructions. To run the sample, use the following commands: