2 Commits
Author SHA1 Message Date
Alby96andClaude Opus 5.5 a191c70b7b docs: changelog and decisions for the Windows test of v1.1.0
CI / Build and test (pull_request) Successful in 11m15s
CI / Windows tests and installer (pull_request) Skipped
CI / YAML check (pull_request) Successful in 21s
CI / PostgreSQL 16 integration (pull_request) Successful in 10m35s
CI / PostgreSQL 17 integration (pull_request) Successful in 11m17s
CI / Docker image (pull_request) Successful in 45s
Refs #70

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:58:22 +01:00
Alby96andClaude Opus 5.5 28a9afdd7c test(app): bring the screen smoke tests up to date and give the Reorganize scene sidecars
The App suite had not run on Windows since CI has no Windows runner, so five screen smoke
tests had gone stale: the archive folder is shown masked, the sync table offers the
workspace disabled on older servers, the sample has ten jobs, a year-row check raced the
tree rebuild, and the Reorganize capture showed every sequence unreadable because the
sample had no sidecars. The certificate rows' server column gives way earlier so Forget
fits at 1200 px in Bulgarian.

Refs #70

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:50:08 +01:00
9 changed files with 88 additions and 5 deletions

No files matched your search

+12
View File
@@ -5,6 +5,18 @@ commits follow Conventional Commits (release notes are generated from them by `C
## [Unreleased]
### Fixed
- Settings › Server › Certificates: Forget stays whole beside the 200 px rail at 1200 px in every language (it ran 5 px
out of the page in Bulgarian); the server name gives way first (#70).
- The Reorganize screen capture (`archive-reorganize-*.png`) showed every sample sequence as unreadable with Apply off:
the sample archive had no sidecars. The capture now gives each sample sequence a sidecar and a stand-in photo for the
dry run, and removes them after it (#70).
### Tests
- The App suite ran whole on Windows for the first time since CI lost its Windows job: five screen smoke tests had gone
stale (masked archive path, the disabled workspace action of older servers, ten sample jobs, the Reorganize sample, a
year-row check racing the tree rebuild) and are up to date (#70).
## [1.1.0] — 2026-11-15
Owner review 5 for v1.1.0 (`docs/requests/2026-11-15-owner-review-5.md`; issues #64, #65, #66, #67). Upgrading from
+2
View File
@@ -897,3 +897,5 @@ One line per decision: date · decision · alternative · reason.
| 2026-11-15 | Exit asks first only when the share is on and the programs of the last minutes plus the render nodes online (`LibraryShare.ActiveClientsAsync`, read again at the click) are not 0; Keep sharing is the default | Ask at every Exit while sharing | The question matters only when someone loses the library; the Server section counts clients the same way |
| 2026-11-15 | The "keeps sharing" notification shows once per run, at the first hide; the balloons of unseen toasts go through the same tray icon (`OsNotifications.SharedIcon`) | Once ever (a setting); a second icon for toasts | No new setting for a one-line hint; one icon in the notification area |
| 2026-11-15 | The 1.0 service probe (`ServiceProbe`: `OpenSCManager` connect + `OpenService` query-status P/Invoke) runs when Server › This library opens and at each change of sharing state, shows a warning row whatever the state, and reads access denied as installed | `System.ServiceProcess` (not in the shared framework, a package); probe only after a port failure | Read-only and unelevated; the row is advice before sharing is turned on as much as after a failure |
| 2026-11-16 | Until a Windows runner is registered, the App and Core.Windows suites and the screenshot diff run on the development PC before every release, and a release waits for them (#70) | Trust the Linux CI alone | The screen smoke tests had gone stale for weeks unnoticed: CI never runs them |
| 2026-11-16 | `installer-test.ps1` is not run on a PC that has Chronos installed for all users: the setup finds the all-users install when no per-user one exists and asks for elevation to upgrade or remove it. It runs on a clean Windows (the CI windows job, a VM) | Point the script at another product name | The upgrade and legacy paths it checks only exist for the product `Chronos` |
+61
View File
@@ -20,6 +20,8 @@ public static class ArchiveScenes
await archive.LoadAsync();
var db = shell.Services.Database ?? throw new InvalidOperationException("The sample index is not open.");
var locations = archive.SelectedArchive is { } selected ? await db.Sequences.ListLocationsAsync(selected.Id) : [];
// What the Reorganize view wrote leaves with it, so the sample's sizes stay the same for the views after it.
RemoveSampleFiles();
switch (view)
{
case "overview":
@@ -35,6 +37,9 @@ public static class ArchiveScenes
break;
case "reorganize":
archive.ViewIndex = 0;
// The dry run reads each sequence's sidecar, which the sample index has none of: without them every
// sequence would show "cannot be read" and Apply would stay off.
if (archive.SelectedArchive is { } reorganized) await WriteSampleSidecarsAsync(db, reorganized.RootPath, locations);
await archive.OpenReorganizeDialogAsync();
if (archive.Dialog is ReorganizeDialogViewModel reorganize)
{
@@ -60,4 +65,60 @@ public static class ArchiveScenes
throw new ArgumentOutOfRangeException(nameof(view), view, "Unknown Archive view.");
}
}
/// <summary>
/// A minimal sidecar for each sample sequence that has none yet: its id, title and camera, and one small stand-in photo in
/// its originals taken at its first capture, which the templates' dates and file names come from.
/// </summary>
private static async Task WriteSampleSidecarsAsync(Data.ChronosDatabase db, string root, IReadOnlyList<Data.Repositories.SequenceLocation> locations)
{
// A file is recorded before it is written, so one half written goes too.
var paths = new Core.Archiving.ArchivePaths(root);
byte[] photo = [0xFF, 0xD8, 0xFF, 0xD9];
var sha256 = Convert.ToHexStringLower(System.Security.Cryptography.SHA256.HashData(photo));
foreach (var location in locations)
{
var folder = paths.Sequence(location.Folder);
if (System.IO.File.Exists(folder.ManifestPath) || await db.Sequences.GetAsync(location.Id) is not { } sequence) continue;
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(folder.ManifestPath)!);
const string file = Core.Archiving.ArchiveLayout.OriginalsFolder + "/IMG_0001.JPG";
var frames = new List<Core.Archiving.SidecarFrame>();
if (sequence.FirstCapture is { } first)
{
var onDisk = System.IO.Path.Combine(folder.Folder, file);
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(onDisk)!);
SampleFiles.Add(onDisk);
System.IO.File.WriteAllBytes(onDisk, photo);
frames.Add(new Core.Archiving.SidecarFrame { Id = Guid.CreateVersion7(), File = file, Size = photo.Length, Sha256 = sha256, CapturedAt = first });
}
SampleFiles.Add(folder.ManifestPath);
Core.Archiving.ManifestStore.WriteSequence(folder.ManifestPath, new Core.Archiving.SequenceManifest
{
Id = sequence.Id,
Title = sequence.Title,
Camera = new Core.Archiving.SidecarCamera { Make = sequence.CameraMake, Model = sequence.CameraModel },
Frames = frames,
});
}
}
/// <summary>The files <see cref="WriteSampleSidecarsAsync"/> wrote that are still on disk.</summary>
private static readonly List<string> SampleFiles = [];
/// <summary>Deletes the files the Reorganize view wrote for its dry run.</summary>
private static void RemoveSampleFiles()
{
foreach (var path in SampleFiles)
{
try
{
System.IO.File.Delete(path);
}
catch (Exception ex) when (ex is System.IO.IOException or UnauthorizedAccessException)
{
Core.Diagnostics.Log.Warning("capture", $"{path} of the sample stays", ex);
}
}
SampleFiles.Clear();
}
}
+1 -1
View File
@@ -694,7 +694,7 @@
<Grid Height="36">
<!-- The server name gives way first (it ends in an ellipsis), so Forget fits at 1200 px in longer languages. -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="120" />
<ColumnDefinition Width="*" MinWidth="100" />
<ColumnDefinition Width="170" />
<ColumnDefinition Width="110" />
<ColumnDefinition Width="Auto" />
@@ -100,7 +100,7 @@ public sealed class ArchiveScreenSmokeTests
Assert.NotEmpty(reorganize.Rows, "the dry run lists the sequences that change");
Assert.Null(reorganize.ErrorText);
await app.ExpectAsync<ArchiveView>("archive-reorganize");
Assert.True(ButtonFor(app, reorganize.ApplyCommand).IsEnabled, "Apply follows the dry run");
Assert.True(ButtonFor(app, reorganize.ApplyCommand).IsEnabled, "Apply follows the dry run: " + reorganize.ApplyToolTip);
Assert.True(ButtonFor(app, reorganize.CloseCommand).IsDefault, "Enter takes the safe way out");
foreach (var box in app.FindAll<CheckBox>().Where(c => c.IsVisible)) Assert.NotNull(box.ToolTip, "every template switch says what it does");
AssertNoErrorShown(app);
@@ -149,7 +149,7 @@ public sealed class ArchiveScreenSmokeTests
// The dialogs' templates exist once they are laid out: render first, then look inside.
await ArchiveScenes.ShowAsync(app.Shell, "rebuild");
await app.ExpectAsync<ArchiveView>("archive-rebuild-ar");
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, archive.SelectedArchive!.RootPath).FlowDirection, "the archive folder reads left to right");
Assert.Equal(FlowDirection.LeftToRight, TextFor(app, AppEnvironment.Shown(archive.SelectedArchive!.RootPath)).FlowDirection, "the archive folder reads left to right");
await ArchiveScenes.ShowAsync(app.Shell, "reorganize");
var reorganize = Assert.NotNull(archive.Dialog as ReorganizeDialogViewModel);
@@ -299,7 +299,14 @@ public sealed class ArchiveScreenSmokeTests
UiLanguage.Apply(language);
window.UpdateLayout();
await window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
// A language switch builds the tree's rows again; they may arrive a few layout passes later.
var years = TreeItems(app).Where(i => ((ArchiveTreeRowViewModel)i.DataContext).IsYear).ToList();
for (var until = DateTime.UtcNow.AddSeconds(TestTiming.Budget(5)); years.Count == 0 && DateTime.UtcNow < until;)
{
await Task.Delay(50);
window.UpdateLayout();
years = TreeItems(app).Where(i => ((ArchiveTreeRowViewModel)i.DataContext).IsYear).ToList();
}
Assert.True(years.Count > 0, $"{language}: year rows show");
foreach (var item in years)
{
@@ -50,7 +50,8 @@ public sealed class ServerScreenSmokeTests
var sunrise = Row(table, "Sunrise over Superga");
Assert.Equal(SyncStatus.ProxiesOnly, sunrise.Entry.Status);
Assert.Equal(Loc.L("Server.Sync.Proxies"), sunrise.LocalText);
Assert.SequenceEqual([SyncAction.OpenWithProxies, SyncAction.DownloadOriginals], Actions(sunrise));
// A server without projects: open with proxies; the workspace is offered, disabled with the reason (phase 5b).
Assert.SequenceEqual([SyncAction.OpenWithProxies, SyncAction.DownloadOriginals, SyncAction.OpenInWorkspace], Actions(sunrise));
Assert.SequenceEqual([SyncAction.Upload], Actions(Row(table, "Clouds over the Langhe")));
var conflict = Row(table, "Holy grail · Monviso");
Assert.Equal(StatusKind.Warning, conflict.StateKind);
@@ -83,7 +83,7 @@ public sealed class ScreenSmokeTests
Assert.Equal(0, shell.Library.SelectionCount);
shell.Navigate(SectionKey.Jobs);
Assert.Equal(9, shell.Jobs.Rows.Count);
Assert.Equal(10, shell.Jobs.Rows.Count, string.Join(" | ", shell.Jobs.Rows.Select(r => r.AccessibleName)));
Assert.True(shell.IsJobActive, "running jobs show in the job bar");
shell.Jobs.Rows[0].IsExpanded = true;
await app.ExpectAsync<JobsView>("jobs");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 90 KiB