Skip to content

Surface portable UI capability facts via --probe#490

Merged
MGudgin merged 1 commit into
mainfrom
user/gudge/probe-ui-capability
Jun 4, 2026
Merged

Surface portable UI capability facts via --probe#490
MGudgin merged 1 commit into
mainfrom
user/gudge/probe-ui-capability

Conversation

@MGudgin
Copy link
Copy Markdown
Member

@MGudgin MGudgin commented Jun 3, 2026

This PR changes the platform probe and SDK support API to expose portable UI
capability facts instead of Windows-specific UI-limit details.

Details

  • Emit a uiCapabilities object from the Rust probe that maps native Windows
    UI-limit support into platform-neutral restriction capabilities.
  • Expose PlatformSupport.uiCapabilities and UiCapabilitySupport in the SDK, with
    TypeScript validation for probe output.
  • Cover missing input-injection and input-method support cases in Rust and SDK
    tests.

Tests

  • npm test in sdk/ passed.
  • npm run build in sdk/ passed.
  • cargo fmt --all -- --check in src/ passed.
  • cargo test -p appcontainer_common probe in src/ passed.
  • cargo test -p appcontainer_common supported in src/ passed.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Microsoft Reviewers: Open in CodeFlow

Copilot AI review requested due to automatic review settings June 3, 2026 21:32
@MGudgin MGudgin requested a review from a team as a code owner June 3, 2026 21:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates MXC’s Windows probe output and the TypeScript SDK’s platform support surface to report portable UI restriction capability facts (uiCapabilities) instead of Windows-specific UI-limit details, enabling callers to reason about UI restrictions in a platform-neutral way.

Changes:

  • Rust: emit uiCapabilities from wxc-exec --probe based on the OS build’s supported UI restriction primitives.
  • SDK: add PlatformSupport.uiCapabilities / UiCapabilitySupport, validate probe output at runtime, and export the new types publicly.
  • Tests/docs: add Rust + SDK unit tests for input-injection / input-method capability cases; update SDK README and changelog.
Show a summary per file
File Description
src/backends/appcontainer/common/src/probe.rs Adds ui_capabilities to probe JSON output and serialization coverage tests.
src/backends/appcontainer/common/src/job_object.rs Introduces supported_ui_restrictions() to expose platform-agnostic UI restriction support derived from supported UI-limit flags.
sdk/tests/unit/platform.test.ts Adds unit tests ensuring getPlatformSupport() correctly surfaces/omits uiCapabilities based on probe payload validity.
sdk/src/types.ts Defines UiCapabilitySupport and adds optional uiCapabilities to PlatformSupport.
sdk/src/platform.ts Adds runtime validation for uiCapabilities and plumbs probe facts into PlatformSupport.
sdk/src/index.ts Exports UiCapabilitySupport from the public SDK entrypoint.
sdk/README.md Documents uiCapabilities as part of getPlatformSupport() behavior and lists the new capability type.
sdk/CHANGELOG.md Notes the new uiCapabilities reporting under the Unreleased section.

Copilot's findings

  • Files reviewed: 8/8 changed files
  • Comments generated: 0

@MGudgin
Copy link
Copy Markdown
Member Author

MGudgin commented Jun 3, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/backends/appcontainer/common/src/job_object.rs
Comment thread sdk/README.md Outdated
Comment thread sdk/src/types.ts
@MGudgin MGudgin force-pushed the user/gudge/probe-ui-capability branch from 1e5eecf to 0356d87 Compare June 3, 2026 22:44
This PR changes the platform probe and SDK support API to expose portable UI
capability facts instead of Windows-specific UI-limit details.

Details

* Emit a uiCapabilities object from the Rust probe that maps native Windows
  UI-limit support into platform-neutral restriction capabilities.
* Expose PlatformSupport.uiCapabilities and UiCapabilitySupport in the SDK, with
  TypeScript validation for probe output.
* Cover missing input-injection and input-method support cases in Rust and SDK
  tests.

Tests

* npm test in sdk/ passed.
* npm run build in sdk/ passed.
* cargo fmt --all -- --check in src/ passed.
* cargo test -p appcontainer_common probe in src/ passed.
* cargo test -p appcontainer_common supported in src/ passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@MGudgin MGudgin force-pushed the user/gudge/probe-ui-capability branch from 0356d87 to 9d82a65 Compare June 4, 2026 13:12
@MGudgin
Copy link
Copy Markdown
Member Author

MGudgin commented Jun 4, 2026

/azp run
#Resolved

@azure-pipelines
Copy link
Copy Markdown

azure-pipelines Bot commented Jun 4, 2026

Azure Pipelines successfully started running 1 pipeline(s).

#Resolved

@azure-pipelines
Copy link
Copy Markdown

  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"

See additional documentation.

Comment thread src/backends/appcontainer/common/src/job_object.rs
Comment thread sdk/src/types.ts
Copy link
Copy Markdown
Member

@jsidewhite jsidewhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@MGudgin MGudgin merged commit 2543435 into main Jun 4, 2026
22 checks passed
@MGudgin MGudgin deleted the user/gudge/probe-ui-capability branch June 4, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants