feat: owner review 2 phase 1: :latest, Unraid array space, Settings with About, whole-folder import (#9)
CI / Build and test (push) Successful in 5m11s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 8m57s
CI / PostgreSQL 16 integration (push) Successful in 3m10s
CI / PostgreSQL 17 integration (push) Successful in 3m30s
CI / Docker image (push) Successful in 49s
Release / Server image (push) Successful in 1m4s

- :latest follows the highest stable release, or the highest pre-release while none is stable (Chronos.Tools release-channels); bad tags are refused before anything is built.
- Unraid: CHRONOS_SPACE_PATH and the template's Array view show the array's free space; the write volume (cache) is shown apart; completions check the archive volume (507).
- Settings is a gear, docked at the foot of the admin sidebar; About is the last part of Settings on the desktop and the panel.
- Import > Folder > Whole folder: one sequence per format (desktop only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #9.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-10-27 01:09:59 +01:00
1 parent 5acdf146c7
commit 1f089888e8
320 files changed
+3030 -927

No files matched your search

@@ -9,6 +9,7 @@ using Chronos.App.Infrastructure;
using Chronos.App.Sections;
using Chronos.App.Shell;
using Chronos.App.Tests.Windows;
using Chronos.Core.Import;
using Chronos.Core.Localization;
using Chronos.Testing;
using Chronos.Ui.Controls;
@@ -222,6 +223,75 @@ public sealed class ImportScreenSmokeTests
await import.WaitForPlanAsync();
});
/// <summary>
/// "Group" (BRIEF §12.4) is offered for a picked folder only, and a card is always planned by sessions. Switching the
/// grouping drops the splits made on the other grouping's sessions, and the session controls it turns off say why.
/// </summary>
[Test]
public Task AWholeFolderIsOfferedForAFolderOnlyAndDropsTheSplitsMadeBefore() => ScreenHost.RunAsync(async () =>
{
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
await app.Sample.FillAsync();
var import = app.Shell.Import;
var card = SampleCards.Card(app.Services.Environment.DataDirectory);
// A card: no Group choice, and asking for a whole folder changes nothing.
await ShowAsync(app, "plan");
Assert.False(import.CanGroupFolder);
import.GroupWholeFolder = true;
Assert.True(import.GroupBySessions);
Assert.Equal(ImportGrouping.Sessions, import.Choices.Grouping);
Assert.True(import.SessionsApply);
// The card's photos picked as a folder start by sessions: night, dawn and sunset.
await import.ImportFolderAsync(card.Root);
await import.WaitForPlanAsync();
Assert.True(import.CanGroupFolder);
Assert.True(import.GroupBySessions);
Assert.Equal((ImportGrouping.Sessions, 3), (import.Plan!.Grouping, import.Plan.Sessions.Count));
// The sunset split in two halves of twelve photos.
import.ShowPlanCommand.Execute(null);
import.SplitCommand.Execute(import.Details!.Rows.Where(r => r.Kind == PlanRowKind.File).ToList()[^12]);
await import.WaitForPlanAsync();
Assert.Equal(4, import.Plan!.Sessions.Count, "the split starts a session");
// The whole folder is one sequence for its one format, not cut where the sessions were split.
import.GroupWholeFolder = true;
await WaitUntilAsync(app, () => import.Plan is { Grouping: ImportGrouping.WholeFolder } && import.Phase == ImportPhase.Ready, "the whole folder is planned");
Assert.Equal(ImportGrouping.WholeFolder, import.Choices.Grouping);
Assert.Equal(1, import.Plan!.Sessions.Count);
Assert.False(import.SessionsApply);
Assert.False(import.GapApplies);
var why = Loc.L("Import.Blocked.WholeFolder");
Assert.Equal((why, why, why), (import.SessionsToolTip, import.GapMinutes.ToolTip, import.MinimumFrames.ToolTip));
var boxes = app.FindAll<TextBox>().Where(t => IsInImport(t) && EditBehavior.GetField(t) is { } f && (f == import.GapMinutes || f == import.MinimumFrames)).ToList();
Assert.Equal(2, boxes.Count);
foreach (var box in boxes)
{
Assert.False(box.IsEnabled);
Assert.True(ToolTipService.GetShowOnDisabled(box), "a disabled session box still shows why");
Assert.Equal(why, box.ToolTip as string);
}
// Back to sessions: the split made before stays gone.
import.GroupBySessions = true;
await WaitUntilAsync(app, () => import.Plan is { Grouping: ImportGrouping.Sessions } && import.Phase == ImportPhase.Ready, "the sessions are planned again");
Assert.Equal(3, import.Plan!.Sessions.Count);
Assert.True(import.SessionsApply);
Assert.Equal(Loc.L("Tooltips.Import.Gap"), import.GapMinutes.ToolTip);
// Choosing the card again leaves the folder's whole-folder choice behind.
import.GroupWholeFolder = true;
await WaitUntilAsync(app, () => import.Plan is { Grouping: ImportGrouping.WholeFolder } && import.Phase == ImportPhase.Ready, "the whole folder is planned");
import.SelectSource(card.Identity);
await import.WaitForPlanAsync();
Assert.False(import.CanGroupFolder);
Assert.True(import.GroupBySessions);
Assert.Equal(ImportGrouping.Sessions, import.Choices.Grouping);
Assert.Equal((ImportGrouping.Sessions, 3), (import.Plan!.Grouping, import.Plan.Sessions.Count));
});
/// <summary>As <c>--capture</c> does: toasts of the previous state go, those of an insertion state stay.</summary>
private static async Task ShowAsync(ScreenSmokeTests.SampleApp app, string state)
{