art(starting): the corrected onboarding screen, and a heal that actually heals

The creator's corrected Starting artwork (the in-app onboarding screen: sign in → stream details →
go live) replaces yesterday's version. 2724x1536 resampled to the 1920x1080 master, q3 (432 KB).
The previous Gemini render is archived beside the original art.

Also fixes the two reasons the replacement would not have appeared on an existing profile:

- **The first heal iterated `AllBackgrounds()`**, which returns only the LIVE scene's capture rows, so it
  cleared nothing and then saved the version anyway — permanently skipping the heal. It now walks every
  scene's background. Version bumped to 4 so profiles stamped 2 or 3 heal.
- **The pack URI was unqualified**, so it resolved against the ENTRY assembly: LlamaCasty.exe in
  production, the test host under `dotnet test`, where the seed silently did nothing. It is now
  `/LlamaCasty;component/Assets/…`, which works in both.

Test: `BackgroundDefaultArtTests` seeds a profile, plants an "old art" asset on the Starting background,
marks the layout as an older art vintage, relaunches and asserts the shipped art is re-stamped. 45
background tests pass.
This commit is contained in:
2026-11-06 12:04:06 -08:00
parent f7e1b76cdd
commit a6f15a4bc3
4 changed files with 106 additions and 5 deletions
+15 -5
View File
@@ -429,7 +429,7 @@ public partial class MainViewModel
/// drops duplicates/stale rows, re-seeds missing ones.</summary>
/// <summary>Bump when a bundled background image is replaced. Layouts stamped with an older version
/// re-seed their DEFAULT art on next load; a creator's own custom background is never touched.</summary>
private const int CurrentDefaultArtVersion = 2;
private const int CurrentDefaultArtVersion = 4;
/// <summary>Re-stamp the shipped art for scenes still using the default. Without this, a replaced
/// <c>starting-background.jpg</c> reaches new installs only: the asset is hash-keyed into the layout
@@ -438,12 +438,19 @@ public partial class MainViewModel
{
if (_layoutStore.LoadDefaultArtVersion() >= CurrentDefaultArtVersion) return;
foreach (var background in AllBackgrounds())
// Every scene's background, not AllBackgrounds(): that helper only returns the LIVE scene's
// capture-flavoured rows, which is why version 2 healed nothing (2026-11-06).
var cleared = 0;
foreach (var scene in Scenes)
foreach (var background in scene.Elements.OfType<Source>().Where(element => element.IsBackground))
{
if (!background.UseDefaultBackground) continue; // the creator chose their own art
background.AssetId = null; // seed re-stamps it below
if (!background.UseDefaultBackground && !string.IsNullOrWhiteSpace(background.CustomBackgroundPath))
continue; // the creator chose their own art
background.AssetId = null; // the seed below re-stamps the bundled art
cleared++;
}
AppLog.Write($"Default art version {CurrentDefaultArtVersion}: re-seeding {cleared} background(s)");
_layoutStore.SaveDefaultArtVersion(CurrentDefaultArtVersion);
}
@@ -516,7 +523,10 @@ public partial class MainViewModel
try
{
var uri = new Uri($"pack://application:,,,/Assets/{asset}", UriKind.Absolute);
// Assembly-qualified on purpose: the unqualified form resolves against the ENTRY assembly,
// which is LlamaCasty.exe in production but the test host under `dotnet test` — so the seed
// silently did nothing there (and the art test could not see the bundled image).
var uri = new Uri($"pack://application:,,,/LlamaCasty;component/Assets/{asset}", UriKind.Absolute);
using var stream = Application.GetResourceStream(uri)?.Stream;
if (stream == null) return;
using var ms = new MemoryStream();