fix(ui): the viewport's tools are its logical children; remote editor tests read a shared job table safely

The preview tools are a property value of the viewport, presented by its template
with no logical parent, so neither an element-name nor an ancestor binding gave
them the editor reliably: the crop result toggle then showed with no tooltip.
As logical children they inherit the viewport's data context like any content.

The remote editor tests changed the fake server's job table while the source's
event loop read it, which could hand the loop a null job; it is now a concurrent
dictionary. The read-only test waits for the event, which is raised after the
flag is set, instead of the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-11 23:20:51 +00:00
1 parent c5a01c1290
commit 77e07bf000
5 files changed
+26 -11

No files matched your search

@@ -413,7 +413,9 @@ public sealed class RemoteSequenceSourceTests(TestContext context)
api.FramesVersion = 3;
api.Publish(new SequenceChangedEvent(Guid.CreateVersion7(), "frames", 7, 1));
api.Publish(new SequenceChangedEvent(remote.Sequence.Id, "frames", 3, api.SettingsVersion));
await WaitAsync(() => source.IsOutdated);
// The flag is set before the event is raised: wait for the event, which comes last.
await WaitAsync(() => Volatile.Read(ref changes) > 0);
Assert.True(source.IsOutdated);
Assert.True(source.IsReadOnly);
Assert.Equal(1, Volatile.Read(ref changes));