feat(ui): splash screen to mask cold-start delay#26
Conversation
Main window now starts `visible: false`; a small transparent secondary window (`splashscreen`, 360x240, always-on-top, off taskbar) shows the WaveFlow logo + indeterminate progress bar while the Rust setup chain runs and the React bundle parses. main.tsx shows the main window after the first React frame, then closes the splash so the desktop is never visible between the two. Particularly noticeable on the very first launch after install, when Windows SmartScreen / Defender scans every freshly-extracted DLL.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a splash screen shown during cold start while the backend boots and the React bundle loads. The main window launches hidden; a frameless, always-on-top ChangesSplash Screen Feature
Sequence DiagramsequenceDiagram
participant Launcher as App launch (Tauri)
participant Splash as splashscreen window
participant Backend as Tauri backend
participant Renderer as React renderer / main window
Launcher->>Splash: display `splash.html` (always-on-top)
Launcher->>Backend: start backend / boot
Backend->>Renderer: serve React bundle
Renderer->>Renderer: first React frame rendered
Renderer->>Launcher: call revealMainWindow()
Launcher->>Renderer: show main window
Launcher->>Splash: close splashscreen
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@public/splash.html`:
- Line 2: The HTML splash has lang="fr" and a French aria-label ("Chargement de
WaveFlow"); update the document to be language-agnostic by either changing
lang="fr" to lang="en" or removing the lang attribute, and replace the French
aria-label on the splash element (the aria-label near line 96 referencing
"Chargement de WaveFlow") with an English equivalent like "Loading WaveFlow" or
a neutral label (or remove it) so screen readers in other locales won't get
French text.
- Line 41: The CSS rule -webkit-app-region: drag applied to the .card in
public/splash.html is likely redundant because the splash window is configured
focus: false in tauri.conf.json; inspect whether the splash is ever intended to
be draggable—if not, remove the -webkit-app-region: drag declaration from the
.card rule; if dragging is required, instead make the splash window focusable in
tauri.conf.json (set focus: true) or limit the drag region to a small header
element rather than the whole .card to avoid giving a non-interactive window a
drag region.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7bbf0a8d-6b3b-49a2-9ae7-3cbe041dbdc8
📒 Files selected for processing (4)
docs/features/ui.mdpublic/splash.htmlsrc-tauri/tauri.conf.jsonsrc/main.tsx
- switch splash lang from fr to en (paints before i18n is initialised, English is the neutral fallback for screen readers in any locale) - drop redundant -webkit-app-region: drag on .card (splash is ephemeral and non-focusable, nothing to drag)
Summary
visible: false; a small transparent secondary window (splashscreen, 360×240, always-on-top, off the taskbar) shows the WaveFlow logo + indeterminate progress bar while the Rust setup chain runs and the React bundle parses.main.tsxreveals the main window after the first React frame (doublerequestAnimationFrame), then closes the splash — order matters so the desktop is never visible between the two.Why
Before: 10–30 s of empty white WebView on the first post-install launch. The duration was driven by AV scanning + WebView2 first-run init + the serial
block_onchain insetup()(openapp.db, run all sqlx migrations, create default profile, cold-init cpal/WASAPI, SMTC, …). User perceived the app as broken.After: same total time (AV scanning is incompressible), but the user sees a branded loading widget instead of a white rectangle. Perception fixed.
Files
public/splash.html— static HTML with inline SVG logo (the 5-bar equalizer fromassets/logo.svg, same gradient as the README) and a pure-CSS indeterminate bar. Zero JS, paints the instant the WebView2 process spawns.src-tauri/tauri.conf.json—mainwindow getsvisible: false; newsplashscreenwindow declared (transparent, decorations off, always-on-top, skipTaskbar, no shadow, no focus).src/main.tsx—revealMainWindow()after first frame:getCurrentWindow().show()thenWindow.getByLabel("splashscreen").close(). Skipped for the mini-player (?mini=1) which is its own window opened user-triggered.docs/features/ui.md— new "Splash screen" section.Test plan
bun run tauri build, uninstall any prior install + delete%LOCALAPPDATA%/waveflow, install fresh and launch — verify the splash appears immediately and the main window takes over without a white flash.transparent: true+decorations: falseare honoured everywhere we ship.Summary by CodeRabbit
New Features
Documentation