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

@@ -1,5 +1,7 @@
using System.Globalization;
using Chronos.App.Import;
using Chronos.App.Infrastructure;
using Chronos.Core.Imaging;
using Chronos.Core.Import;
using Chronos.Core.Localization;
using Chronos.Testing;
@@ -20,6 +22,10 @@ public sealed class ImportPlansTests
Session(3, "2026/2026-09-30 Canon EOS R5", Item(7, Start.AddDays(2), action: ImportAction.SkipImported)));
}
/// <summary>A whole folder shot over eight days, as one sequence.</summary>
internal static ImportPlan OverEightDays() =>
Plan(null, null, Session(1, "2026/Construction", Item(1, Start), Item(2, Start.AddDays(8).AddMinutes(3)))) with { Grouping = ImportGrouping.WholeFolder };
[Test]
public void TotalsCountWhatIsCopiedSkippedAndDuplicated()
{
@@ -104,6 +110,21 @@ public sealed class ImportPlansTests
Assert.Equal("Server", ImportPlans.Sessions(plan, ImportDestinationKind.Server, new HashSet<string>())[0].TargetText);
}
[Test]
public void ASessionThatEndsOnAnotherDayShowsBothDates()
{
var plan = OverEightDays();
var end = Start.AddDays(8).AddMinutes(3);
var time = ImportPlans.Sessions(plan, ImportDestinationKind.Archive, new HashSet<string>())[0].TimeText;
Assert.Equal($"{Formatting.Date(Start)} {Start.ToString("t", Loc.Culture)} → {Formatting.Date(end)} {end.ToString("t", Loc.Culture)}", time);
Assert.Equal(Loc.L("Import.Details.Session", 1, time), ImportPlans.Details(plan, ImportDestinationKind.Archive, verify: true).Rows[0].SourceText,
"the Show plan heading reads the same");
var sameDay = ImportPlans.Sessions(ThreeSessions(), ImportDestinationKind.Archive, new HashSet<string>())[0].TimeText;
Assert.Equal($"{Formatting.Date(Start)} · {Start.ToString("t", Loc.Culture)} → {Start.AddSeconds(8).ToString("t", Loc.Culture)}", sameDay,
"a session within one day shows its date once");
}
[Test]
public void ShowPlanListsEveryFileItsDestinationAndTheConflicts()
{
@@ -175,6 +196,51 @@ public sealed class ImportPlansTests
Assert.Equal(1, split[2].MergesInto, "the earlier session of the same body, skipping the other camera");
}
[Test]
public void AWholeFolderRowShowsItsFormatAndCamerasWithTheFolderNameAsDefaultTitle()
{
var jpeg = Session(1, "2026/2026-09-28 Canon EOS R5", Item(1, Start), Item(2, Start.AddHours(5))) with
{
SessionKey = "folder-jpeg",
Format = ImageFileFormat.Jpeg,
Cameras = 2,
Title = "Etna",
DefaultTitle = "Etna",
};
var raw = Session(2, "2026/2026-09-28 Canon EOS R5 (2)", Item(3, Start), Item(4, Start.AddHours(5))) with
{
SessionKey = "folder-raw",
Title = "Etna",
DefaultTitle = "Etna",
};
var plan = Plan(null, null, jpeg, raw) with { Grouping = ImportGrouping.WholeFolder };
var rows = ImportPlans.Sessions(plan, ImportDestinationKind.Archive, new HashSet<string>());
Assert.Equal("2 cameras · JPEG", rows[0].CameraText);
Assert.Equal("Canon EOS R5 · CR2", rows[1].CameraText);
Assert.Null(rows[0].Title, "the folder's name is the placeholder, not typed text");
Assert.Equal("Etna", rows[0].DefaultTitle);
Assert.Null(rows[1].MergesInto, "another format never merges");
var bySessions = ImportPlans.Sessions(plan with { Grouping = ImportGrouping.Sessions }, ImportDestinationKind.Archive, new HashSet<string>());
Assert.Equal("Canon EOS R5", bySessions[1].CameraText);
var titled = ImportPlans.WithTitles(plan, new Dictionary<string, string> { ["folder-jpeg"] = "Etna at night" });
Assert.Equal("Etna at night", titled.Sessions[0].Title);
Assert.Equal("Etna", titled.Sessions[1].Title, "a sequence without a typed title keeps the folder's name");
Assert.Equal("Etna at night", ImportPlans.Sessions(titled, ImportDestinationKind.Archive, new HashSet<string>())[0].Title);
}
[Test]
public void AWholeFolderPartMergesBackIntoThePartBeforeItOfTheSameFormatWhateverItsCamera()
{
var first = Session(1, "2026/Etna", Item(1, Start));
var second = Session(2, "2026/Etna (2)", Item(2, Start.AddHours(1))) with { CameraMake = "Nikon", CameraModel = "NIKON Z 8" };
var plan = Plan(null, null, first, second) with { Grouping = ImportGrouping.WholeFolder };
Assert.Equal(1, ImportPlans.Sessions(plan, ImportDestinationKind.Archive, new HashSet<string>())[1].MergesInto);
Assert.Null(ImportPlans.Sessions(plan with { Grouping = ImportGrouping.Sessions }, ImportDestinationKind.Archive, new HashSet<string>())[1].MergesInto,
"sessions of another camera never merge");
}
[Test]
public void ShowPlanOffersASplitOnEveryPhotoButTheFirstOfItsSession()
{