Dimostrazione con orologio plausibile (mai sessioni di notte) e schermate rifatte con il codice finale
verifica / prove (push) Successful in 5m16s
verifica / prove (pull_request) Successful in 4m59s
verifica / immagine (push) Successful in 7m33s
verifica / immagine (pull_request) Successful in 16s
rilascio / prove (push) Successful in 5m20s
rilascio / windows (push) Successful in 3m50s
rilascio / immagine (push) Successful in 14m54s
rilascio / release (push) Successful in 1m6s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
Claude committed 2026-10-14 02:11:58 +00:00
1 parent 315a9a4231
commit 8a318fe531
33 files changed
+41 -1

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
using Febe.Core.Abstractions;
namespace Febe.Web.Demo;
/// <summary>
/// Clock of the demo mode (spec §10.6: «gli orari sono plausibili»). It follows the real time, but when the demo starts
/// at night it moves to the afternoon of the same day, so a session, the queue and the day strip never show the engine
/// working outside the active window of the default profile.
/// </summary>
public sealed class DemoClock : IClock
{
private static readonly TimeOnly EarliestPlausible = new(9, 0);
private static readonly TimeOnly LatestPlausible = new(21, 0);
private static readonly TimeOnly Afternoon = new(15, 12);
private readonly TimeSpan _offset;
public DemoClock(TimeZoneInfo zone, DateTimeOffset realNow)
{
ArgumentNullException.ThrowIfNull(zone);
LocalZone = zone;
var local = TimeZoneInfo.ConvertTime(realNow, zone);
var time = TimeOnly.FromDateTime(local.DateTime);
if (time >= EarliestPlausible && time <= LatestPlausible)
{
_offset = TimeSpan.Zero;
return;
}
var target = local.Date + Afternoon.ToTimeSpan();
var targetInstant = new DateTimeOffset(target, zone.GetUtcOffset(target));
_offset = targetInstant - realNow;
}
public DateTimeOffset Now => DateTimeOffset.UtcNow + _offset;
public TimeZoneInfo LocalZone { get; }
public Task Delay(TimeSpan time, CancellationToken ct) =>
time <= TimeSpan.Zero ? Task.CompletedTask : Task.Delay(time, ct);
}
+1 -1
View File
@@ -62,7 +62,7 @@ public sealed class DemoHost : IAsyncDisposable
ImportService? import = null;
try
{
var clock = new SystemClock(options.Zone ?? TimeZoneInfo.Local);
var clock = new DemoClock(options.Zone ?? TimeZoneInfo.Local, DateTimeOffset.UtcNow);
var data = new DataFolderLayout(Path.Combine(root, "dati"));
var layout = new LibraryLayout(Path.Combine(root, "libreria"));
Directory.CreateDirectory(data.Root);