fix: address the rc.14 review

Settings no longer makes a folder an archive on its own: a typed or
picked folder without archive.json is made one only after a
confirmation naming it, and Settings > Import keeps this PC's archive
folder and never creates one. A half-typed path or another PC's drive
letter could otherwise get .chronos and sidecars written unasked.

The server's structure check creates nothing in a root that lost its
archive.json (an unmounted disk's empty mount point) and reports it
unavailable; /health re-checks when its last check is over 10 s old,
so a fix on the host shows without a dashboard read.

The admin board reads the server newest first with Order off, counts
Published over the server's total, and a Shift range runs along the
lane picked in. Admin sizes keep number and unit together. A sent
workspace render whose file left exports/ is no longer listed as
missing. Desktop Board cards put their actions under the text while
the player is open. Start-up range errors name the CHRONOS_* variable;
the deploy guide documents the parallelism clamp and the log rule.

Refs #29 #31

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-06 17:52:44 +01:00
1 parent 159a8e6939
commit 2c15ee0e09
25 files changed
+336 -53

No files matched your search

@@ -302,6 +302,55 @@ public sealed class SettingsScreenSmokeTests
Assert.Equal(edited, shell.Services.Settings.FileTemplate);
});
[Test]
public Task AFolderTypedAsTheArchiveFolderBecomesAnArchiveOnlyWhenTheUserConfirms() => ScreenHost.RunAsync(async () =>
{
// Rc.14 review: the folder may be half-typed or one of the user's own; nothing is written there unasked.
var dialogs = new AnsweringDialogs();
await using var app = await ScreenSmokeTests.SampleApp.StartAsync(dialogs: dialogs);
var shell = app.Shell;
var settings = shell.Settings;
shell.Navigate(SectionKey.Settings);
settings.Page = SettingsPage.Archive;
var mine = System.IO.Path.Combine(shell.Services.Environment.DataDirectory, "my-photos");
System.IO.Directory.CreateDirectory(mine);
var manifest = new Chronos.Core.Archiving.ArchivePaths(mine).ManifestPath;
settings.ArchiveRoot.Text = mine;
Assert.True(settings.ArchiveRoot.Commit());
await settings.ArchiveRetarget;
Assert.Count(1, dialogs.Asked);
Assert.Equal(mine, dialogs.Asked[0].Detail);
Assert.False(System.IO.File.Exists(manifest), "declined: the folder stays as it was");
Assert.Empty(System.IO.Directory.EnumerateFileSystemEntries(mine));
Assert.Equal(mine, shell.Services.Settings.LastArchivePath);
dialogs.Answer = true;
settings.ArchiveRoot.Text = string.Empty;
Assert.True(settings.ArchiveRoot.Commit());
await settings.ArchiveRetarget;
settings.ArchiveRoot.Text = mine;
Assert.True(settings.ArchiveRoot.Commit());
await settings.ArchiveRetarget;
Assert.Count(2, dialogs.Asked);
Assert.True(System.IO.File.Exists(manifest), "confirmed: the folder is an archive");
});
/// <summary>Dialogs that record each confirmation and give <see cref="Answer"/>.</summary>
private sealed class AnsweringDialogs : IAppDialogs
{
public bool Answer { get; set; }
public List<ConfirmRequest> Asked { get; } = [];
public string? PickFolder(string title, string? initialFolder = null) => null;
public string? PickJsonFile(string title) => null;
public bool Confirm(ConfirmRequest request)
{
Asked.Add(request);
return Answer;
}
public bool SignIn(string server, string? username, Func<string, string, Task<string?>> signIn) => false;
}
[Test]
public Task TheFirstRunDialogKeepsTheKeyboardInside() => ScreenHost.RunAsync(async () =>
{