Skip to content

Add spec for SharedClusterEnvironment.md#5633

Open
Navdeep-ss wants to merge 18 commits into
SharedClusterEnvironmentfrom
SharedClusterEnvironment-draft
Open

Add spec for SharedClusterEnvironment.md#5633
Navdeep-ss wants to merge 18 commits into
SharedClusterEnvironmentfrom
SharedClusterEnvironment-draft

Conversation

@Navdeep-ss

@Navdeep-ss Navdeep-ss commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This is a review for the new Shared WebView2 Cluster Environment API.

API proposal for a shared WebView2 cluster environment using the symmetric Create + synchronous Get model (Approach 2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Navdeep-ss Navdeep-ss added the API Proposal Review WebView2 API Proposal for review. label Jul 1, 2026
Navdeep Singh and others added 8 commits July 1, 2026 15:44
- (1.7) Rename PerExeProfileIsolation -> PerHostProfileIsolation for OS-neutrality
- (1.6) Document per-Id persisted state in the Get reference doc-comment
- (1.10) Add API-shape decisions section: new options type vs extending ICoreWebView2EnvironmentOptions, and WinRT mismatch-surfacing (result/status enum vs COMException)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Per repo spec conventions (template: 'talk about behavior, not implementation'), replace the storage/locking pseudocode (registry paths, AcquireLock/WriteRecord, WAIT_ABANDONED) with observable behavior guarantees, and condense the alternatives-considered section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Top-level sections now exactly match the spec template (Background, Conceptual, Examples, API Details, Appendix). Remove the 'Open questions' section (no other spec has one) and the reviewer-facing 'API-shape decisions'/'Behavior guarantees' Appendix subsections; keep a lean 'Alternatives considered' and 'Relationship to existing options', matching how other specs use the Appendix. Also fix the C++ example's Get error handling and add Id constraints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CreateCoreWebView2ClusterEnvironment -> CreateOrJoinCoreWebView2ClusterEnvironment, the handler and the .NET/WinRT async method renamed to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The GUIDs were fabricated placeholders; real IIDs are allocated at implementation time. Matches specs like CustomDataPartition.md that omit uuid in the review IDL.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No WebView2 spec exposes an HRESULT constant as API. Match the convention (e.g. MultiProfile.md) of throwing a COMException and comparing ex.HResult against the HRESULT value with a comment naming the error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Navdeep Singh and others added 6 commits July 8, 2026 16:28
Trim API Details doc-comments to concise behavior, matching LMC reference conventions and the template style guide (describe behavior, not implementation). Removed implementation detail (storage/persistence 'State' note, Id->folder mapping rationale), design commentary (OS-neutral naming, sync justification), and conceptual/strategy narrative already covered in the Conceptual section. Standardized on 'options' over 'pinned set' jargon.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Drop internal shell/widgets example
- Use 'WebView2 environment' rather than 'browser process tree'
- Remove 'by accident' framing for cooperating apps
- Remove reviewer-meta spec-scope/alternatives line from Background
- Remove template conceptual-note line
- Remove 'constant in a shared header' parenthetical

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The full P1/P2/P3 comparison lives in the internal design doc; the condensed duplicate is not public-doc material and most specs do not carry a rejected-designs section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ChannelSearchKind only defines search order and is incomplete without ReleaseChannels (its matched pair). Keep the first iteration minimal; channel-selection options can be appended later on a derived options interface without breaking compat.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The prior text cited remote-debugging port/logging as omitted, but those are set via AdditionalBrowserArguments, which is included. Reframe: every exposed option is process-wide and first-creator-supplied; runtime-locating options (BrowserExecutableFolder, TargetCompatibleBrowserVersion, ReleaseChannels/ChannelSearchKind) are deferred to a later derived interface.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Appendix: keep only the process-wide new-type paragraph; drop the omitted-options list and any future-addition promise
- Standardize 'attach to an identical cluster' -> 'attach to a cluster with matching options'
- Name the model 'symmetric create-or-join' to match CreateOrJoin...
- Re-flow the awkward Background line wrap
- Remove the duplicate mismatch comment in the .NET example

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md
Comment thread specs/SharedClusterEnvironment.md
Comment thread specs/SharedClusterEnvironment.md
Comment thread specs/SharedClusterEnvironment.md
Navdeep Singh and others added 2 commits July 10, 2026 08:32
- Model create/join outcomes with a COREWEBVIEW2_CLUSTER_ENVIRONMENT_STATUS enum (Succeeded, OptionsMismatch) returned in the completion handler, alongside errorCode (Print-style), instead of a bespoke HRESULT.
- Surface not-supported (sandboxed/low-integrity/UWP, cannot share/access the UDF) via the synchronous return HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED) for CreateOrJoin (handler not called) and as the HRESULT/COMException for the synchronous Get.
- Add ERROR_NOT_SUPPORTED handling to both examples; fix .NET Get-inside-try and retry status check.
- Address PR feedback: gets->creates; recommend a stable descriptive Id (need not be a GUID); define 'cooperating host apps'; state a cluster occupies its own UDF namespace and never joins a CreateCoreWebView2EnvironmentWithOptions environment.
- Standardize terminology (cluster options, shared browser process, matching options); trim implementation detail from PerHostProfileIsolation; clarify profile-isolation wording.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adopt the ICoreWebView2ClusterEnvironmentCreateResult interface (Status + Environment) in the completion handler instead of separate status/environment parameters, matching the ICoreWebView2ExperimentalUpdateRuntimeResult / ICoreWebView2ExecuteScriptResult idiom and making the COM handler a clean source for the existing WinRT CreateResult projection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
Comment thread specs/SharedClusterEnvironment.md Outdated
- Reframe the excluded options as a deliberate scoping choice for this initial version, not a technical 'cannot be shared'.
- Simplify the Id-to-folder sentence and drop the confusing on-disk-layout clause.
- Clarify that a private fallback environment uses your own user data folder with its own separate data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Navdeep-ss Navdeep-ss requested a review from dhveerap July 10, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Proposal Review WebView2 API Proposal for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants