feat(engine): one-shot What's-new card after updates (Phase I)
ObtainX updates install silently, so shipped features went unnoticed. On the first launch where the running release differs from the new Settings::last_seen_whats_new, a dismissible card summarises the latest CHANGELOG.md section (embedded; its top version doubles as the app's release identity — no build-time version plumbing). Internal sections are dropped and bullets reduce to their bold lead sentence. Launch beat: splash -> onboarding (first run) -> what's-new -> Home; spawn_home_on_launch waits on the new WhatsNewPending resource. Fresh installs never see the card — onboarding completion stamps the current version silently. The seen-stamp persists on spawn, not dismissal, so the card can never nag twice. 8 new tests (changelog parsing incl. the real embedded file, upgrade/ seen/fresh-install gating, dismissal). Workspace + clippy green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -480,6 +480,10 @@ fn persist_last_mode(
|
||||
/// owns the launch beat; Home appearing underneath it stacked two
|
||||
/// modals (Phase H fix; spotted in the v0.44.0 emulator smoke). Home
|
||||
/// spawns on the first frame after the player finishes or skips.
|
||||
/// * The What's-new card (Phase I) must have had its beat —
|
||||
/// [`crate::whats_new_plugin::WhatsNewPending`] released — so an
|
||||
/// upgrade's release notes get read before the mode picker lands on
|
||||
/// top of them.
|
||||
/// * `HomeScreen` must not already exist (defensive — e.g. the player
|
||||
/// pressed `M` between ticks).
|
||||
/// * `LaunchHomeShown` flips to `true` after the first spawn so this
|
||||
@@ -494,6 +498,7 @@ fn spawn_home_on_launch(
|
||||
restore_prompts: Query<(), With<crate::game_plugin::RestorePromptScreen>>,
|
||||
pending_restore: Option<Res<crate::game_plugin::PendingRestoredGame>>,
|
||||
onboarding: Query<(), With<crate::onboarding_plugin::OnboardingScreen>>,
|
||||
whats_new: Option<Res<crate::whats_new_plugin::WhatsNewPending>>,
|
||||
existing: Query<(), With<HomeScreen>>,
|
||||
sources: HomeSpawnSources,
|
||||
mut deal_expanded: ResMut<DealOptionsExpanded>,
|
||||
@@ -503,6 +508,7 @@ fn spawn_home_on_launch(
|
||||
|| !restore_prompts.is_empty()
|
||||
|| pending_restore.as_ref().is_some_and(|p| p.0.is_some())
|
||||
|| !onboarding.is_empty()
|
||||
|| whats_new.as_ref().is_some_and(|w| w.0)
|
||||
|| sources
|
||||
.settings
|
||||
.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user