mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
Introduce a launcher coordinator to reserve startup ownership and prevent duplicate host launches. Adds a NamedPipe-based IPC server/client (LauncherCoordinatorIpcServer/Client), coordinator messages/models, and PublicShellStatus/activation types for richer shell reporting. Enhances StartupAttemptRecord and StartupAttemptRegistry to track coordinator pid/pipe, heartbeat, reserved-before-host-start, and public IPC status, plus new reservation/heartbeat APIs and takeover logic. Wire coordinator into App and LauncherFlowCoordinator to attach secondary launchers, publish coordinator status, probe existing hosts, and include more detailed launch result details. Also adds unit tests and docs describing coordinator and startup visuals behavior.
2.1 KiB
2.1 KiB
Launcher Slow-Startup And Startup Visual Addendum
New startup timing contract
30sis a soft timeout, not a failure threshold.- After
30s, if the desktop process is still alive or Public IPC is connected, Launcher must stay in a waiting state and must not start another host process. 120sis the hard timeout.- Before returning
desktop_not_visible, Launcher must attempt one foreground recovery throughActivateMainWindowAsync().
Startup attempt de-duplication
- Launcher persists the current startup attempt in
%LocalAppData%\LanMountainDesktop\.launcher\state\startup-attempt.json. - A second Launcher process must attach to a live pending attempt instead of calling
Process.Start()again. - Closing the splash window does not cancel startup; it transitions the attempt into detached waiting and preserves recovery state for the next Launcher run.
Startup visual modes
EnableSlideTransition = trueforcesStartupVisualMode.SlideSplashand automatically disables fade.EnableSlideTransition = false && EnableFadeTransition = falseresolves toStartupVisualMode.StaticSplash.EnableSlideTransition = false && EnableFadeTransition = trueresolves toStartupVisualMode.Fade.
UX safeguards
- If the host process is still alive at failure time, the failure dialog must prefer:
ActivateWaitOpen LogsExit
- Retry is only valid when Launcher is not about to create a duplicate desktop process.
Launcher coordinator guard
- Startup attempts are now reserved before host launch, so concurrent Launchers cannot all reach
Process.Start(). - A live coordinator is identified by
CoordinatorPid,CoordinatorPipeName, and a heartbeat newer than10s. - Secondary Launchers send
activate-desktoporattachto the coordinator pipe and then exit with the coordinator status. - If Host Public IPC is already available during a normal launch, Launcher activates the existing desktop and does not start a new host process.
- Public shell status now reports tray readiness and taskbar-entry usability separately, allowing Launcher to distinguish "running but hidden" from "not recoverable".