mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
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.
This commit is contained in:
28
docs/LAUNCHER_STARTUP_VISUALS.md
Normal file
28
docs/LAUNCHER_STARTUP_VISUALS.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Launcher Startup Visuals
|
||||
|
||||
This supplement records the startup rules that are shared by the launcher and the desktop host.
|
||||
|
||||
## Timeout behavior
|
||||
|
||||
- `30 seconds` is a soft timeout.
|
||||
- Soft timeout means `still starting`, not `failed`.
|
||||
- When the host process is alive or Public IPC is connected, Launcher keeps waiting and avoids launching another host process.
|
||||
- `120 seconds` is the hard timeout for `desktop_not_visible`.
|
||||
|
||||
## Visual mode resolution
|
||||
|
||||
- `EnableSlideTransition = true` resolves to `SlideSplash` and forces `EnableFadeTransition = false`.
|
||||
- `EnableSlideTransition = false` and `EnableFadeTransition = false` resolves to `StaticSplash`.
|
||||
- `EnableSlideTransition = false` and `EnableFadeTransition = true` resolves to `Fade`.
|
||||
|
||||
## Fullscreen splash rules
|
||||
|
||||
- Fullscreen splash uses the shared `logo_nightly.png` asset.
|
||||
- Slide splash enters from the right edge of the target screen and exits back to the right edge.
|
||||
- Static splash uses the same fullscreen black surface without motion.
|
||||
|
||||
## Recovery rules
|
||||
|
||||
- Closing Launcher during startup does not cancel the startup attempt.
|
||||
- Relaunching Launcher attaches to the active attempt instead of spawning a second desktop process.
|
||||
- If a host process is still alive during failure handling, Launcher offers activation or continued waiting before any retry.
|
||||
Reference in New Issue
Block a user