feat: SK backlog from test through 2026.11.22.48 (Trade Shop + inventory/loot/chat/nav)

Squash of test/main-merge-2026-10-25 onto aelrynth main 2026.11.19.1 for the standing sk PR. Includes Trade Shop Storefront, loot checklist editor, chat routing, window placements, and related engine work. See Changelog/2026-11-22-sk-backlog-test-merge.md.
This commit is contained in:
BlankenshipG 2026-11-23 00:08:31 -05:00
commit c6e8bb8dbf
438 changed files with 39545 additions and 1271 deletions

View file

@ -255,7 +255,8 @@ namespace EngineSettingsTests
Eq(after.GetProperty("EnableImGuiShell").GetBoolean(), false, "EnableImGuiShell kept");
Eq(after.GetProperty("DecalBridge").GetString(), "On", "DecalBridge On kept");
foreach (JsonProperty p in before.EnumerateObject())
Check(after.TryGetProperty(p.Name, out JsonElement kept) && JsonElement.DeepEquals(kept, p.Value), $"unchanged key {p.Name} keeps the file's value");
if (p.Name != "DisabledUiHooks")
Check(after.TryGetProperty(p.Name, out JsonElement kept) && JsonElement.DeepEquals(kept, p.Value), $"unchanged key {p.Name} keeps the file's value");
foreach (string key in new[] { "EnablePlugins", "EnableDatShareHook", "EnableAvaloniaOverlay", "EnableD3D9Hook", "EnableEngine", "EngineHookCount", "EnableHangMinidump", "PreventIdleLogoff" })
Check(after.TryGetProperty(key, out _) == before.TryGetProperty(key, out _), $"owned key {key} not added or dropped by an unrelated save");
@ -271,6 +272,17 @@ namespace EngineSettingsTests
Eq(after.GetProperty("EnableImGuiBackend").GetBoolean(), false, "EnableImGuiBackend saved");
Check(after.TryGetProperty("EnableDcompOverlay", out _) && after.TryGetProperty("LauncherWindow", out _), "launcher keys survive a second save");
Eq(after.GetProperty("DisabledUiHooks").GetArrayLength(), 1, "first save's DisabledUiHooks kept");
// Two clients: one saved EnableImGuiBackend=false above; "another client" now turns the
// shell back on in the file. A later save of a different key here must not put the
// stale EnableImGuiShell back (the last-writer-wins reset of 2026-10-16).
var doc = System.Text.Json.Nodes.JsonNode.Parse(File.ReadAllText(path))!.AsObject();
doc["EnableImGuiShell"] = true;
File.WriteAllText(path, doc.ToJsonString());
(exit, output) = RunChild(path, "hook-off", "AnotherHook");
Eq(exit, 0, "third child exit code (" + output.Trim() + ")");
after = ReadJson(path);
Eq(after.GetProperty("EnableImGuiShell").GetBoolean(), true, "another client's EnableImGuiShell survives this client's save");
}
private static void SaveRoundTripsOwnedKeys()
@ -937,14 +949,23 @@ namespace EngineSettingsTests
Eq(DecideSave(true, true, true, LogoutRect, InGame, ref pending, t0).Action, AcWindowPlacementRule.SaveAction.LoginShrink, "Save Layout Now on the login-size window: refused");
}
// Source guard: every SetWindowPos on the AC window keeps AC's size (R-20261115-160655-1201).
// Source guard: AC's window is never given a size of its own (R-20261115-160655-1201: a restored smaller
// window crops the picture and leaves the HUD out of reach). Upstream keeps the size with SWP_NOSIZE. The
// test branch's AcWindowChrome (2026-11-17 merge) sizes the window on purpose (Borderless Fills Monitor, a
// framed window sized for the resolution), so the guard there is: one SetWindowPos (MoveTo), a restore that
// takes only the saved position with the size from AC's resolution, and borderless sized from the
// resolution or the monitor.
private static void AcWindowChromeNeverResizes()
{
string source = File.ReadAllText(FindUp(Path.Combine("src", "RynthCore.Engine", "UI", "AcWindowChrome.cs")));
var calls = Regex.Matches(source, @"^\s*(?:=>\s*)?SetWindowPos\(hwnd,[^;]*;", RegexOptions.Multiline | RegexOptions.Singleline);
Check(calls.Count >= 2, $"found the SetWindowPos calls ({calls.Count})");
foreach (Match m in calls)
Check(m.Value.Contains("SwpNosize"), "SetWindowPos keeps AC's size: " + Regex.Replace(m.Value.Trim(), @"\s+", " "));
Check(calls.Count >= 1, $"found the SetWindowPos calls ({calls.Count})");
Check(Regex.IsMatch(source, @"private static void MoveTo\(IntPtr hwnd, RECT r\) =>\s*SetWindowPos\(hwnd,"), "the only window move is MoveTo");
Check(calls.Count == 1, $"no SetWindowPos outside MoveTo ({calls.Count})");
Match restore = Regex.Match(source, @"private static void TryRestorePlacement\(IntPtr hwnd\)\s*\{(?<body>.*?)\n \}", RegexOptions.Singleline);
Check(restore.Success, "found TryRestorePlacement");
Check(restore.Groups["body"].Value.Contains("TryFramedSizeForResolution("), "the restore's size comes from AC's resolution, not the saved rect");
Check(source.Contains("BorderlessAtResolution(") && source.Contains("IsLoginScreenSize("), "borderless sized from the resolution; the login-screen size never restored");
}
private static void PlacementFilesArePerClient()