fix(app): archive picks, early import job ends and language switches
- Archive: picking another archive while the screen was reading kept the old archive's tree and figures while Scan, Verify and the set actions targeted the new one, and reloads asked for during a read were dropped. A load requested during a read now runs once more after it, a read whose archive is no longer picked shows nothing, and a new pick clears the tree and the online state until the picked archive is read. - Import: a job that ended before the screen recorded its id (a destination gone offline) left the screen copying forever; its state is read back once. A replaced import result is disposed, so it no longer stays alive through the language event with its whole plan. - Library: the timeline's month readouts are made again on a language switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
6 files changed
+170
-7
No files matched your search
@@ -170,6 +170,34 @@ public sealed class ArchiveScreenSmokeTests
|
||||
static DialogFact Fact(RebuildDialogViewModel dialog, string label) => dialog.FactRows.Single(f => f.Label == Loc.L(label));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Picking another archive while one is being read shows the picked one: the read in progress is followed by one of
|
||||
/// the new archive, and meanwhile nothing of the previous archive's tree can be acted on.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public Task PickingAnotherArchiveDuringAReadShowsThePickedOne() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
|
||||
await app.Sample.FillAsync();
|
||||
var archive = app.Shell.Archive;
|
||||
await ArchiveScenes.ShowAsync(app.Shell, "overview");
|
||||
Assert.Contains(archive.TreeRows, r => r.Node.Kind == TreeNodeKind.Sequence);
|
||||
var second = await app.Services.Archives!.CreateAsync(Path.Combine(app.Services.Environment.DataDirectory, "second-archive"), "Second");
|
||||
|
||||
var reading = archive.LoadAsync();
|
||||
archive.SelectedArchive = second;
|
||||
Assert.Empty(archive.TreeRows);
|
||||
Assert.False(archive.AnalyseSetCommand.CanExecute(null), "nothing of the first archive can be acted on while the picked one is read");
|
||||
Assert.False(archive.ScanCommand.CanExecute(null), "the picked archive is not known to be online yet");
|
||||
await reading;
|
||||
|
||||
Assert.Equal(second.Id, archive.SelectedArchive!.Id);
|
||||
Assert.Contains(archive.Archives, a => a.Id == second.Id);
|
||||
Assert.True(archive.TreeRows[0].IsArchive);
|
||||
Assert.False(archive.TreeRows.Any(r => r.Node.Kind == TreeNodeKind.Sequence), "the tree is the picked, empty archive's");
|
||||
Assert.True(archive.ScanCommand.CanExecute(null), "the picked archive was probed: it is online");
|
||||
});
|
||||
|
||||
[Test]
|
||||
public void TheArrowTowardsTheIndentOpensAYearInEitherDirection()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user