Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,18 @@ A positive result enables and initially selects the first **Install a local nati
gateway** card with the accent highlight and **Recommended** badge. A negative
capability result leaves that recommended choice visible but disabled after WSL and
**Connect to an existing gateway**, with Windows Update guidance directly below the
choice list; reopening the page rechecks support. The pinned SDK documents
Insider build **26340.9212** as its baseline. This is update guidance, not a
hardcoded admission floor or a promise that a particular feature is enabled.
The native boolean cannot distinguish every OS API failure from missing support.
choice list; reopening the page rechecks support. The guidance tells users to
update to a Windows version that supports the native Gateway. The guidance says
support is coming soon to all devices and, until broad availability, directs
users to join the Windows Insider Program, select the Beta or Experimental
channel, and choose Windows 11, version 26H1 under **Advanced options** during
enrollment. It warns that returning to Windows 11, version 25H2/26H2 requires
a clean reinstall. After enrolling, users return to
**Settings > Windows Update** and check for updates; the update may take a few
minutes to appear. The guidance notes that feature availability can vary by
device and tells users to reopen the page after updating to check support again.
The live probe remains authoritative. The native boolean cannot distinguish
every OS API failure from missing support.
Missing executables, malformed results and probe errors instead offer retry or
Companion repair, not an assertion that Windows must be updated.

Expand Down
17 changes: 14 additions & 3 deletions docs/ONBOARDING_WIZARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,20 @@ outside the disabled native option so the Windows Update action stays usable.
The support card is hidden when native capability is available.

