Skip to content

feat(app): show an animated startup splash while disks load - #244

Merged
coldhighsun merged 2 commits into
mainfrom
feat/startup-splash
Oct 9, 2026
Merged

coldhighsun merged 2 commits into
mainfrom
feat/startup-splash

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

Show a splash window at startup while the saved disks are auto-mounted in the background, instead of showing the main window with a busy overlay.

  • The splash is shown on every start, including a minimized start (where only the main window stays hidden). It displays the loading progress ("Loading disk x of y"), a pulsing logo, randomized drifting background circles and a scrolling list of key features (localized, English and Simplified Chinese).
  • When loading is done it closes (after a short minimum display time) and the main window is shown in its place.
  • A disk that needs a password hands over to the main window and its busy overlay first, so the prompt is not hidden behind the splash; the bar continues from where the splash stopped.
  • StartUi is now StartUiAsync and yields to the dispatcher between chunks, so the splash keeps rendering while the UI is built. The WinFsp check runs once, before the splash.
  • Queued CLI commands are released as soon as auto-mount ends, before the splash is closed.

Splash behaviour details:

  • Stays on top only for a few seconds, steps back for startup message boxes and for dialogs opened from the tray, does not take focus, and refuses Alt+F4 until the app dismisses it.
  • Has a taskbar button (not for a minimized start).
  • Honors the Windows "show animations" setting: no moving circles/pulse, and a single static feature line instead of the scrolling list.
  • Decoration parameters (number of circles, sizes, opacity, speeds, start/end points, logo pulse) are randomized on every start.
  • ShutdownMode is switched to OnExplicitShutdown only while the splash is the sole window, and Application.MainWindow is set explicitly to the main window.

The ordering rules (SplashLifecycle, StartupCompletion), the topmost state, the scroll helpers and the animation parameter planner are free of WPF types and unit tested. AggregateProgress.Combined and MainViewModel.AutoMountCompleted are small additions used by the password hand-over (first commit).

Test plan

  • dotnet build (0 warnings, 0 errors)
  • dotnet test tests/ManagedDrive.Tests (1739 passed)
  • Run a Release build with auto-mount disks: splash appears, animates, shows progress, then the main window appears
  • Start minimized: splash is shown without a taskbar button, the main window stays hidden, only the tray icon remains
  • Encrypted disk: the password prompt is not hidden behind the splash and the progress bar continues
  • Light and dark themes; English and Simplified Chinese; Windows animations turned off
  • Alt+F4 on the splash is ignored; mdrive exit during startup exits cleanly; WinFsp missing shows the warning and exits without a splash

AggregateProgress.Combined returns the last combined fraction so a progress
display that takes over midway can continue from it, and
MainViewModel.AutoMountCompleted exposes how many disks the startup
auto-mount has finished with.
Show a splash window at startup (also for a minimized start, where only the
main window stays hidden) while the saved disks are auto-mounted in the
background. It shows the loading progress, a pulsing logo, randomized
drifting background circles and a scrolling list of key features, and hands
over to the main window once loading is done.

- SplashLifecycle sequences the end of the splash (minimum display time,
  close, main window) and StartupCompletion releases queued CLI commands
  before the splash closes; both are WPF-free and unit tested
- StartUi is split into chunks that yield to the dispatcher, so the splash
  keeps rendering while the UI is built
- The splash stays on top only for a few seconds, does not take focus, has a
  taskbar button (except for a minimized start), refuses Alt+F4 and follows
  the Windows animation setting
- A password prompt hands over to the main window and its busy overlay first
- The WinFsp check runs once, before the splash
@coldhighsun
coldhighsun merged commit d58793d into main Oct 9, 2026
5 checks passed
@coldhighsun
coldhighsun deleted the feat/startup-splash branch October 9, 2026 07:58
@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant