fix(ux): 14 cross-platform UX/UI fixes from 500-game audit
Web client (game.js): - Restart game timer after undo exits auto-complete sequence - Pause timer while browser tab is hidden (visibilitychange) - Validate URL seed — NaN / negative falls back to randomSeed() - Guard onBoardClick/onBoardDblClick during win (snap.is_won) - Delay win overlay 320 ms so last card CSS transition finishes - Force reflow in flashIllegal() to restart shake on rapid re-trigger Android (safe_area.rs): - Preserve last-known insets on app resume instead of zeroing them; eliminates double layout flash on every foreground cycle All clients — Bevy engine: - Radial menu: clamp icon anchors to viewport bounds so icons are never placed off-screen on narrow phones - Auto-complete: deactivate state.active when is_auto_completable goes false (undo mid-sequence) to stop perpetual background retry - Touch selection: gate highlight rebuild on is_changed() — was despawning/respawning entities every frame unnecessarily - Input: fire "Tap a pile to move" InfoToast on first tap in TapToSelect mode; document cursor_world 1:1 viewport invariant - Drag threshold: raise desktop from 4 → 6 px to prevent accidental drags from cursor jitter on HiDPI displays Desktop / Android (solitaire_app): - Call cleanup_orphaned_tmp_files() at startup to remove .tmp files left by crashes between atomic write and rename Design clarification (klondike_adapter.rs): - Doc comment: Draw-1 recycling is penalty-only by design (never blocked) to avoid creating unwinnable positions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,10 @@ use bevy::window::{MonitorSelection, PresentMode, WindowPosition};
|
||||
use bevy::winit::WinitWindows;
|
||||
#[cfg(target_os = "android")]
|
||||
use bevy::winit::{UpdateMode, WinitSettings};
|
||||
use solitaire_data::{Settings, load_settings_from, provider_for_backend, settings_file_path};
|
||||
use solitaire_data::{
|
||||
Settings, cleanup_orphaned_tmp_files, load_settings_from, provider_for_backend,
|
||||
settings_file_path,
|
||||
};
|
||||
use solitaire_engine::{CoreGamePlugin, SyncProvider, register_theme_asset_sources};
|
||||
|
||||
fn load_settings() -> Settings {
|
||||
@@ -49,6 +52,12 @@ pub fn run() {
|
||||
// and any debugger attached still sees the panic).
|
||||
install_crash_log_hook();
|
||||
|
||||
// Remove any *.tmp files left behind by a crash between an atomic write
|
||||
// and its rename. Safe to call unconditionally — missing data dir is a
|
||||
// no-op. Must run before GamePlugin loads saved state so orphaned files
|
||||
// don't accumulate across launches.
|
||||
let _ = cleanup_orphaned_tmp_files();
|
||||
|
||||
// Initialise the platform keyring store before any token operations.
|
||||
// On Linux this uses the Secret Service (GNOME Keyring / KWallet); on
|
||||
// macOS it uses the Keychain; on Windows it uses the Credential store.
|
||||
|
||||
Reference in New Issue
Block a user