When capability is unavailable, **Open Windows Update** opens
`ms-settings:windowsupdate`. Guidance names Insider build **26340.9212**, the
baseline documented by the pinned MXC SDK, or a newer supported build. Reopening
the page reruns the check; the Welcome page has no **Check again** button.
`ms-settings:windowsupdate`. Guidance tells users to update to a Windows version
that supports the native Gateway. It says support is coming soon to all devices
and, until broad availability, directs users to join the Windows Insider
Program, select the Beta or Experimental channel, and choose Windows 11, version
26H1 under **Advanced options** during enrollment. The guidance warns that
returning to Windows 11, version 25H2/26H2 requires a clean reinstall, as described
in [Microsoft's Windows core version guidance](https://learn.microsoft.com/en-us/windows-insider/flighting#understanding-windows-core-versions).
After enrolling, users return to **Settings > Windows Update**, check for
updates, and may need to wait a few minutes for the update to appear. The copy
notes that feature availability can vary by device and tells users to reopen
the page after updating to check support again. The Welcome page has no
**Check again** button. `NativeGatewayEligibilityTextTests` exercises the production
rich-text renderer, complete automation name, and repeated rich/plain transitions
on real WinUI `TextBlock` controls; the gallery also uses that renderer.
Feature rollout varies; a negative native API result is not proof
that the build alone is the cause. Probe failures or missing/invalid metadata
offer retry/Companion repair rather than misleading update advice. Windows Server
Expand Down
14 changes: 11 additions & 3 deletions docs/SETUP_ENGINE_REDESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,17 @@ substitute.
The [Welcome recommendation policy](ONBOARDING_WIZARD.md#welcome) now checks
`wxc-exec --probe` session capability before recommending the existing native
Gateway. `NativeGatewaySetupEligibility` owns admission and selection policy.
Unavailable capability offers Windows Update with the pinned SDK's Insider
baseline (26340.9212); failed probes offer retry/repair instead. WSL is always
visible as the second option after native, with existing-gateway connection third.
Unavailable capability offers Windows Update guidance. It says native Gateway
support is coming soon to all devices and, until broad availability, directs
users to join the Windows Insider Program, select the Beta or Experimental
channel, and choose Windows 11, version 26H1 under **Advanced options** during
enrollment. It warns that returning to Windows 11, version 25H2/26H2 requires
a clean reinstall. After enrolling, users return to
**Settings > Windows Update** and check for updates. The copy notes that feature
availability can vary by device and tells users to reopen the page after
updating to check support again. The live probe remains
authoritative; failed probes offer retry/repair instead. WSL is always visible
as the second option after native, with existing-gateway connection third.
Explicit WSL and existing-gateway choices survive late native probe results. Welcome has no
manual recheck button; reopening the page checks again. The separate isolation warning/checkbox is removed by the
2026-09-18 product decision; general security consent remains. This is not
Expand Down
67 changes: 65 additions & 2 deletions src/OpenClaw.SetupEngine.UI/NativeGatewayEligibilityText.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,77 @@
using Microsoft.UI.Text;
using Microsoft.UI.Xaml.Automation;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Documents;

namespace OpenClaw.SetupEngine.UI;

internal static class NativeGatewayEligibilityText
{
private static readonly string[] UnavailableEmphasisKeys =
[
"Onboarding_Native_SupportUnavailableLead",
"Onboarding_Native_SupportUnavailableComingSoon",
"Onboarding_Native_SupportUnavailableInsiderProgram",
"Onboarding_Native_SupportUnavailableChannels",
"Onboarding_Native_SupportUnavailableWindowsVersion",
"Onboarding_Native_SupportUnavailableWindowsUpdate",
];

internal static string Get(NativeGatewayEligibility eligibility) => eligibility switch
{
NativeGatewayEligibility.Available => SetupLocalization.GetString("Onboarding_Native_SupportAvailable"),
NativeGatewayEligibility.CapabilityUnavailable => SetupLocalization.Format(
"Onboarding_Native_SupportUnavailable", NativeGatewaySetupEligibility.InsiderBuild),
NativeGatewayEligibility.CapabilityUnavailable =>
SetupLocalization.GetString("Onboarding_Native_SupportUnavailable"),
NativeGatewayEligibility.UnsupportedPlatform => SetupLocalization.GetString("Onboarding_Native_UnsupportedPlatform"),
NativeGatewayEligibility.CheckFailed => SetupLocalization.GetString("Onboarding_Native_SupportCheckFailed"),
_ => throw new ArgumentOutOfRangeException(nameof(eligibility)),
};

internal static void Apply(TextBlock target, NativeGatewayEligibility eligibility)
{
string text = Get(eligibility);

if (eligibility != NativeGatewayEligibility.CapabilityUnavailable ||
!TryGetEmphasisRanges(text, out var ranges))
{
ApplyPlain(target, text);
return;
}

target.Inlines.Clear();
AutomationProperties.SetName(target, text);
int position = 0;
foreach (var range in ranges)
{
if (range.Start > position)
target.Inlines.Add(new Run { Text = text[position..range.Start] });

target.Inlines.Add(new Run
{
Text = text.Substring(range.Start, range.Length),
FontWeight = FontWeights.SemiBold,
});
position = range.Start + range.Length;
}

if (position < text.Length)
target.Inlines.Add(new Run { Text = text[position..] });
}

internal static void ApplyPlain(TextBlock target, string text)
{
target.Inlines.Clear();
target.ClearValue(AutomationProperties.NameProperty);
target.Text = text;
}

private static bool TryGetEmphasisRanges(
string text,
out List<(int Start, int Length)> ranges)
{
return NativeGatewayEmphasisRanges.TryGet(
text,
UnavailableEmphasisKeys.Select(SetupLocalization.GetString),
out ranges);
}
}
28 changes: 28 additions & 0 deletions src/OpenClaw.SetupEngine.UI/NativeGatewayEmphasisRanges.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace OpenClaw.SetupEngine.UI;

internal static class NativeGatewayEmphasisRanges
{
internal static bool TryGet(
string text,
IEnumerable<string> emphases,
out List<(int Start, int Length)> ranges)
{
ranges = [];
foreach (string emphasis in emphases)
{
if (string.IsNullOrWhiteSpace(emphasis))
return false;

int start = text.IndexOf(emphasis, StringComparison.Ordinal);
if (start < 0)
return false;

ranges.Add((start, emphasis.Length));
}

ranges.Sort((left, right) => left.Start.CompareTo(right.Start));
return ranges.Zip(ranges.Skip(1), (left, right) =>
left.Start + left.Length <= right.Start)
.All(nonOverlapping => nonOverlapping);
}
}
13 changes: 10 additions & 3 deletions src/OpenClaw.SetupEngine.UI/Pages/WelcomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ private async Task CheckNativeSupportAsync()
WindowsUpdateButton.Visibility = Visibility.Collapsed;
NativeCheckProgress.IsActive = true;
NativeCheckProgress.Visibility = Visibility.Visible;
NativeSupportStatus.Text = SetupLocalization.GetString("Onboarding_Native_CheckingSupport");
NativeGatewayEligibilityText.ApplyPlain(
NativeSupportStatus,
SetupLocalization.GetString("Onboarding_Native_CheckingSupport"));
ApplySelection();

NativeGatewayEligibility eligibility;
Expand All @@ -121,7 +123,10 @@ private async Task CheckNativeSupportAsync()
NativeSupportStatusPanel.Visibility = available ? Visibility.Collapsed : Visibility.Visible;
WindowsUpdateButton.Visibility = eligibility == NativeGatewayEligibility.CapabilityUnavailable
? Visibility.Visible : Visibility.Collapsed;
NativeSupportStatus.Text = available ? "" : NativeGatewayEligibilityText.Get(eligibility);
if (available)
NativeGatewayEligibilityText.ApplyPlain(NativeSupportStatus, "");
else
NativeGatewayEligibilityText.Apply(NativeSupportStatus, eligibility);
NativeCheckProgress.IsActive = false;
NativeCheckProgress.Visibility = Visibility.Collapsed;
SetChoice(NativeGatewaySetupEligibility.ResolveSelection(_selectedChoice, eligibility));
Expand Down Expand Up @@ -185,7 +190,9 @@ private void ShowWindowsUpdateError()
{
NativeSupportCard.Visibility = Visibility.Visible;
NativeSupportStatusPanel.Visibility = Visibility.Visible;
NativeSupportStatus.Text = SetupLocalization.GetString("Onboarding_Native_UpdateLaunchFailed");
NativeGatewayEligibilityText.ApplyPlain(
NativeSupportStatus,
SetupLocalization.GetString("Onboarding_Native_UpdateLaunchFailed"));
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/OpenClaw.SetupEngine/NativeGatewaySetupEligibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ public enum GatewaySetupChoice { Native, Existing, Wsl }
/// <summary>Onboarding admission only. Capability does not imply that the Gateway runs in an MXC session.</summary>
public static class NativeGatewaySetupEligibility
{
// Session baseline documented by the pinned @microsoft/mxc-sdk README.
// The live probe, not a build-number comparison, remains authoritative.
public const string InsiderBuild = "26340.9212";

public static NativeGatewayEligibility Probe(IOpenClawLogger? logger = null) =>
Evaluate(MxcAvailability.Probe(logger));

Expand Down
12 changes: 11 additions & 1 deletion src/OpenClaw.Tray.WinUI/Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -7777,7 +7777,17 @@ Your settings, gateway, files, and models stay where they are.</value>
<data name="Onboarding_Wsl_Title.Text" xml:space="preserve"><value>Install a local WSL gateway</value></data>
<data name="Onboarding_Native_CheckingSupport" xml:space="preserve"><value>Checking native gateway support...</value></data>
<data name="Onboarding_Native_SupportAvailable" xml:space="preserve"><value>Native gateway support is available on this device.</value></data>
<data name="Onboarding_Native_SupportUnavailable" xml:space="preserve"><value>Native gateway support is unavailable. Install Windows Insider build {0} or a newer supported build in Windows Update, then reopen this page. Feature availability can vary by device.</value></data>
<data name="Onboarding_Native_SupportUnavailable" xml:space="preserve"><value>To use the native gateway, update your device to a Windows version that supports it.

Native gateway support is coming soon to all devices. Until it is broadly available, join the Windows Insider Program, select the Beta or Experimental channel, and choose Windows 11, version 26H1 under Advanced options during enrollment. Returning to Windows 11, version 25H2/26H2 requires a clean reinstall.

After enrolling, return to Settings &gt; Windows Update and check for updates. It may take a few minutes for the update to appear. Feature availability can vary by device. After updating, reopen this page to check support again.</value></data>
<data name="Onboarding_Native_SupportUnavailableLead" xml:space="preserve"><value>To use the native gateway, update your device to a Windows version that supports it.</value></data>
<data name="Onboarding_Native_SupportUnavailableComingSoon" xml:space="preserve"><value>coming soon to all devices.</value></data>
<data name="Onboarding_Native_SupportUnavailableInsiderProgram" xml:space="preserve"><value>Windows Insider Program</value></data>
<data name="Onboarding_Native_SupportUnavailableChannels" xml:space="preserve"><value>Beta or Experimental</value></data>
<data name="Onboarding_Native_SupportUnavailableWindowsVersion" xml:space="preserve"><value>Windows 11, version 26H1</value></data>
<data name="Onboarding_Native_SupportUnavailableWindowsUpdate" xml:space="preserve"><value>Settings &gt; Windows Update</value></data>
<data name="Onboarding_Native_SupportCheckFailed" xml:space="preserve"><value>Could not verify native gateway support. Reopen this page to retry. If the check keeps failing, update or repair Companion.</value></data>
<data name="Onboarding_Native_UnsupportedPlatform" xml:space="preserve"><value>Native gateway setup requires a supported Windows client. Windows Server is not supported.</value></data>
<data name="Onboarding_Native_WindowsUpdate.Content" xml:space="preserve"><value>Open Windows Update</value></data>
Expand Down
12 changes: 11 additions & 1 deletion src/OpenClaw.Tray.WinUI/Strings/fr-fr/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -7713,7 +7713,17 @@ Vos paramètres, votre passerelle, vos fichiers et vos modèles restent en place
<data name="Onboarding_Wsl_Title.Text" xml:space="preserve"><value>Installer un Gateway WSL local</value></data>
<data name="Onboarding_Native_CheckingSupport" xml:space="preserve"><value>Vérification de la prise en charge du Gateway natif...</value></data>
<data name="Onboarding_Native_SupportAvailable" xml:space="preserve"><value>Le Gateway natif est pris en charge sur cet appareil.</value></data>
<data name="Onboarding_Native_SupportUnavailable" xml:space="preserve"><value>Le Gateway natif n'est pas pris en charge. Installez la build Windows Insider {0} ou une build plus récente prise en charge via Windows Update, puis rouvrez cette page. La disponibilité de cette fonctionnalité peut varier selon l'appareil.</value></data>
<data name="Onboarding_Native_SupportUnavailable" xml:space="preserve"><value>Pour utiliser le Gateway natif, mettez votre appareil à jour vers une version de Windows compatible.

La prise en charge du Gateway natif sera bientôt disponible sur tous les appareils. En attendant sa disponibilité générale, rejoignez le programme Windows Insider, sélectionnez le canal Bêta ou Expérimental, puis choisissez Windows 11 version 26H1 dans les Options avancées lors de l'inscription. Le retour à Windows 11 version 25H2/26H2 nécessite une réinstallation complète.

Après votre inscription, revenez dans Paramètres &gt; Windows Update et recherchez les mises à jour. L'affichage de la mise à jour peut prendre quelques minutes. La disponibilité de cette fonctionnalité peut varier selon l'appareil. Après la mise à jour, rouvrez cette page pour vérifier à nouveau la prise en charge.</value></data>
<data name="Onboarding_Native_SupportUnavailableLead" xml:space="preserve"><value>Pour utiliser le Gateway natif, mettez votre appareil à jour vers une version de Windows compatible.</value></data>
<data name="Onboarding_Native_SupportUnavailableComingSoon" xml:space="preserve"><value>sera bientôt disponible sur tous les appareils.</value></data>
<data name="Onboarding_Native_SupportUnavailableInsiderProgram" xml:space="preserve"><value>programme Windows Insider</value></data>
<data name="Onboarding_Native_SupportUnavailableChannels" xml:space="preserve"><value>Bêta ou Expérimental</value></data>
<data name="Onboarding_Native_SupportUnavailableWindowsVersion" xml:space="preserve"><value>Windows 11 version 26H1</value></data>
<data name="Onboarding_Native_SupportUnavailableWindowsUpdate" xml:space="preserve"><value>Paramètres &gt; Windows Update</value></data>
<data name="Onboarding_Native_SupportCheckFailed" xml:space="preserve"><value>Impossible de vérifier la prise en charge du Gateway natif. Rouvrez cette page pour réessayer. Si la vérification échoue à nouveau, mettez à jour ou réparez Companion.</value></data>
<data name="Onboarding_Native_UnsupportedPlatform" xml:space="preserve"><value>La configuration du Gateway natif nécessite une version cliente de Windows prise en charge. Windows Server n'est pas pris en charge.</value></data>
<data name="Onboarding_Native_WindowsUpdate.Content" xml:space="preserve"><value>Ouvrir Windows Update</value></data>
Expand Down
Loading
Loading