acdream/tests
Erik 169a6c6e32 perf(vtank): slice 7 fix round B item 12 — materialize grid columns once per mutation, not once per frame
Every retained-UI draw re-evaluates every markup-bound column property.
Several of these did real per-row work on EVERY frame instead of returning
a cached field:

- ExcludedComponentIcons (Consumables) called ResolveComponentIcon per row,
  which itself calls IAutomation.Items.CaptureOwnedItems() — a live
  inventory snapshot — per row per frame.
- All 23 Monsters-grid columns (14 flag columns via MonsterFlagColumn, 7
  text columns, 2 move-icon columns) re-ran a LINQ .Select(...).ToArray()
  over _combatSettings.Rules every frame; Weapon/Offhand additionally
  called ItemDisplayName (another CaptureOwnedItems() scan) per row.
- Meta's MetaStateColumn/MetaConditionColumn/MetaActionColumn/
  MetaDeleteColumn/MetaMoveUpIcons/MetaMoveDownIcons and Route's
  RouteWaypointCountColumn allocated a fresh array with LINQ every frame.

Fixed by materializing each into a field, computed once at the point of
actual mutation:

- ExcludedComponentIcons: computed in RefreshItemEditors (already the sole
  owner of _excludedComponentRows).
- RouteWaypointCountColumn: computed in RefreshRouteEditor (already called
  at 13 real mutation points, including profile load).
- Meta's 6 columns: computed in RefreshMetaEditor (already called at every
  real mutation point, including profile load).
- Monsters' 23 columns: new RefreshMonsterEditor, wired into the 4 actual
  Rules-mutating methods (AddMonsterRuleCore, DeleteMonsterRuleAtCore,
  MoveMonsterRuleAtCore, UpdateMonsterActionsAt — the last already covers
  every flag toggle and value-cycle action) plus panel construction and
  ResetProfileConsumers (profile load/switch). The now-unused
  MonsterFlagColumn helper is removed.

New tests (FakeAutomation gained a CaptureOwnedItemsCallCount counter):
ExcludedComponentIconsDoesNotScanLiveInventoryOnEveryRead,
MonsterGridColumnsDoNotScanLiveInventoryOrAllocateOnEveryRead (also asserts
Assert.Same across reads), MetaAndRouteGridColumnsDoNotReallocateOnEveryRead.
All three mutation-checked by temporarily reverting to the old per-read
computation: each turned red (call-count mismatch or Assert.Same failure)
against the reverted code; restoring the cached-field getters turns each
green.

tests/AcDream.Plugins.MossTank.Tests: 674/674 (was 671/671, +3 new tests).
tests/AcDream.App.Tests --filter Markup|Plugin|UiMenu|Slider: 278/3 skipped/281 (unchanged — App-layer surface untouched by this item).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-07 13:32:40 +02:00
..
AcDream.App.Tests feat(app): slice 7 fix round B item 11 — plain <slider> style, mirroring <menu style> 2026-09-07 13:09:33 +02:00
AcDream.Bake.Tests Optimize prepared asset package v2 2026-08-27 20:09:09 +02:00
AcDream.Cli.Tests build: make release restore reproducible 2026-08-18 10:29:00 +02:00
AcDream.Content.Tests fix(rendering): carry retail SetSurface state to detail draws 2026-09-05 02:03:13 +02:00
AcDream.Core.Net.Tests fix: complete retail parity stability pass 2026-08-28 20:01:39 +02:00
AcDream.Core.Tests fix(vt): F host-composed VtankProfiles storage replaces raw path string 2026-09-06 23:03:04 +02:00
AcDream.Core.Tests.Fixtures.HelloPlugin feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Headless.Tests test(headless): the console's unknown-verb pin follows AD-124 — chat scroll, not SpewBox 2026-09-07 08:27:39 +02:00
AcDream.Launcher.Core.Tests fix(rendering): carry retail SetSurface state to detail draws 2026-09-05 02:03:13 +02:00
AcDream.Launcher.Core.Tests.Fixtures.ConsolelessSupervisorParent build: make release restore reproducible 2026-08-18 10:29:00 +02:00
AcDream.Launcher.Core.Tests.Fixtures.ConsoleSignalChild build: make release restore reproducible 2026-08-18 10:29:00 +02:00
AcDream.Launcher.Core.Tests.Fixtures.InstallLeaseHolder feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Launcher.Tests Optimize prepared asset package v2 2026-08-27 20:09:09 +02:00
AcDream.Platform.Tests feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugin.Tests.Fixtures.HostPlugin feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugin.Tests.Fixtures.InvalidRenderPackInternal feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugin.Tests.Fixtures.InvalidRenderPackMultiple feat(render): implement Campaign AR and terrain fidelity 2026-08-22 13:13:29 +02:00
AcDream.Plugins.MossTank.Tests perf(vtank): slice 7 fix round B item 12 — materialize grid columns once per mutation, not once per frame 2026-09-07 13:32:40 +02:00
AcDream.RenderPackValidator.Tests feat(render): shader ABI v2 - AtmosphericFrame gains clock/wind blocks; caster pass binds it (Campaign VM VM6a) 2026-08-23 00:30:02 +02:00
AcDream.Runtime.Tests fix #363/#367: route unknown-command refusals to chat, not SpewBox 2026-09-07 08:22:06 +02:00
AcDream.UI.Abstractions.Tests fix #363: route plugin system text to the chat window, not SpewBox 2026-09-07 08:22:22 +02:00
Fixtures/campaign-la feat(plugins): enforce apiVersion; launcher plugins default ON with "none" opt-out 2026-08-20 21:28:04 +02:00
Directory.Build.props fix: retail text and golden-string tests must not follow the machine's locale 2026-08-19 19:56:09 +02:00
TestCultureInitializer.cs fix: retail text and golden-string tests must not follow the machine's locale 2026-08-19 19:56:09 +02:00