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
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:
1 parent
5acdf146c7
commit
1f089888e8
320 files changed
+3030
-927
No files matched your search
@@ -142,8 +142,7 @@ public sealed class SystemEndpointTests(TestContext context)
|
||||
// The page container is not a live region: only toasts and form errors announce themselves.
|
||||
Assert.True(!index.Contains("aria-live", StringComparison.Ordinal), index);
|
||||
var app = await server.Client.GetStringAsync("/admin/app.js");
|
||||
var pages = Regex.Match(app, @"const pages = \[([^\]]*)\]").Groups[1].Value.Split(',').Select(p => p.Trim().Trim('"'));
|
||||
var pending = new Queue<string>(pages.Select(p => $"pages/{p}.js").Prepend("app.js"));
|
||||
var pending = new Queue<string>(MenuPages(app).SelectMany(group => group).Select(p => $"pages/{p}.js").Prepend("app.js"));
|
||||
var seen = new HashSet<string>(StringComparer.Ordinal);
|
||||
while (pending.TryDequeue(out var module))
|
||||
{
|
||||
@@ -154,9 +153,34 @@ public sealed class SystemEndpointTests(TestContext context)
|
||||
foreach (Match import in Regex.Matches(await response.Content.ReadAsStringAsync(), @"from ""(\.{1,2}/[^""]+)"""))
|
||||
pending.Enqueue(Resolve(folder, import.Groups[1].Value));
|
||||
}
|
||||
Assert.True(seen.Count >= 14, string.Join(", ", seen));
|
||||
Assert.True(seen.Count >= 13, string.Join(", ", seen));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task AdminPanelDocksSettingsAtTheFootAndFoldsAboutIntoIt()
|
||||
{
|
||||
// Owner review 2: Settings below the other pages, About its last group; old #/about bookmarks open it there.
|
||||
await using var server = await TestServer.StartAsync(context);
|
||||
var app = await server.Client.GetStringAsync("/admin/app.js");
|
||||
var groups = MenuPages(app);
|
||||
Assert.Count(2, groups);
|
||||
Assert.SequenceEqual(new[] { "settings" }, groups[1]);
|
||||
Assert.DoesNotContain("about", groups[0]);
|
||||
Assert.Contains(@"about: ""settings?group=about""", app);
|
||||
using var about = await server.Client.GetAsync("/admin/pages/about.js");
|
||||
Assert.Equal(HttpStatusCode.NotFound, about.StatusCode);
|
||||
var settings = await server.Client.GetStringAsync("/admin/pages/settings.js");
|
||||
Assert.Contains(@"id=""about-title""", settings);
|
||||
// The page draws before the dashboard aggregate answers; these two rows fill in afterwards.
|
||||
Assert.Contains(@"id=""about-database""", settings);
|
||||
Assert.Contains(@"id=""about-uptime""", settings);
|
||||
}
|
||||
|
||||
/// <summary>The menu's page groups as app.js lists them: the top pages, then the ones docked at the foot.</summary>
|
||||
private static List<string[]> MenuPages(string app) =>
|
||||
[.. Regex.Matches(app, @"const (?:top|bottom)Pages = \[([^\]]*)\]")
|
||||
.Select(m => m.Groups[1].Value.Split(',').Select(p => p.Trim().Trim('"')).ToArray())];
|
||||
|
||||
private static string Resolve(string folder, string relative)
|
||||
{
|
||||
var parts = (folder + relative).Split('/').ToList();
|
||||
|
||||
Reference in new issue
Block a user