2026-04-21 20:59:52 +08:00
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:views="clr-namespace:LanMountainDesktop.Launcher.Views"
|
2026-05-12 16:46:49 +08:00
|
|
|
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
|
|
|
|
xmlns:fi="using:FluentIcons.Avalonia"
|
2026-05-18 12:26:23 +08:00
|
|
|
xmlns:res="clr-namespace:LanMountainDesktop.Launcher.Resources"
|
2026-04-21 20:59:52 +08:00
|
|
|
mc:Ignorable="d"
|
|
|
|
|
x:Class="LanMountainDesktop.Launcher.Views.ErrorWindow"
|
|
|
|
|
x:DataType="views:ErrorWindow"
|
2026-05-18 12:26:23 +08:00
|
|
|
x:CompileBindings="False"
|
|
|
|
|
Title="{x:Static res:Strings.Error_Title}"
|
2026-05-12 16:46:49 +08:00
|
|
|
Width="760"
|
|
|
|
|
Height="460"
|
|
|
|
|
MinWidth="640"
|
|
|
|
|
MinHeight="420"
|
2026-04-21 20:59:52 +08:00
|
|
|
CanResize="False"
|
|
|
|
|
WindowStartupLocation="CenterScreen"
|
2026-05-12 16:46:49 +08:00
|
|
|
Background="{DynamicResource SolidBackgroundFillColorBaseBrush}"
|
|
|
|
|
TransparencyLevelHint="Mica, AcrylicBlur, None"
|
2026-04-21 20:59:52 +08:00
|
|
|
Icon="/Assets/logo.ico">
|
|
|
|
|
<Design.DataContext>
|
|
|
|
|
<views:ErrorWindow />
|
|
|
|
|
</Design.DataContext>
|
|
|
|
|
|
|
|
|
|
<Grid RowDefinitions="*,Auto">
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
<Grid Grid.Row="0"
|
2026-05-12 16:46:49 +08:00
|
|
|
Margin="28,24,28,20"
|
|
|
|
|
RowDefinitions="Auto,Auto,*"
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
ColumnDefinitions="Auto,*">
|
2026-04-21 20:59:52 +08:00
|
|
|
<Border x:Name="ErrorIconBorder"
|
|
|
|
|
Grid.Column="0"
|
2026-05-12 16:46:49 +08:00
|
|
|
Width="56"
|
|
|
|
|
Height="56"
|
|
|
|
|
Margin="0,0,18,0"
|
|
|
|
|
Background="{DynamicResource SystemFillColorCriticalBackgroundBrush}"
|
|
|
|
|
CornerRadius="28"
|
2026-04-21 20:59:52 +08:00
|
|
|
VerticalAlignment="Top">
|
2026-05-12 16:46:49 +08:00
|
|
|
<fi:SymbolIcon Symbol="ErrorCircle"
|
|
|
|
|
IconVariant="Regular"
|
|
|
|
|
FontSize="28"
|
|
|
|
|
Foreground="{DynamicResource SystemFillColorCriticalBrush}"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
VerticalAlignment="Center" />
|
2026-04-21 20:59:52 +08:00
|
|
|
</Border>
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="1"
|
2026-05-12 16:46:49 +08:00
|
|
|
Spacing="8">
|
2026-04-21 20:59:52 +08:00
|
|
|
<TextBlock x:Name="TitleText"
|
2026-05-18 12:26:23 +08:00
|
|
|
Text="{x:Static res:Strings.Error_TitleCannotConfirm}"
|
2026-05-12 16:46:49 +08:00
|
|
|
FontSize="22"
|
2026-04-21 20:59:52 +08:00
|
|
|
FontWeight="SemiBold"
|
2026-05-12 16:46:49 +08:00
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
TextWrapping="Wrap" />
|
|
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
<TextBlock x:Name="ErrorMessageText"
|
2026-05-18 12:26:23 +08:00
|
|
|
Text="{x:Static res:Strings.Error_MessageNotReached}"
|
2026-04-21 20:59:52 +08:00
|
|
|
FontSize="14"
|
2026-05-12 16:46:49 +08:00
|
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
2026-04-21 20:59:52 +08:00
|
|
|
TextWrapping="Wrap"
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
LineHeight="22" />
|
2026-04-21 20:59:52 +08:00
|
|
|
</StackPanel>
|
2026-05-12 16:46:49 +08:00
|
|
|
|
|
|
|
|
<ui:FAInfoBar x:Name="SuggestionInfoBar"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
|
Margin="0,20,0,14"
|
|
|
|
|
IsOpen="True"
|
|
|
|
|
IsClosable="False"
|
|
|
|
|
Severity="Warning"
|
2026-05-18 12:26:23 +08:00
|
|
|
Title="{x:Static res:Strings.Error_SuggestionTitle}"
|
|
|
|
|
Message="{x:Static res:Strings.Error_SuggestionMessage}">
|
2026-05-12 16:46:49 +08:00
|
|
|
<ui:FAInfoBar.IconSource>
|
|
|
|
|
<ui:FAFontIconSource Glyph="󰊈"
|
|
|
|
|
FontFamily="avares://fluenticons.resources.avalonia/Assets#Seagull Fluent Icons" />
|
|
|
|
|
</ui:FAInfoBar.IconSource>
|
|
|
|
|
</ui:FAInfoBar>
|
|
|
|
|
|
|
|
|
|
<Expander Grid.Row="2"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Grid.ColumnSpan="2"
|
2026-05-18 12:26:23 +08:00
|
|
|
Header="{x:Static res:Strings.Error_DiagnosticHeader}"
|
2026-05-12 16:46:49 +08:00
|
|
|
IsExpanded="True">
|
|
|
|
|
<TextBox x:Name="ErrorDetailsTextBox"
|
|
|
|
|
Margin="0,10,0,0"
|
|
|
|
|
MinHeight="150"
|
|
|
|
|
MaxHeight="190"
|
|
|
|
|
AcceptsReturn="True"
|
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
FontSize="12"
|
|
|
|
|
Text="Stage: launch
Code: unknown"
|
|
|
|
|
VerticalContentAlignment="Top" />
|
|
|
|
|
</Expander>
|
2026-04-21 20:59:52 +08:00
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="1"
|
2026-05-12 16:46:49 +08:00
|
|
|
Padding="18,14"
|
|
|
|
|
Background="{DynamicResource LayerOnMicaBaseAltFillColorDefaultBrush}">
|
|
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto"
|
|
|
|
|
ColumnSpacing="12">
|
|
|
|
|
<StackPanel Grid.Column="0"
|
|
|
|
|
Orientation="Horizontal"
|
|
|
|
|
Spacing="8">
|
|
|
|
|
<Button x:Name="OpenLogButton"
|
|
|
|
|
MinWidth="112"
|
|
|
|
|
Height="34">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
|
|
|
<fi:SymbolIcon Symbol="FolderOpen" IconVariant="Regular" FontSize="16"/>
|
2026-05-18 12:26:23 +08:00
|
|
|
<TextBlock Text="{x:Static res:Strings.Error_ButtonOpenLogs}"/>
|
2026-05-12 16:46:49 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
<Button x:Name="CopyDetailsButton"
|
|
|
|
|
MinWidth="100"
|
|
|
|
|
Height="34">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
|
|
|
<fi:SymbolIcon Symbol="Copy" IconVariant="Regular" FontSize="16"/>
|
2026-05-18 12:26:23 +08:00
|
|
|
<TextBlock Text="{x:Static res:Strings.Error_ButtonCopy}"/>
|
2026-05-12 16:46:49 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
</Button>
|
|
|
|
|
</StackPanel>
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
|
2026-05-12 16:46:49 +08:00
|
|
|
<StackPanel Grid.Column="2"
|
|
|
|
|
Orientation="Horizontal"
|
|
|
|
|
Spacing="8">
|
|
|
|
|
<Button x:Name="SecondaryActionButton"
|
2026-05-18 12:26:23 +08:00
|
|
|
Content="{x:Static res:Strings.Error_ButtonWait}"
|
2026-05-12 16:46:49 +08:00
|
|
|
MinWidth="96"
|
|
|
|
|
Height="34"
|
|
|
|
|
IsVisible="False" />
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
|
2026-05-12 16:46:49 +08:00
|
|
|
<Button x:Name="ExitButton"
|
|
|
|
|
MinWidth="92"
|
|
|
|
|
Height="34">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
|
|
|
<fi:SymbolIcon Symbol="Dismiss" IconVariant="Regular" FontSize="16"/>
|
2026-05-18 12:26:23 +08:00
|
|
|
<TextBlock Text="{x:Static res:Strings.Error_ButtonExit}"/>
|
2026-05-12 16:46:49 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
</Button>
|
Add startup visual modes and attempt registry
Implement startup visual behavior, de-duplicate startup attempts, and improve failure UX.
Key changes:
- Add spec and docs for startup visuals and timing contract (.trae/specs and docs/LAUNCHER_STARTUP_VISUALS.md).
- Introduce StartupVisualPreferences contract and resolver; create SplashWindow via resolved mode.
- Add StartupAttemptRecord model and a file-backed StartupAttemptRegistry to persist and coordinate in-progress startup attempts (attach/adopt, soft/hard timeouts, IPC/connect state, lifecycle updates).
- Update LauncherFlowCoordinator to: adopt/attach to existing attempts, track IPC connection and soft/hard timeouts (30s/120s), show delayed UI state, attempt foreground recovery via public IPC, compose detailed launch result metadata, and mark registry states (soft timeout, detached waiting, succeeded, failed).
- Add TryActivateExistingInstanceAsync to attempt activating an existing desktop via IPC.
- Change failure flow: ShowFailureWindowAsync now returns user choice; ErrorWindow updated to present Activate/Wait/Open Logs/Exit semantics and new layouts/styles; improved button wiring and debug/dev mode handling.
- Add UI and resource tweaks (ErrorWindow and SplashWindow changes), project asset link for nightly logo, and unit tests for StartupVisualPreferences.
These changes prevent duplicate desktop processes during slow startups, provide clearer UX for delayed startups, and persist startup attempt state across Launcher invocations for safer recovery/attach behavior.
2026-04-23 09:03:35 +08:00
|
|
|
|
2026-05-12 16:46:49 +08:00
|
|
|
<Button x:Name="PrimaryActionButton"
|
|
|
|
|
Classes="accent"
|
2026-05-18 12:26:23 +08:00
|
|
|
Content="{x:Static res:Strings.Error_ButtonRetry}"
|
2026-05-12 16:46:49 +08:00
|
|
|
MinWidth="112"
|
|
|
|
|
Height="34" />
|
|
|
|
|
</StackPanel>
|
2026-04-21 20:59:52 +08:00
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|