Repository navigation
feat: add WebUI Press content mode - #525
Merged
Mohamed Mansour (mohamedmansour) merged 2 commits intoSep 11, 2026
Merged
Mohamed Mansour (mohamedmansour) merged 2 commits into
Mohamed Mansour (mohamedmansour) merged 2 commits into
Conversation
Mohamed Mansour (mohamedmansour)
added this pull request to stack #526
September 11, 2026 04:40
This was referenced Sep 11, 2026
Copilot started reviewing on behalf of
Mohamed Mansour (mohamedmansour)
September 11, 2026 04:54
View session
Mohamed Mansour (mohamedmansour)
requested review from
Bang Lee (Qusic),
atul (atulkatti),
Jane Chu (janechu) and
mcritzjam
September 11, 2026 04:59
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new cross-process extraction lock lacks a deterministic concurrency regression test.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a shell-free WebUI Press content mode while preserving full-site behavior, SSR, hydration, theming, and configuration overrides.
Changes:
- Adds typed
--show=all|contentsupport for build and serve. - Introduces content-only templates/styles with comprehensive browser coverage.
- Improves alias resolution, diagnostic chaining, and embedded-asset synchronization.
File summaries
| File | Description |
|---|---|
DESIGN.md |
Specifies content-mode behavior and contracts. |
docs/ai.md |
Updates AI-facing Press guidance. |
docs/guide/cli/index.md |
Documents the new CLI option. |
docs/guide/webui-press.md |
Documents content-only sites. |
crates/webui-press/README.md |
Updates package usage and behavior. |
crates/webui-press/src/build.rs |
Selects templates, CSS, scripts, and diagnostics by mode. |
crates/webui-press/src/bundler.rs |
Resolves aliases from an absolute config directory. |
crates/webui-press/src/content.rs |
Renders home Markdown in content mode. |
crates/webui-press/src/lib.rs |
Exports ShowMode. |
crates/webui-press/src/main.rs |
Adds CLI flags and asset-cache locking. |
crates/webui-press/src/serve.rs |
Preserves CLI overrides across reloads. |
crates/webui-press/src/state.rs |
Initializes the new config field. |
crates/webui-press/src/types.rs |
Defines and validates ShowMode. |
crates/webui-press/template/content.html |
Adds the shell-free document scaffold. |
crates/webui-press/template/docs.css |
Retains shared content styling. |
crates/webui-press/template/index.html |
Refines manual and forced-color theming. |
crates/webui-press/template/shell.css |
Isolates full-site layout styling. |
crates/webui-press/tests/native-fixture.ts |
Adds reusable native test fixtures. |
crates/webui-press/tests/regions_build.rs |
Tests region suppression and error chains. |
crates/webui-press/tests/show-mode.test.ts |
Tests rendering, hydration, and reload behavior. |
crates/webui-press/tests/theme-mode.test.ts |
Tests theme and forced-color behavior. |
Review details
- Files reviewed: 21/21 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Jane Chu (janechu)
previously approved these changes
Sep 11, 2026
mcritzjam
previously approved these changes
Sep 11, 2026
Base automatically changed from
mohamedmansour/plugin-aware-discovery
to
main
September 11, 2026 20:41
Mohamed Mansour (mohamedmansour)
added a commit
that referenced
this pull request
Sep 11, 2026
Component discovery should follow the selected plugin without making filename-only applications pay for FAST metadata work. This separates the default filesystem convention from FAST's manifest-driven discovery and makes npm package/scope resolution predictable. ## Changes - Derive default WebUI/none component names from HTML filenames, with matching CSS and TS/JS siblings. - Make package metadata loading, parsing, and cache hashing opt-in. FAST ownership and export/CEM processing stay on the FAST path. - Resolve FAST manifest declarations using only converted `*.template-webui.html` assets. Raw `*.template.html` files are not accepted as a substitute; ordinary `<component-name>.html` app components remain supported. - Preserve symlinked package lookup, search ancestors for requested packages/scopes, support collection spellings, and surface failures in declared components. - Keep generic/default discovery in `plugin/mod.rs` and FAST-specific behavior and documentation under `plugin/fast`. ## Validation - Standalone `cargo xtask check`. - Public discovery regressions for metadata isolation, naming, cache inputs, scoped lookup, and strict FAST variant selection. - FAST 2 and FAST 3 build/render coverage for converted package templates and ordinary app-folder HTML. - Real-package verification confirms converted template bytes are selected; packages with only raw FAST templates report an actionable error. This is the base layer of the split. WebUI Press content mode is the separate dependent PR #525. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bf3fdbed-b6e0-4b3e-8b29-667f44831c4e
Mohamed Mansour (mohamedmansour)
dismissed stale reviews from mcritzjam and Jane Chu (janechu)
September 11, 2026 20:41
The merge-base changed after approval.
Generate shell-free documentation while preserving SSR and hydration, keep content themes system-driven, and retain explicit mode overrides through serve reloads. Correct Press alias resolution, parser diagnostics, and cold asset extraction. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Coordinate two cold extraction processes in an isolated cache, assert OS lock contention and complete shared assets, and guard against repeated staging after the lock is acquired. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: bf3fdbed-b6e0-4b3e-8b29-667f44831c4e
Mohamed Mansour (mohamedmansour)
force-pushed
the
mohamedmansour/webui-press-content-mode
branch
from
September 11, 2026 20:47
a80e54a to
5604f37
Compare
Mohamed Mansour (mohamedmansour)
requested review from
Jane Chu (janechu) and
mcritzjam
September 11, 2026 21:11
Bang Lee (Qusic)
approved these changes
Sep 11, 2026
mcritzjam
approved these changes
Sep 11, 2026
Mohamed Mansour (mohamedmansour)
deleted the
mohamedmansour/webui-press-content-mode
branch
September 11, 2026 22:03
Mohamed Mansour (mohamedmansour)
added a commit
that referenced
this pull request
Sep 18, 2026
## Release Bumps WebUI to `0.0.29`. Previous release tag: `v0.0.28` ## Changes since `v0.0.28` Features: - Ship version-matched AI authoring guidance with `@microsoft/webui`, using a lightweight skill that reads the installed package's reference (feat: bundle versioned AI guidance with WebUI #522 by @mohamedmansour). - Add plugin-aware component discovery, with filename-based HTML components and manifest-driven FAST components (feat: add plugin-aware component discovery #524 by @mohamedmansour). - Add WebUI Press `--show=all|content` for shell-free documentation views that preserve SSR, hydration, authored examples, and accessible theme behavior (feat: add WebUI Press content mode #525 by @mohamedmansour). - Automatically support Trusted Types for compiled templates and generated CSS import maps without promoting arbitrary state HTML to trusted content (feat: use Trusted Types automatically in the framework #536 by @mohamedmansour). - Keep explicit streaming imports lightweight so applications can load streaming support early and application code later (feat: keep explicit streaming imports lightweight #539 by @mohamedmansour). - Render tree-shaped state with file-scoped named `<for id="...">` bodies, including forward references and recursive reuse without extra client runtime code. Use unbraced `each="item in items"`; the legacy `template` spelling and FAST component references produce actionable diagnostics (feat: add file-scoped recursive for loops #547 by @mohamedmansour). Fixes: - Preserve table-rooted hydration ownership and correctly compile whitespace-bearing, nested directives, preventing duplicate controls after reactive updates. Rebuild templates to receive the compiler fix (fix: preserve table-rooted hydration paths #512 by @mohamedmansour; fix: align client directive parsing with the HTML scanner #531 by @mohamedmansour). - Emit reachable stylesheets and templates in deterministic traversal order. External plugin implementations must adapt the affected `HandlerPlugin` and bootstrap component collection interfaces from hash sets to slices (fix: render reachable-component ordering deterministically #519 by @janechu). - Resolve bare CEM module specifiers through their owning packages, respecting export maps, package boundaries, and cache invalidation when nearer dependencies appear (fix: resolve bare CEM module specifiers #528 by @janechu). - Prevent spurious dev-server rebuilds from read-only filesystem activity and recursive traversal of linked workspace dependencies (Improve benchmark telemetry and dev-server watching #521 by @mohamedmansour). - Update rustls to address TLS 1.3 handshake encryption-level validation advisory RUSTSEC-2026-0285 (fix: update rustls to address RUSTSEC-2026-0285 #533 by @mohamedmansour). - Forward bare boolean and ARIA component inputs into SSR state while preserving empty literal attributes and existing conditional boolean bindings (fix: forward HTML component inputs during SSR #540 by @mohamedmansour). - Preserve sibling route declaration order across SSR and client routing so equally specific routes select the correct pending and error boundaries (fix: preserve route order for pending and error boundaries #541 by @mohamedmansour). - Handle skipped or superseded router view transitions without unhandled animation rejections, while preserving route-commit errors and responsive subsequent navigation (fix: handle router view transition rejections #543 by @mohamedmansour). - Wait for active dev-server rebuilds and their bundler subprocesses before graceful shutdown, preventing output writes after the server exits (fix: wait for dev-server rebuilds during shutdown #546 by @mohamedmansour). - Preserve global theme defaults when custom properties are overridden only by scoped selectors or conditional rules, so unmatched component instances retain their intended colors (fix: preserve theme defaults under scoped CSS overrides #548 by @mohamedmansour). Docs: - Add a data-driven Benchmark Explorer, centralize performance guidance, distinguish independent SSR/browser metrics, and publish resource telemetry with accessible methodology details (docs: centralize performance guidance and benchmark data #486 by @mohamedmansour; Improve benchmark telemetry and dev-server watching #521 by @mohamedmansour). - Update AI reference installation and migration guidance while retaining `/ai`, and clarify plugin-specific discovery and FAST converted-template requirements (feat: bundle versioned AI guidance with WebUI #522 by @mohamedmansour; feat: add plugin-aware component discovery #524 by @mohamedmansour). - Document owned Rust partial rendering, streaming state ownership, and watcher hashing benchmarks, including measurement scope and tradeoffs (perf: reduce partial response allocations #510 by @mohamedmansour; perf: move streaming command processing off async workers #529 by @mohamedmansour; perf: bound watcher hashing memory with reusable scratch #530 by @mohamedmansour). - Document automatic Trusted Types support, CSP enforcement, and first-declared precedence for equally specific routes and their pending/error boundaries (feat: use Trusted Types automatically in the framework #536 by @mohamedmansour; fix: preserve route order for pending and error boundaries #541 by @mohamedmansour). - Explain named recursive loops and their compatibility limits, scoped CSS token defaults, and router view-transition error handling (feat: add file-scoped recursive for loops #547 by @mohamedmansour; fix: preserve theme defaults under scoped CSS overrides #548 by @mohamedmansour; fix: handle router view transition rejections #543 by @mohamedmansour). Maintenance: - Reduce partial-response and per-render allocations through owned state projection, borrowed graph traversal, scalar formatting, and borrowed nested route trees. Rust callers use ownership-taking `Protocol::render_partial(Value, ...)`; JSON boundaries retain `render_partial_json` (perf: reduce partial response allocations #510 by @mohamedmansour; perf: cut per-render handler allocations #511 by @mohamedmansour; perf: avoid cloning nested route trees #513 by @mohamedmansour). - Move streaming command deserialization, validation, and default preparation onto the existing blocking renderer, transferring owned records and state rather than cloning retained projections (perf: move streaming command processing off async workers #529 by @mohamedmansour). - Bound watcher hashing content storage to one reusable 8 KiB buffer instead of repeated file-sized allocations while preserving invalidation behavior (perf: bound watcher hashing memory with reusable scratch #530 by @mohamedmansour). - Parallelize release WASM builds and artifact staging, and consolidate dependency scanning before release jobs (chore: parallelize release pipeline work #509 by @mohamedmansour). - Refresh compatible Rust and JavaScript dependencies and migrate repository tooling and CI to pnpm 12.3.4 while preserving existing audit constraints (chore: update dependencies to latest compatible versions #534 by @mohamedmansour). ## Validation - `cargo xtask check` - `pnpm --dir crates/webui-press test` (16 passed). - `pnpm --dir packages/webui-framework exec playwright test recursive-repeat --workers=2 --reporter=line` (6 passed). - `pnpm --dir packages/webui-router exec playwright test --grep "view transition rejection ownership" --workers=2 --reporter=line` (4 passed). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Component galleries need a shell-free documentation view without losing server-rendered examples or hydration. This adds that presentation to native WebUI Press while preserving the complete site as the default.
Changes
--show=all|contentsupport to build and serve, retaining explicit overrides through config reloads.Validation
cargo xtask checkon the dependent layer.Depends on #524. Plugin-aware component discovery is supplied by that base PR and is excluded from this review diff.