fix: Windows test of 1.1.0 — job log local time, Jobs Type column, stale screen tests (1.1.1) (#71)
The Windows hands-on test of v1.1.0 on the development PC (#70). - The App suite runs whole on Windows again. Five stale screen smoke tests are brought up to date. - The Reorganize capture gives the sample sidecars. - Forget fits in the Bulgarian certificate rows. - The job log shows local time. It stays UTC on disk, and lines are dated backwards from the job's end. - The Jobs and Server › Jobs Type column takes a 1* share (90–170 px). - Builds without a tag say 1.1.1. Closes #70 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
|
||||
<ChronosVersion Condition="'$(ChronosVersion)' == ''">1.1.0</ChronosVersion>
|
||||
<ChronosVersion Condition="'$(ChronosVersion)' == ''">1.1.1</ChronosVersion>
|
||||
<Version>$(ChronosVersion)</Version>
|
||||
<AssemblyVersion>$([System.Text.RegularExpressions.Regex]::Match($(ChronosVersion), '^\d+\.\d+\.\d+').Value).0</AssemblyVersion>
|
||||
<FileVersion>$(AssemblyVersion)</FileVersion>
|
||||
|
||||
@@ -5,6 +5,29 @@ commits follow Conventional Commits (release notes are generated from them by `C
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.1.1] — 2026-11-16
|
||||
|
||||
The Windows hands-on test of 1.1.0 (#70): import, Reorganize, sharing the library, a client, the tray and Exit were
|
||||
tried on the development PC with a portable copy. Two small fixes in Jobs; nothing changes in the archive, the database
|
||||
or the server.
|
||||
|
||||
### 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).
|
||||
- Jobs: the log under a job showed its times in UTC (12:35) while the rows show local time (13:35); the log now shows
|
||||
local time too. The stored log keeps UTC, so a server's jobs read right on every desktop (#70).
|
||||
- Jobs and Server › Jobs: the Type column takes a larger share of the width (up to 170 px), so "Analisi approfondita"
|
||||
is no longer cut in a 1440 px window; at the minimum width longer names still end in "…" with the whole name in the
|
||||
tooltip (#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
|
||||
|
||||
@@ -897,3 +897,7 @@ 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` |
|
||||
| 2026-11-16 | The job log keeps storing each line's time in UTC (`HH:mm:ss`); the desktop shows it in local time, dating the lines backwards from the job's end (or now): each line is the latest instant at or before the next one. A pause of a day or more between two lines cannot be seen and those lines take the later day, so across a clock change they may be an hour off (#70) | Write local time into the log; store full UTC timestamps | A server's jobs are read from desktops in any time zone, logs already stored stay readable, and the stored format (shown as is by the admin panel) does not change |
|
||||
| 2026-11-16 | The Type column of Jobs and Server › Jobs is a 1* share (was 0.7*), 90–170 px, so the Italian "Analisi approfondita" fits in a 1440 px window (#70) | `Auto` shared across the rows | `Auto` keeps its width at the minimum window, where the star columns are already at their minimums, and pushed the row actions out (Dutch, 12 px) |
|
||||
@@ -19,6 +19,7 @@ by its `windows` job once a Windows runner is registered (`WINDOWS_RUNNER`), and
|
||||
| 8.3 Owner review 2 | Done (request, answers and plan: `docs/requests/2026-10-26-owner-review-2.md`). Phase 1 done and released as `v0.1.0-rc.3` (one adversarial review round, 19 findings fixed; strings in all 38 languages): `:latest` follows the highest stable release, or the highest pre-release while none is stable (`Chronos.Tools release-channels`), `:nightly` stays the nightly build of `main` (R1); `CHRONOS_SPACE_PATH` and the Unraid template's *Array view* (`/mnt/user0/<share>` read-only at `/space`) make the admin panel show the array's free space, the cache apart as *Write volume*, the file system in the tooltip, and completing an upload checks the archive volume first (507, resumable) (R2); the Settings icon is a toothed gear and the admin panel docks Settings at the foot of its sidebar (R4); About is the last page of Settings on the desktop and the last group of Settings on the admin panel (R5); Import › Folder… › *Whole folder* imports a folder as one sequence per format, titled after the folder (R9). Phase 2 done and released as `v0.1.0-rc.4` (one adversarial review round, 35 findings fixed; strings in all 38 languages): scheduled jobs (R10) — schedules (migration 0007) with an in-house recurrence form, one scheduler per host claiming runs by compare-and-set with catch-up, and Jobs › Scheduled on the desktop and the admin panel (`/api/v1/schedules`, `scheduleChanged`); every timer that queued work is a visible system schedule (server: archive scan, upload clean-up every 6 h, index backup at 03:00, job history and audit log clean-ups; desktop: archive scan, daily index backup, housekeeping with cache trim), the archive still scanned at start; new Backup and Clean-up jobs, duplicates and orphans reports as jobs, one backup retention, the trash only reported; log settings (R11) — file and console levels, retention, file and total size limits, daily or hourly rotation, audit retention (the audit clean-up schedule's) and the diagnostics share in the admin panel's Settings › Logs (`CHRONOS_LOG_*`, `lockedBy`) and the desktop's Settings › Advanced; the server's files take Debug and Trace again, and logging never fails a job. Phase 3 done and released as `v0.1.0-rc.5` (one adversarial review round and two fix rounds, 40 findings fixed; strings in all 38 languages; Library, photo delete and restore and the web upload tried by hand): the admin panel manages and never edits (R6) — a Library page (facets filters, cards or list, keyboard selection, mass Analyse, Proxies, Thumbnails, Verify, Tags, Export CSV and Delete, 1,000 sequences a request), a sequence's page (inline title, tags, rating, notes, photo viewer, cover, downloads, photo delete) and the trash view (Restore, Empty… behind a dry run, the typed word and a fingerprint); photos deleted into `trash/photos` under crash-safe journals with tombstones in the sidecar and `frame_removals` (migration 0008), so sync and uploads never bring them back unless restored or uploaded again on purpose; trash kinds, restore reasons and the `EmptyTrash` job on the desktop's Trash… too (typed entry count); the panel's files revalidated (`no-cache`, ETag); upload from the panel (R3) — file picker or drop, no folders, a self-tested in-house SHA-256 in a module worker, Exif capture time, resumable chunks. Known limitations: a never-hashed photo whose file was already missing is deleted without a tombstone; an unhashed server frame of a photo deleted on a PC stays *missing here* until the server verifies it; `jobState` carries no kind, so panel pages refresh after any job. Phase 4a done and released as `v0.1.0-rc.6` (one adversarial review round and six fix rounds; strings in all 38 languages): Reorganize after import (R7) on the desktop (Archive manager, Library, the toast after Settings › Archive templates change; it replaces Rename… and Move…) and the admin panel (Library, the *Saved* toast of Archive) — folder, file and title templates applied to filed sequences behind a dry run that lists every change, the photos that keep their names and why (in place, never verified, missing) and the sequences that stay whole (unreadable sidecar), applied by the `move` job of exactly the confirmed plan (fingerprint, `POST /api/v1/archive/reorganize`, plans kept a few minutes on the server), which holds the rest when paused, cancelled or failed (also while the archive is offline), lets a sequence still receiving photos keep its file names and takes along a sequence left as it was inside a folder that moves; files renamed in two phases under `.chronos/rename-files.json`, completed after a crash by the next writer; the index, frames and exports follow a moved folder in one transaction, here and at another index's next scan, and writers never create a folder a Reorganize left nor write into one another sequence took; import, upload and Reorganize name photos by one rule (the sequence's camera and lens), and templates follow one set of rules everywhere Line truncated
|
||||
| 8.4 Owner review 4 | Done (request and plan: `docs/requests/2026-11-06-owner-review-4.md`): released as `v0.1.0-rc.14` with owner review 1 phase 6 (the deploy guide `docs/deploy/`), then as `v1.0.0` (#23), the first stable release: R1 work board of every video made or published, the published apart from workspace work (#29); R2 the anonymous usage counts removed, nothing sent by itself (#30); R3 the archive's whole folder structure created inside the chosen archive path, desktop and server (#31); R4 the repository on Gitea in order (earlier work as closed issues #32–#54 in their milestones, the original documentation in `docs/reference/original`, `fe50b877`); R5 licensing set aside and recorded in #24. |
|
||||
| 8.5 Owner review 5 | Done (request, answers and plan: `docs/requests/2026-11-15-owner-review-5.md`; issues #64–#67, milestone v1.1.0), released as `v1.1.0`: one setup for Chronos Desktop and Chronos Uploader with the Uploader's update check (#64); the detail of mass passes (step, photo x of y, sequence n of m, rate, time left) on the desktop, the admin panel and, for the connected server's jobs, the desktop's Server section (#65); separate homes per server keyed by a stable server id, with the 1.0 workspace and cache sorted at the first start and a separate originals archive per server (#66); Chronos Desktop sharing its library on the LAN in place of Chronos Server for Windows, running on in the tray while it shares (#67). One review round, 15 findings fixed; strings in all 38 languages. Not run on the PC: the Windows-only smoke tests, `installer-test.ps1` and the release dry run (CI runs them). Follow-ups: a firewall status row, Change…/Forget on known servers, the LAN beacon announcing the server id, docs/ui DESIGN and mockups for the new screens. |
|
||||
| 8.6 Windows test of 1.1.0 | Done (#70, milestone v1.1.1), released as `v1.1.1`: the App and Core.Windows suites run whole on the development PC (5 stale screen tests brought up to date); a hands-on test of a portable 1.1.0 (import, Reorganize, sharing, a client, tray, Exit with clients); fixes: job log times in local time, the Jobs Type column, Forget in Bulgarian, the Reorganize capture. Still to do by the owner: the real 1.0 → 1.1 upgrade on this PC (UAC). |
|
||||
| 9 Monetization | Not started: requires explicit approval (§22); the proposal is recorded in issue #24 (owner review 4, R5). |
|
||||
|
||||
## Verification (2026-10-12)
|
||||
@@ -64,6 +65,7 @@ src/Chronos.App/bin/Release/net10.0-windows/Chronos.exe --capture out/screenshot
|
||||
- Homes: start 1.1 on a 1.0 data folder (portable copy): the toast says *Folders sorted*; Settings › Workspace › Home
|
||||
folders and Settings › Server › Known servers list the folders. Sign in to the same server by another address: its
|
||||
projects stay Online. *Download originals* goes to `<archive> - <server>`.
|
||||
- Job log time (1.1.1): Jobs › expand a job: the log times match the row times (local).
|
||||
- Share this library: Settings › Server › *Share this library*, then Server › This library; connect the Uploader or
|
||||
another PC to the address shown.
|
||||
- Import: Import › *Folder…* (any folder of photos stands in for a card) › *Import*; the sequence opens from the
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public sealed class SampleData
|
||||
/// <summary>
|
||||
/// The sample's "now": every time it stores (jobs, transfers, renders, cards, the trash) is set from it, never from
|
||||
/// the computer's clock, and <c>--capture</c> freezes <see cref="AppClock"/> at it, so the screenshots are the same
|
||||
/// on any day (the running render's log reads 10:14 to 10:15).
|
||||
/// on any day (the running render's log stores 10:14 to 10:15 UTC and shows them in local time, as the rows).
|
||||
/// </summary>
|
||||
public static readonly DateTimeOffset Now = new(2026, 10, 2, 10, 18, 0, TimeSpan.Zero);
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.Globalization;
|
||||
|
||||
namespace Chronos.App.Jobs;
|
||||
|
||||
/// <summary>
|
||||
/// The job log stores each line's time of day in UTC (<c>"12:35:04 Copying…"</c>), the same on the server and the desktop.
|
||||
/// The Jobs table shows its times in local time, so the log's are shown in local time too (#70).
|
||||
/// </summary>
|
||||
public static class JobLogTimes
|
||||
{
|
||||
/// <summary>
|
||||
/// <paramref name="tail"/> with each leading <c>HH:mm:ss</c> turned from UTC into <paramref name="zone"/>'s time.
|
||||
/// The log keeps no dates, so they are worked out backwards from <paramref name="reference"/> (when the job finished, or
|
||||
/// now): each line is the latest instant at or before the line after it, so a run that goes past midnight UTC, or lasts
|
||||
/// days, dates its lines right and a daylight-saving change in between converts each side with its own offset. A pause
|
||||
/// of a day or more between two lines cannot be seen, and those lines keep the later day's date. Lines without a time
|
||||
/// stay as they are.
|
||||
/// </summary>
|
||||
public static string ToLocal(string tail, DateTimeOffset reference, TimeZoneInfo zone)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(tail);
|
||||
ArgumentNullException.ThrowIfNull(zone);
|
||||
if (tail.Length == 0) return tail;
|
||||
// A minute of slack: the reference may be read a little before the last line's clock (another machine's).
|
||||
var next = reference.UtcDateTime.AddMinutes(1);
|
||||
var lines = tail.Split('\n');
|
||||
for (var i = lines.Length - 1; i >= 0; i--)
|
||||
{
|
||||
var line = lines[i];
|
||||
if (line.Length < 9 || line[8] != ' ' ||
|
||||
!TimeSpan.TryParseExact(line.AsSpan(0, 8), @"hh\:mm\:ss", CultureInfo.InvariantCulture, out var time)) continue;
|
||||
var utc = DateTime.SpecifyKind(next.Date + time, DateTimeKind.Utc);
|
||||
if (utc > next) utc = utc.AddDays(-1);
|
||||
next = utc;
|
||||
var local = TimeZoneInfo.ConvertTimeFromUtc(utc, zone);
|
||||
lines[i] = local.ToString("HH:mm:ss", CultureInfo.InvariantCulture) + line[8..];
|
||||
}
|
||||
return string.Join('\n', lines);
|
||||
}
|
||||
}
|
||||
@@ -115,12 +115,12 @@ public sealed class JobRowViewModel : ObservableObject
|
||||
/// <summary>"Show log: Render · Harbour sunset": the expander names its row.</summary>
|
||||
public string ToggleName => Loc.L("Jobs.ActionFor", Loc.L(_isExpanded ? "Jobs.Log.Hide" : "Jobs.Log.Show"), AccessibleName);
|
||||
|
||||
/// <summary>The last lines of the job log, plus the live message while it runs.</summary>
|
||||
/// <summary>The last lines of the job log in local time, plus the live message while it runs.</summary>
|
||||
public string LogText
|
||||
{
|
||||
get
|
||||
{
|
||||
var tail = _logTail ?? _entry.Job.LogTail ?? string.Empty;
|
||||
var tail = JobLogTimes.ToLocal(_logTail ?? _entry.Job.LogTail ?? string.Empty, _entry.Job.Finished ?? AppClock.Shown(DateTimeOffset.UtcNow), TimeZoneInfo.Local);
|
||||
if (_entry.State == JobState.Running && _entry.Message is { Length: > 0 } message && !tail.EndsWith(message, StringComparison.Ordinal))
|
||||
tail = tail.Length == 0 ? message : tail + "\n" + message;
|
||||
return tail.Length == 0 ? Loc.L("Jobs.Log.Empty") : tail;
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
windows Kind, Where and State stop growing and Target takes the rest (Jobs.html). -->
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="28" />
|
||||
<ColumnDefinition Width="0.7*" MinWidth="90" MaxWidth="140" />
|
||||
<ColumnDefinition Width="*" MinWidth="90" MaxWidth="170" />
|
||||
<ColumnDefinition Width="1.6*" MinWidth="84" />
|
||||
<ColumnDefinition Width="*" MinWidth="104" MaxWidth="240" />
|
||||
<ColumnDefinition Width="90" />
|
||||
@@ -174,7 +174,7 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="28" />
|
||||
<ColumnDefinition Width="0.7*" MinWidth="90" MaxWidth="140" />
|
||||
<ColumnDefinition Width="*" MinWidth="90" MaxWidth="170" />
|
||||
<ColumnDefinition Width="1.6*" MinWidth="84" />
|
||||
<ColumnDefinition Width="*" MinWidth="104" MaxWidth="240" />
|
||||
<ColumnDefinition Width="90" />
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<Border Grid.Row="1" BorderBrush="{DynamicResource Brush.Stroke}" BorderThickness="0,1,0,1" Padding="14,8,24,8">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.7*" MinWidth="90" MaxWidth="140" />
|
||||
<ColumnDefinition Width="*" MinWidth="90" MaxWidth="170" />
|
||||
<ColumnDefinition Width="1.6*" MinWidth="120" />
|
||||
<ColumnDefinition Width="*" MinWidth="104" MaxWidth="240" />
|
||||
<ColumnDefinition Width="90" />
|
||||
@@ -72,7 +72,7 @@
|
||||
<Border Height="38" Background="Transparent" Padding="14,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.7*" MinWidth="90" MaxWidth="140" />
|
||||
<ColumnDefinition Width="*" MinWidth="90" MaxWidth="170" />
|
||||
<ColumnDefinition Width="1.6*" MinWidth="120" />
|
||||
<ColumnDefinition Width="*" MinWidth="104" MaxWidth="240" />
|
||||
<ColumnDefinition Width="90" />
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
using Chronos.App.Jobs;
|
||||
using Chronos.Testing;
|
||||
|
||||
namespace Chronos.App.Tests.Jobs;
|
||||
|
||||
/// <summary>The job log stores UTC times; the Jobs table shows them in local time like the rows (#70).</summary>
|
||||
public sealed class JobLogTimesTests
|
||||
{
|
||||
private static readonly TimeZoneInfo Rome = TimeZoneInfo.CreateCustomTimeZone("Test+1", TimeSpan.FromHours(1), "Test+1", "Test+1");
|
||||
|
||||
[Test]
|
||||
public void LeadingTimesTurnLocal()
|
||||
{
|
||||
var finished = new DateTimeOffset(2026, 11, 16, 12, 40, 0, TimeSpan.Zero);
|
||||
var tail = "12:35:04 Copying photos\n12:36:10 Done\nno time here";
|
||||
Assert.Equal("13:35:04 Copying photos\n13:36:10 Done\nno time here", JobLogTimes.ToLocal(tail, finished, Rome));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ALineBeforeMidnightBelongsToTheDayBefore()
|
||||
{
|
||||
// Finished at 00:10 UTC on the 17th: 23:58 is the 16th's, and both days convert with their own offset.
|
||||
var finished = new DateTimeOffset(2026, 11, 17, 0, 10, 0, TimeSpan.Zero);
|
||||
var zone = TimeZoneInfo.CreateCustomTimeZone("Test-5", TimeSpan.FromHours(-5), "Test-5", "Test-5");
|
||||
Assert.Equal("18:58:00 Start\n19:05:00 End", JobLogTimes.ToLocal("23:58:00 Start\n00:05:00 End", finished, zone));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ARunLongerThanADayDatesEachLineAcrossTheClockChange()
|
||||
{
|
||||
// Rome leaves summer time on 2026-10-25 at 01:00 UTC. A run from the 24th 10:00 UTC to the 25th 11:00 UTC: its
|
||||
// first line is a day and more before the end, still in summer time (12:00), its last after the change (12:00).
|
||||
var rome = TimeZoneInfo.FindSystemTimeZoneById("Europe/Rome");
|
||||
var finished = new DateTimeOffset(2026, 10, 25, 12, 0, 0, TimeSpan.Zero);
|
||||
var tail = "10:00:00 Start\n23:00:00 Midway\n11:00:00 End";
|
||||
Assert.Equal("12:00:00 Start\n01:00:00 Midway\n12:00:00 End", JobLogTimes.ToLocal(tail, finished, rome));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TextWithoutTimesStaysAsItIs()
|
||||
{
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
Assert.Equal(string.Empty, JobLogTimes.ToLocal(string.Empty, now, Rome));
|
||||
Assert.Equal("1:2:3 short", JobLogTimes.ToLocal("1:2:3 short", now, Rome));
|
||||
Assert.Equal("12:35:04", JobLogTimes.ToLocal("12:35:04", now, Rome));
|
||||
Assert.Equal("ab:cd:ef text", JobLogTimes.ToLocal("ab:cd:ef text", now, Rome));
|
||||
}
|
||||
}
|
||||
@@ -129,6 +129,47 @@ public sealed class JobsScreenSmokeTests
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// In a 1440 px window (a 1920 px screen at 100 %), the Type column shows the Italian kinds whole, the longest
|
||||
/// "Analisi approfondita" included: it was cut at a 0.7* share (#70).
|
||||
/// </summary>
|
||||
[Test]
|
||||
public Task KindsFitTheTypeColumnInItalianAt1440() => ScreenHost.RunAsync(async () =>
|
||||
{
|
||||
await using var app = await ScreenSmokeTests.SampleApp.StartAsync();
|
||||
var shell = app.Shell;
|
||||
await app.Sample.FillAsync();
|
||||
await shell.Jobs.ReloadAsync();
|
||||
shell.Navigate(SectionKey.Jobs);
|
||||
await app.ExpectAsync<JobsView>("jobs");
|
||||
app.Window.Width = 1440;
|
||||
UiLanguage.Apply("it");
|
||||
try
|
||||
{
|
||||
app.Window.UpdateLayout();
|
||||
await app.Window.Dispatcher.InvokeAsync(() => { }, System.Windows.Threading.DispatcherPriority.ApplicationIdle);
|
||||
var items = app.FindAll<ListBoxItem>().Where(i => i.DataContext is JobRowViewModel && i.IsVisible).ToList();
|
||||
Assert.True(items.Count > 3, "several rows are on screen");
|
||||
foreach (var item in items)
|
||||
{
|
||||
var row = (JobRowViewModel)item.DataContext;
|
||||
var kind = Descendants<TextBlock>(item).First(t => t.Text == row.Kind);
|
||||
Assert.True(Needed(kind, kind.Text) <= kind.ActualWidth + 0.5, $"'{row.Kind}' needs {Needed(kind, kind.Text):0.0} px, has {kind.ActualWidth:0.0}");
|
||||
var deep = JobText.Kind(Core.Model.JobKind.DeepAnalyse);
|
||||
Assert.True(Needed(kind, deep) <= kind.ActualWidth + 0.5, $"'{deep}' needs {Needed(kind, deep):0.0} px, has {kind.ActualWidth:0.0}");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
UiLanguage.Apply("en");
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>The width <paramref name="text"/> takes in <paramref name="cell"/>'s font.</summary>
|
||||
private static double Needed(TextBlock cell, string text) => new FormattedText(text, System.Globalization.CultureInfo.CurrentUICulture, cell.FlowDirection,
|
||||
new Typeface(cell.FontFamily, cell.FontStyle, cell.FontWeight, cell.FontStretch), cell.FontSize, Brushes.Black,
|
||||
VisualTreeHelper.GetDpi(cell).PixelsPerDip).WidthIncludingTrailingWhitespace;
|
||||
|
||||
/// <summary>The left and right edges of an element in window coordinates, whichever way the window reads.</summary>
|
||||
private static (double Left, double Right) Span(FrameworkElement element, Window window)
|
||||
{
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |