diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 8b6f11ff..1ec42556 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -24,8 +24,16 @@ commits follow Conventional Commits (release notes are generated from them by `C
### Changed
- Video cards start with the preset ("4K archive · HEVC · 0:41 · 1.4 GB"); sizes keep number and unit together with a
no-break space, in every culture.
-- Typing a folder that is not yet an archive in Settings › Archive now creates the archive there, as Welcome's
- *Create* does, instead of doing nothing.
+- Typing or picking a folder that is not yet an archive in Settings › Archive now offers to create the archive
+ there, as Welcome's *Create* does, after a confirmation that names the folder; *Not now* only remembers it.
+- Settings › Import keeps this PC's archive folder, like its workspace: another PC's drive letter can name one of this
+ PC's own folders.
+- The admin board always reads the server newest first (*Order* is off there, its tooltip says why); *Published*
+ counts every render the server holds, *Workspace* those read so far ("+" while more can be read).
+- `/health` checks the archive's tree again once its last check is over 10 seconds old, so a fix on the host shows
+ there without opening the dashboard.
+- A server setting out of range stops the start with a message naming its `CHRONOS_*` variable (ports and logs
+ included).
- EULA §4 and BRIEF §21 say Chronos sends nothing about its use; BRIEF §7, §12.10, §14.8 and §14.9 describe the
board and the archive's folder tree; §14.9 lists `CHRONOS_TRUSTED_PROXIES`; §19.6 points to the Unraid guide; §24
lists owner review 4 and phase 6.
@@ -40,6 +48,12 @@ commits follow Conventional Commits (release notes are generated from them by `C
- Creating or adopting an archive where its folders cannot be made fails with a clear, localised reason (drive or
share unavailable, permission denied, read-only, a file in the way) instead of a generic error.
- Settings files that still carry `AnonymousUsageCounts` load and are saved without it.
+- rc.14 review: a sent workspace render whose file left `exports/` no longer shows on the desktop board as *Missing*
+ (its home holds it); a Shift range on the admin board runs along the lane picked in, as its cards are shown; a
+ server archive root that lost its `archive.json` (an unmounted disk's empty mount point) gets no folders, the
+ dashboard warns and `/health` says "missing"; the admin panel's sizes keep number and unit together too; desktop
+ Board cards put their actions under the text while the player is open, so titles and facts are no longer cut at
+ the window's smallest width.
## [0.1.0-rc.13] — 2026-11-05
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md
index 419f7ad5..2f4d1dbc 100644
--- a/docs/DECISIONS.md
+++ b/docs/DECISIONS.md
@@ -792,3 +792,8 @@ One line per decision: date · decision · alternative · reason.
| 2026-11-06 | The docs describe one update channel (stable releases), pre-releases installed by hand. | Document a pre-release channel | That is what the update check does: it asks for releases with `pre-release=false`. |
| 2026-11-06 | `CHRONOS_TRUSTED_PROXIES` is listed in BRIEF §14.9. | Leave it undocumented | The server already reads it and the compose file and Unraid template already offer it. |
| 2026-11-06 | rc.14 integration: the BRIEF §24 rows of owner review 4 name the sections actually amended (R1 §12.10, §14.8; R2 §21; R3 §7, §12.8, §14.8, §14.9), and §7, §12.10, §14.8 and the Docker guide gain the board and the archive's folder tree. | Keep the parcels' expected sections | The phase 6 parcel wrote the rows before the feature parcels landed. |
+| 2026-11-06 | rc.14 review: Settings › Archive folder makes a folder without an archive one only after a confirmation naming it (*Create archive* / *Not now*, which only remembers the folder); Settings › Import never creates one and keeps this PC's archive folder. Supersedes the row "Settings › Archive folder creates an archive…". | Create silently, as the parcel did | A half-typed path commits on focus loss and an imported path can name the user's own photos: adopting either writes `.chronos` and sidecars there unasked (CLAUDE.md: explicit user action). |
+| 2026-11-06 | The server's structure check makes nothing in a root without `archive.json` and reports it unavailable (`/health`: archive "missing"); `/health` re-checks once the last check is over 10 s old (`ServerArchive.HealthRecheck`). | Check only on dashboard reads; create in any existing root | An unmounted disk leaves an empty mount point whose underlying disk must not get `.chronos`; monitoring that only polls `/health` must see a fix without a dashboard read, throttled so a busy health probe stays cheap. |
+| 2026-11-06 | The admin board reads the server with `sort=newest` and disables *Order* with a tooltip; *Published* shows the server's total, *Workspace* the loaded count with "+" while a cursor remains; a Shift range runs along the lane picked in (`selectableGrid`'s `order(el)`). | Re-sort the loaded page; one range over every card | The board must show the server's newest renders and honest counts, and a range must cover only the cards seen between the two clicks (a sent render is in both lanes). |
+| 2026-11-06 | `CHRONOS_PARALLELISM` out of 1–64 stays clamped; the other range errors at start name the `CHRONOS_*` variable (`ServerOptions.VariableOf`). | Refuse every value out of range | Clamping parallelism is long-standing behaviour the admin panel relies on; the deploy guide documents the exception. |
+| 2026-11-06 | Desktop Board cards move their quick actions to a row under the text while the player pane is open. | Stack the lanes; hide the actions | Keeps both lanes side by side and every action on the card; at 1200 px with the player the text column grows from about 80 px to the whole card. |
diff --git a/docs/deploy/docker.md b/docs/deploy/docker.md
index 9d22af39..7232aba1 100644
--- a/docs/deploy/docker.md
+++ b/docs/deploy/docker.md
@@ -61,14 +61,18 @@ docker compose up -d
- At every start the server lays out the archive's folder tree inside `/archive` (`.chronos/` with `locks`, `journal`,
`staging`, `trash`, `trash/photos`, `trash/videos`), making only the missing folders and touching nothing that
exists. A folder it cannot make does not stop the start: the log warns, the dashboard shows *Archive incomplete*
- (the folder and reason in its tooltip) and `/health` reports archive "incomplete" until it can be made.
+ (the folder and reason in its tooltip) and `/health` reports archive "incomplete" until it can be made. Both check
+ again by themselves (the dashboard at each read, `/health` when its last check is over 10 seconds old), so a fix on
+ the host needs no restart. A root without its `.chronos/archive.json` (an unmounted disk leaves an empty mount
+ point) gets no folders: the dashboard shows *Archive incomplete* and `/health` reports archive "missing".
## Environment variables
Every server setting comes from, in order: its default, `/data/server.json`, then the environment. **A variable that is
set fixes its setting:** the admin panel shows the field read-only and its tooltip names the variable. Leave a
variable unset to choose the value in the admin panel while the server runs. A value out of range stops the start
-with a message naming the variable.
+with a message naming the variable, except `CHRONOS_PARALLELISM`, which is held to 1–64. The logs' total
+(`CHRONOS_LOG_MAX_TOTAL_MB`) may not be below the log file size (`CHRONOS_LOG_MAX_FILE_MB`), unless it is 0.
| Variable | Default | Meaning |
|---|---|---|
@@ -220,7 +224,7 @@ a newer archive, run Archive › *Scan* so the index catches up with what the ar
| *Not a Chronos server* | Another service answers on that host port (on the owner's host 8443 is another service). Use the client address with the right public HTTPS port |
| The free space shown is the cache's (Unraid) or too small | A cached share reports its primary storage. Map the share's array view read-only to `/space` and set `CHRONOS_SPACE_PATH=/space` ([unraid.md](unraid.md#free-space-of-the-array)) |
| The container restarts at once, log: *… is not writable by PUID:PGID* | Give that user write access to the archive (or the named `.chronos` folder) on the host, or set `PUID`/`PGID` to its owner |
-| Dashboard: *Archive incomplete*; `/health`: archive "incomplete" | A folder of the archive's tree cannot be made (share unavailable, permission denied, read-only, a file in the way; the tooltip names it). Fix it on the host; the next dashboard read checks again, no restart needed |
+| Dashboard: *Archive incomplete*; `/health`: archive "incomplete" | A folder of the archive's tree cannot be made (share unavailable, permission denied, read-only, a file in the way; the tooltip names it). Fix it on the host; the next dashboard read, or `/health` within 10 seconds, checks again, no restart needed |
| Log: *Database not reachable yet … retry* | PostgreSQL is starting, or `CHRONOS_DB_HOST` is wrong. Container names resolve only on a shared user-defined network; on Unraid's default bridge use the host's IP |
| A field in the admin panel is read-only | A variable sets it; its tooltip names it. Remove the variable to change it in the panel |
| The client asks to trust a new fingerprint | `/data` was replaced or the self-signed certificate was renewed. Compare with the admin panel before accepting |
diff --git a/i18n/en/Admin.resx b/i18n/en/Admin.resx
index 761e668e..019960a6 100644
--- a/i18n/en/Admin.resx
+++ b/i18n/en/Admin.resx
@@ -1121,6 +1121,7 @@
All yearsSortOrder of the videos
+ The board always shows the newest first; the order applies to the cards and the listNewestOldestLargest
@@ -1134,7 +1135,7 @@
PublishedEvery render this server holds, newest firstWorkspace
- Renders a PC's workspace made and sent here; those not sent yet stay on that PC
+ Renders a PC's workspace made and sent here, among the videos loaded (+: more to load); those not sent yet stay on that PCSentSent from the workspace of {0}{0} a computer's nameVersion {0}{0} a project version number
diff --git a/i18n/en/Settings.resx b/i18n/en/Settings.resx
index 1955a4f3..8619d1c8 100644
--- a/i18n/en/Settings.resx
+++ b/i18n/en/Settings.resx
@@ -65,6 +65,10 @@
stars per megapixelAnalysis widthpx long edge
+ Create archive
+ This folder is not an archive yet. Chronos can make it one, with all the archive's folders inside it, and add what it already holds.long
+ Not now
+ Create an archive here?longFolders and files already in the archive keep their names.longFile namesFolders
diff --git a/i18n/en/Tooltips.resx b/i18n/en/Tooltips.resx
index 92402848..3be6f60e 100644
--- a/i18n/en/Tooltips.resx
+++ b/i18n/en/Tooltips.resx
@@ -770,6 +770,7 @@
Look for a new release when Chronos starts · no data is sentDelete the cache contents nowDelete spilled frames and cached thumbnails; asks first
+ Make this folder an archive now, create its folders and queue a scan of what it holdsDatabase, settings, logs and caches of this PCOpen the data folder in Explorer. OneDrive synchronises it, which can damage the index: exclude it from syncingNew cards and folders queue a deep analysis of what they import, in the background; each card can change it
@@ -843,6 +844,7 @@
Encode a short synthetic clip with every encoder and report pass or fail and speed · about a minuteSpeed on the synthetic 1280×720 test clipAlways the Microsoft software H.264 encoder; slower, identical everywhere
+ Remember the folder and leave it as it isStars per megapixel from which a night frame counts as a star field · Enter applies, Esc revertsStart minimised when you sign in to Windows, so inserted cards are noticedDark interface (default)
diff --git a/i18n/it/Admin.it.resx b/i18n/it/Admin.it.resx
index d918b430..e7032d65 100644
--- a/i18n/it/Admin.it.resx
+++ b/i18n/it/Admin.it.resx
@@ -1113,6 +1113,7 @@
Tutti gli anniOrdinaOrdine dei video
+ La bacheca mostra sempre prima i più recenti; l'ordine vale per le schede e l'elencoPiù recentiMeno recentiPiù grandi
@@ -1126,7 +1127,7 @@
PubblicatiTutti i render di questo server, dal più recenteSpazio di lavoro
- Render fatti nello spazio di lavoro di un PC e inviati qui; quelli non ancora inviati restano su quel PC
+ Render fatti nello spazio di lavoro di un PC e inviati qui, tra i video caricati (+: altri da caricare); quelli non ancora inviati restano su quel PCInviatoInviato dallo spazio di lavoro di {0}Versione {0}
diff --git a/i18n/it/Settings.it.resx b/i18n/it/Settings.it.resx
index 2ba19a37..c0bc4322 100644
--- a/i18n/it/Settings.it.resx
+++ b/i18n/it/Settings.it.resx
@@ -65,6 +65,10 @@
stelle per megapixelLarghezza di analisipx sul lato lungo
+ Crea archivio
+ Questa cartella non è ancora un archivio. Chronos può renderla tale, con tutte le cartelle dell'archivio al suo interno, e aggiungere ciò che contiene già.
+ Non ora
+ Creare un archivio qui?Le cartelle e i file già nell'archivio mantengono i loro nomi.Nomi dei fileCartelle
diff --git a/i18n/it/Tooltips.it.resx b/i18n/it/Tooltips.it.resx
index f7a36101..4a6a5ca8 100644
--- a/i18n/it/Tooltips.it.resx
+++ b/i18n/it/Tooltips.it.resx
@@ -841,6 +841,7 @@
Cerca una nuova versione all'avvio di Chronos · nessun dato viene inviatoElimina adesso il contenuto della cacheElimina fotogrammi temporanei e miniature in cache; prima chiede conferma
+ Rendi ora questa cartella un archivio, crea le sue cartelle e metti in coda la scansione di ciò che contieneDatabase, impostazioni, log e cache di questo PCApri la cartella dati in Esplora file. OneDrive la sincronizza e così può danneggiare l'indice: escludila dalla sincronizzazioneSchede e cartelle nuove accodano l'analisi profonda di ciò che importano, in background; ogni scheda può cambiarlo
@@ -914,6 +915,7 @@
Codifica una breve clip sintetica con ogni encoder e ne riporta esito e velocità · circa un minutoVelocità sulla clip di prova sintetica 1280×720Sempre l'encoder software H.264 di Microsoft; più lento, identico ovunque
+ Ricorda la cartella e lasciala com'èStelle per megapixel da cui un fotogramma notturno conta come campo stellare · Invio applica, Esc annullaAvvia ridotto a icona all’accesso a Windows, così le schede inserite vengono notateInterfaccia scura (predefinita)
diff --git a/src/Chronos.App/Infrastructure/AppSettings.cs b/src/Chronos.App/Infrastructure/AppSettings.cs
index d4883c4b..f8abdfe0 100644
--- a/src/Chronos.App/Infrastructure/AppSettings.cs
+++ b/src/Chronos.App/Infrastructure/AppSettings.cs
@@ -405,12 +405,14 @@ public sealed class AppSettings
///
/// Settings › Import: with this PC's own values taken from these settings: the session, the
- /// window and its rail, the sequence edited last, the first-run flag, and the workspace (its folder, the projects opened
- /// last and when). Changes and returns .
+ /// window and its rail, the sequence edited last, the first-run flag, the archive folder (another PC's drive letter can
+ /// name one of this PC's own folders), and the workspace (its folder, the projects opened last and when). Changes and
+ /// returns .
///
public AppSettings KeepLocalIn(AppSettings imported)
{
ArgumentNullException.ThrowIfNull(imported);
+ imported.LastArchivePath = LastArchivePath;
imported.ProtectedToken = ProtectedToken;
imported.ServerUrl = ServerUrl;
imported.Window = Window;
diff --git a/src/Chronos.App/Sections/SettingsViewModel.cs b/src/Chronos.App/Sections/SettingsViewModel.cs
index 39604b3a..baf1c69b 100644
--- a/src/Chronos.App/Sections/SettingsViewModel.cs
+++ b/src/Chronos.App/Sections/SettingsViewModel.cs
@@ -108,7 +108,7 @@ public sealed class SettingsViewModel : SectionViewModel
_s.LastArchivePath = v.Length == 0 ? null : Path.GetFullPath(v);
Save();
UpdateArchiveFree();
- _retarget = RetargetArchiveAsync();
+ _retarget = RetargetArchiveAsync(offerCreate: true);
}, () => Loc.L("Tooltips.Settings.ArchiveRoot"));
FolderTemplate = new EditableField(_s.FolderTemplate, v => NamingPreview.Validate(v, isFolder: true), v =>
{
@@ -1166,11 +1166,13 @@ public sealed class SettingsViewModel : SectionViewModel
///
/// The archive folder changed: an archive already there is registered as at start (relinked when it moved) and given
- /// its rescan, and the rows show its settings; any other folder leaves them with this PC's defaults for new archives.
- /// Later edits never reach the archive shown before. Returns the archive registered at that folder (null for none),
- /// even when another folder has been chosen since: edits made for this one go there.
+ /// its rescan, and the rows show its settings. A folder that is no archive yet becomes one in place, with the archive's
+ /// whole layout (as Welcome's Create), only when and the user confirms it for that folder
+ /// by name; otherwise the folder is only remembered and the rows keep this PC's defaults for new archives. Later edits
+ /// never reach the archive shown before. Returns the archive registered at that folder (null for none), even when
+ /// another folder has been chosen since: edits made for this one go there.
///
- private async Task RetargetArchiveAsync()
+ private async Task RetargetArchiveAsync(bool offerCreate)
{
_archive = null;
var root = _s.LastArchivePath;
@@ -1180,8 +1182,8 @@ public sealed class SettingsViewModel : SectionViewModel
{
var opened = await Task.Run(async () => File.Exists(new ArchivePaths(root).ManifestPath) ? await archives.OpenAsync(root) : null);
if (opened is not null) await Shell.Services.QueueScanAsync(opened, full: false);
- // A folder that is no archive yet becomes one in place, with the archive's whole layout (as Welcome's Create).
- else await Shell.Services.ArchiveSetup.CreateAsync(root);
+ // Never on its own: a folder the user typed half of, or one of their own folders, would become an archive and be scanned.
+ else if (offerCreate && ConfirmCreateArchive(root)) await Shell.Services.ArchiveSetup.CreateAsync(root);
}
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException or InvalidDataException or NewerFormatException
or DatabaseException or ArgumentException or InvalidOperationException)
@@ -1193,6 +1195,21 @@ public sealed class SettingsViewModel : SectionViewModel
return await LoadArchiveAsync(root);
}
+ ///
+ /// The archive folder typed or picked holds no archive: the user confirms making it one, the folder named, before any
+ /// folder or file is written there. Declined, the folder is only remembered.
+ ///
+ private bool ConfirmCreateArchive(string root) => Shell.Services.Dialogs.Confirm(new ConfirmRequest
+ {
+ Heading = Loc.L("Settings.Archive.CreateTitle"),
+ Message = Loc.L("Settings.Archive.CreateMessage"),
+ Detail = root,
+ SafeText = Loc.L("Settings.Archive.CreateSkip"),
+ SafeToolTip = Loc.L("Tooltips.Settings.SkipCreateArchive"),
+ ActionText = Loc.L("Settings.Archive.CreateAction"),
+ ActionToolTip = Loc.L("Tooltips.Settings.CreateArchiveHere"),
+ });
+
///
/// Archive › Reset section with an archive open writes the defaults into that archive's archive.json, which the server
/// and the other PCs share: the user confirms it for that archive by name first.
@@ -1756,11 +1773,11 @@ public sealed class SettingsViewModel : SectionViewModel
return;
}
// Everything but the session, the window and its rail, the sequence edited last (another PC's ids mean nothing here),
- // the first-run flag and the workspace, which is this PC's (its folder, the projects opened last and when).
+ // the first-run flag, the archive folder and the workspace, which are this PC's (another PC's drives mean nothing here).
ApplyAll(_s.KeepLocalIn(imported));
// Settings of a PC never rewrite the shared archive.json: the imported templates and sizes are the defaults of new
- // archives, and the rows show the own settings of the archive at the (possibly imported) archive folder.
- _retarget = RetargetArchiveAsync();
+ // archives, and the rows show the own settings of this PC's archive. An import never makes a folder an archive.
+ _retarget = RetargetArchiveAsync(offerCreate: false);
Shell.Notify(Loc.L("Settings.Import.Done"));
}
diff --git a/src/Chronos.App/Sections/VideosView.xaml b/src/Chronos.App/Sections/VideosView.xaml
index ac51d371..ccd783d6 100644
--- a/src/Chronos.App/Sections/VideosView.xaml
+++ b/src/Chronos.App/Sections/VideosView.xaml
@@ -109,6 +109,31 @@
+
+
+
@@ -116,7 +141,11 @@
-
+
+
+
+
+
@@ -125,7 +154,7 @@
-
+
diff --git a/src/Chronos.App/Videos/VideoSources.cs b/src/Chronos.App/Videos/VideoSources.cs
index 7e3d2d3d..537de7d6 100644
--- a/src/Chronos.App/Videos/VideoSources.cs
+++ b/src/Chronos.App/Videos/VideoSources.cs
@@ -439,7 +439,10 @@ public static class VideoSources
foreach (var render in folder.ReadRenders().Entries)
{
var path = folder.ExportFile(render.File);
- entries.Add(FromWorkspace(render, project, path, File.Exists(path) || Directory.Exists(path)));
+ var exists = File.Exists(path) || Directory.Exists(path);
+ // A sent render whose file left exports/ is safe at its home, whose entry stands for it: never "missing".
+ if (render.IsSent && !exists) continue;
+ entries.Add(FromWorkspace(render, project, path, exists));
}
}
catch (Exception ex) when (ex is IOException or InvalidDataException or UnauthorizedAccessException)
diff --git a/src/Chronos.Server/Admin/web/pages/library/shared.js b/src/Chronos.Server/Admin/web/pages/library/shared.js
index b9039814..afedbfbe 100644
--- a/src/Chronos.Server/Admin/web/pages/library/shared.js
+++ b/src/Chronos.Server/Admin/web/pages/library/shared.js
@@ -170,7 +170,8 @@ export class Selection {
* stop (the current item), arrows move along the reading direction and between rows, Home and End, Space selects
* (Shift+Space: the range from the last one picked), Enter opens, Ctrl+A selects everything shown, Esc clears the
* selection. A click on an item's check box selects (with Shift, a range), Ctrl+click too; a plain click opens.
- * The caller redraws through onChange after the selection changed.
+ * The caller redraws through onChange after the selection changed. order(el) gives the keys a range runs along, in the
+ * order shown; el is the item picked, so a page with several groups (the videos board's lanes) can answer with its group.
*/
export function selectableGrid(host, { selection, order, open, onChange }) {
let current = null;
@@ -182,8 +183,9 @@ export function selectableGrid(host, { selection, order, open, onChange }) {
current = el.dataset.key;
el.focus();
};
- const pick = (key, shift) => {
- if (shift) selection.range(key, order());
+ const pick = (el, shift) => {
+ const key = el.dataset.key;
+ if (shift) selection.range(key, order(el));
else selection.toggle(key);
onChange();
};
@@ -201,7 +203,7 @@ export function selectableGrid(host, { selection, order, open, onChange }) {
if (e.target.closest("[data-check]") || e.ctrlKey || e.metaKey || e.shiftKey) {
// A check box keeps its own click (a cancelled one would put its old state back after onChange drew the new one).
if (!e.target.matches("input[data-check]")) e.preventDefault();
- pick(el.dataset.key, e.shiftKey);
+ pick(el, e.shiftKey);
return;
}
if (e.target.closest("a, button")) return;
@@ -223,7 +225,7 @@ export function selectableGrid(host, { selection, order, open, onChange }) {
case "End": next = list[list.length - 1]; break;
case " ":
e.preventDefault();
- pick(el.dataset.key, e.shiftKey);
+ pick(el, e.shiftKey);
return;
case "Enter":
e.preventDefault();
diff --git a/src/Chronos.Server/Admin/web/pages/videos.js b/src/Chronos.Server/Admin/web/pages/videos.js
index 242ff006..89d8bacc 100644
--- a/src/Chronos.Server/Admin/web/pages/videos.js
+++ b/src/Chronos.Server/Admin/web/pages/videos.js
@@ -103,6 +103,7 @@ export async function render(root, { api, setMeta, actions, onEvent }) {
for (const f of ["kind", "codec", "year", "sort"]) root.querySelector(`#${f}`).addEventListener("change", (e) => setFilter(f, e.target.value));
root.querySelector("#clear").addEventListener("click", clearFilters);
root.querySelectorAll("[data-view]").forEach((b) => b.addEventListener("click", () => {
+ const sortBefore = sortShown();
view = b.dataset.view;
root.querySelectorAll("[data-view]").forEach((x) => x.setAttribute("aria-pressed", String(x === b)));
try {
@@ -110,13 +111,22 @@ export async function render(root, { api, setMeta, actions, onEvent }) {
} catch {
// Only this page keeps the view then.
}
- draw();
+ drawSort();
+ // The board reads the server newest first: the list read again in the order the view shows, as a new filter is
+ // (the selection could hold videos the new page does not show).
+ if (sortShown() !== sortBefore) {
+ selection.clear();
+ load();
+ } else draw();
}));
root.querySelector("#more").addEventListener("click", () => load(true));
const grid = selectableGrid(itemsHost, {
selection,
- order: () => rows.map((v) => v.id),
+ // On the board a range runs along the lane picked in, as its cards are shown (a sent render is in both lanes).
+ order: (el) => view === "board" && el?.closest(".board-lane")
+ ? [...el.closest(".board-lane").querySelectorAll('[role="option"]')].map((e) => e.dataset.key)
+ : rows.map((v) => v.id),
open: (key) => play(rows.find((v) => v.id === key)),
onChange: syncSelection,
});
@@ -148,10 +158,23 @@ export async function render(root, { api, setMeta, actions, onEvent }) {
return FILTERS.some((f) => f !== "sort" && filters[f]);
}
+ /** The order read from the server: the board's lanes are newest first over every video, whatever Order says. */
+ function sortShown() {
+ return view === "board" ? "newest" : filters.sort;
+ }
+
+ /** On the board, Order is off and says why; the choice comes back with the cards or the list. */
+ function drawSort() {
+ const sort = root.querySelector("#sort");
+ sort.disabled = view === "board";
+ sort.dataset.i18nTitle = view === "board" ? "Admin.Videos.Sort.Board.Tip" : "Admin.Videos.Sort.Tip";
+ sort.title = t(sort.dataset.i18nTitle);
+ }
+
function listQuery(limit, after) {
const p = new URLSearchParams({ limit: String(limit) });
for (const f of ["q", "kind", "codec", "year", "sequence"]) if (filters[f]) p.set(f, filters[f]);
- if (filters.sort !== "newest") p.set("sort", filters.sort);
+ if (sortShown() !== "newest") p.set("sort", sortShown());
if (after) p.set("cursor", after);
return `/api/v1/videos?${p}`;
}
@@ -310,18 +333,19 @@ export async function render(root, { api, setMeta, actions, onEvent }) {
}
/**
- * The two lanes, newest first whatever the order chosen, each with its count: Published holds every video shown, Workspace
- * those a PC's workspace sent here, again as cards of their own marked Sent.
+ * The two lanes, newest first (the board reads the server in that order, sortShown), each with its count: Published holds
+ * every video, counted over the server (the server's total), Workspace those a PC's workspace sent here, again as cards
+ * of their own marked Sent, counted among the videos read so far ("12+" while more can be read).
*/
function boardHtml() {
- const newest = [...rows].sort((a, b) => (Date.parse(b.created) - Date.parse(a.created)) || String(a.id).localeCompare(String(b.id)));
- const sent = newest.filter((v) => boardLane(v, serverName) === "workspace");
- const lane = (key, items, workspace) => `
+ const sent = rows.filter((v) => boardLane(v, serverName) === "workspace");
+ const lane = (key, items, workspace, count) => `
`;
- return lane("Published", newest, false) + lane("Workspace", sent, true);
+ return lane("Published", rows, false, formatNumber(total ?? rows.length))
+ + lane("Workspace", sent, true, `${formatNumber(sent.length)}${cursor ? "+" : ""}`);
}
function itemHtml(v, workspace = false) {
@@ -585,6 +609,7 @@ export async function render(root, { api, setMeta, actions, onEvent }) {
else if (e.type === "reconnected") refreshSoon(0);
});
drawFilters();
+ drawSort();
await load();
}
diff --git a/src/Chronos.Server/Admin/web/ui.js b/src/Chronos.Server/Admin/web/ui.js
index 67637d1a..5c9090cd 100644
--- a/src/Chronos.Server/Admin/web/ui.js
+++ b/src/Chronos.Server/Admin/web/ui.js
@@ -12,7 +12,7 @@ export function formatNumber(n) {
return new Intl.NumberFormat(culture()).format(n ?? 0);
}
-/** 9.4 TB, 610 GB … (decimal units, like disk vendors and the desktop client). */
+/** 9.4 TB, 610 GB … (decimal units, like disk vendors and the desktop client), number and unit held together by a no-break space. */
export function formatBytes(bytes) {
const units = ["B", "KB", "MB", "GB", "TB", "PB"];
let value = Number(bytes ?? 0);
@@ -22,7 +22,7 @@ export function formatBytes(bytes) {
unit++;
}
const digits = value >= 100 || unit === 0 ? 0 : 1;
- return `${new Intl.NumberFormat(culture(), { maximumFractionDigits: digits }).format(value)} ${units[unit]}`;
+ return `${new Intl.NumberFormat(culture(), { maximumFractionDigits: digits }).format(value)} ${units[unit]}`;
}
export function formatTime(iso) {
diff --git a/src/Chronos.Server/Api/SystemEndpoints.cs b/src/Chronos.Server/Api/SystemEndpoints.cs
index cec1f6c2..6ad2e623 100644
--- a/src/Chronos.Server/Api/SystemEndpoints.cs
+++ b/src/Chronos.Server/Api/SystemEndpoints.cs
@@ -80,8 +80,15 @@ public static class SystemEndpoints
{
var checks = new Dictionary(StringComparer.Ordinal)
{
- // "incomplete": a folder of the archive's layout could not be created (the dashboard says which and why).
- ["archive"] = !Directory.Exists(options.ArchivePath) ? "missing" : archive.Structure is { IsComplete: false } ? "incomplete" : "ok",
+ // "missing": the root or its archive.json is not there (an unmounted disk); "incomplete": a folder of the archive's
+ // layout could not be created (the dashboard says which and why). Checked again once the last check is older than
+ // HealthRecheck, so a fix on the host shows here without the dashboard.
+ ["archive"] = archive.CheckStructure(archive.HealthRecheck) switch
+ {
+ { Problem: Core.Archiving.ArchiveStructureProblem.Unavailable } => "missing",
+ { IsComplete: false } => "incomplete",
+ _ => "ok",
+ },
["data"] = Directory.Exists(options.DataPath) ? "ok" : "missing",
};
using var timeout = CancellationTokenSource.CreateLinkedTokenSource(context.RequestAborted);
diff --git a/src/Chronos.Server/Configuration/ServerOptions.cs b/src/Chronos.Server/Configuration/ServerOptions.cs
index 23c1bbbc..dbb79c97 100644
--- a/src/Chronos.Server/Configuration/ServerOptions.cs
+++ b/src/Chronos.Server/Configuration/ServerOptions.cs
@@ -392,7 +392,7 @@ public sealed class ServerOptions
throw new InvalidOperationException("CHRONOS_TLS_MODE=pem requires CHRONOS_TLS_CERT and CHRONOS_TLS_KEY.");
// Port 0 asks the OS for a free port (used by the in-process test host).
if (HttpPort is < 0 or > 65535 || HttpsPort is < 0 or > 65535)
- throw new InvalidOperationException("Ports must be between 0 and 65535.");
+ throw new InvalidOperationException("CHRONOS_HTTP_PORT and CHRONOS_HTTPS_PORT must be between 0 and 65535.");
if (PublicHttpPort is < 1 or > 65535 || PublicHttpsPort is < 1 or > 65535)
throw new InvalidOperationException("CHRONOS_PUBLIC_HTTP_PORT and CHRONOS_PUBLIC_HTTPS_PORT must be between 1 and 65535.");
try
@@ -410,7 +410,7 @@ public sealed class ServerOptions
if (MaxUploadBytes < 1 || TokenLifetimeDays < 1 || JobHistoryDays < 1 || UploadRetentionHours < 1)
throw new InvalidOperationException("Upload size, token lifetime, job history and upload retention must be positive.");
if (ServerLogging.Problem(LogRetentionDays, LogMaxFileMb, LogMaxTotalMb, AuditRetentionDays, DiagnosticsLogMb) is { } log)
- throw new InvalidOperationException($"{log} is out of range: {ServerLogging.Ranges}.");
+ throw new InvalidOperationException($"{VariableOf(log) ?? log} is out of range: {ServerLogging.Ranges}.");
if (!ServerLogging.IsLevel(LogLevel) || !ServerLogging.IsLevel(ConsoleLogLevel) || !Enum.IsDefined(LogRotation))
throw new InvalidOperationException("CHRONOS_LOG_LEVEL, CHRONOS_LOG_CONSOLE_LEVEL or CHRONOS_LOG_ROTATION has an unknown value.");
}
diff --git a/src/Chronos.Server/Storage/ServerArchive.cs b/src/Chronos.Server/Storage/ServerArchive.cs
index ec1d3838..8b48633a 100644
--- a/src/Chronos.Server/Storage/ServerArchive.cs
+++ b/src/Chronos.Server/Storage/ServerArchive.cs
@@ -54,15 +54,31 @@ public sealed class ServerArchive(Archive archive)
public ArchiveStructureReport? Structure => _structure;
private volatile ArchiveStructureReport? _structure;
+ private long _checkedAt = long.MinValue;
+
+ ///
+ /// How old the last may be when /health answers before it checks again: a fix made
+ /// on the host shows there without anyone opening the dashboard. Tests shorten it.
+ ///
+ public TimeSpan HealthRecheck { get; set; } = TimeSpan.FromSeconds(10);
///
/// Creates the folders of the archive's layout that are missing (BRIEF §7) and remembers what it found
- /// (): at start, and each time the dashboard is read, so a share that comes back heals.
+ /// (): at start, each time the dashboard is read and when /health finds the last check
+ /// older than , so a share that comes back heals. A root that holds no archive.json (an
+ /// unmounted disk leaves an empty mount point) is reported unavailable and nothing is created there.
///
- public ArchiveStructureReport CheckStructure()
+ /// The last check is returned as it is while younger than this; null always checks.
+ public ArchiveStructureReport CheckStructure(TimeSpan? maxAge = null)
{
- var report = ArchiveStructure.Ensure(new ArchivePaths(Root));
+ if (maxAge is { } age && _structure is { } recent && Environment.TickCount64 - Interlocked.Read(ref _checkedAt) < (long)age.TotalMilliseconds)
+ return recent;
+ var paths = new ArchivePaths(Root);
+ var report = File.Exists(paths.ManifestPath)
+ ? ArchiveStructure.Ensure(paths)
+ : new ArchiveStructureReport(paths.Root, [], ArchiveStructureProblem.Unavailable, paths.Root, null);
_structure = report;
+ Interlocked.Exchange(ref _checkedAt, Environment.TickCount64);
return report;
}
diff --git a/tests/Chronos.App.Tests/Settings/SettingsScreenSmokeTests.cs b/tests/Chronos.App.Tests/Settings/SettingsScreenSmokeTests.cs
index 56bda026..77430fcb 100644
--- a/tests/Chronos.App.Tests/Settings/SettingsScreenSmokeTests.cs
+++ b/tests/Chronos.App.Tests/Settings/SettingsScreenSmokeTests.cs
@@ -302,6 +302,55 @@ public sealed class SettingsScreenSmokeTests
Assert.Equal(edited, shell.Services.Settings.FileTemplate);
});
+ [Test]
+ public Task AFolderTypedAsTheArchiveFolderBecomesAnArchiveOnlyWhenTheUserConfirms() => ScreenHost.RunAsync(async () =>
+ {
+ // Rc.14 review: the folder may be half-typed or one of the user's own; nothing is written there unasked.
+ var dialogs = new AnsweringDialogs();
+ await using var app = await ScreenSmokeTests.SampleApp.StartAsync(dialogs: dialogs);
+ var shell = app.Shell;
+ var settings = shell.Settings;
+ shell.Navigate(SectionKey.Settings);
+ settings.Page = SettingsPage.Archive;
+ var mine = System.IO.Path.Combine(shell.Services.Environment.DataDirectory, "my-photos");
+ System.IO.Directory.CreateDirectory(mine);
+ var manifest = new Chronos.Core.Archiving.ArchivePaths(mine).ManifestPath;
+
+ settings.ArchiveRoot.Text = mine;
+ Assert.True(settings.ArchiveRoot.Commit());
+ await settings.ArchiveRetarget;
+ Assert.Count(1, dialogs.Asked);
+ Assert.Equal(mine, dialogs.Asked[0].Detail);
+ Assert.False(System.IO.File.Exists(manifest), "declined: the folder stays as it was");
+ Assert.Empty(System.IO.Directory.EnumerateFileSystemEntries(mine));
+ Assert.Equal(mine, shell.Services.Settings.LastArchivePath);
+
+ dialogs.Answer = true;
+ settings.ArchiveRoot.Text = string.Empty;
+ Assert.True(settings.ArchiveRoot.Commit());
+ await settings.ArchiveRetarget;
+ settings.ArchiveRoot.Text = mine;
+ Assert.True(settings.ArchiveRoot.Commit());
+ await settings.ArchiveRetarget;
+ Assert.Count(2, dialogs.Asked);
+ Assert.True(System.IO.File.Exists(manifest), "confirmed: the folder is an archive");
+ });
+
+ /// Dialogs that record each confirmation and give .
+ private sealed class AnsweringDialogs : IAppDialogs
+ {
+ public bool Answer { get; set; }
+ public List Asked { get; } = [];
+ public string? PickFolder(string title, string? initialFolder = null) => null;
+ public string? PickJsonFile(string title) => null;
+ public bool Confirm(ConfirmRequest request)
+ {
+ Asked.Add(request);
+ return Answer;
+ }
+ public bool SignIn(string server, string? username, Func> signIn) => false;
+ }
+
[Test]
public Task TheFirstRunDialogKeepsTheKeyboardInside() => ScreenHost.RunAsync(async () =>
{
diff --git a/tests/Chronos.App.Tests/Videos/VideosSectionTests.cs b/tests/Chronos.App.Tests/Videos/VideosSectionTests.cs
index 55adc2d3..11984947 100644
--- a/tests/Chronos.App.Tests/Videos/VideosSectionTests.cs
+++ b/tests/Chronos.App.Tests/Videos/VideosSectionTests.cs
@@ -27,7 +27,7 @@ namespace Chronos.App.Tests.Videos;
/// The Videos library's sources (owner review 1, R9; decision 20): this PC's, the server's and the workspace's renders
/// merged by render id, the filters and the orders, the videos folder's checks, the player's fallback, and the copy's toast.
///
-public sealed class VideoSourcesTests
+public sealed class VideoSourcesTests(TestContext context)
{
private static readonly Guid Harbour = Guid.CreateVersion7();
private static readonly Guid Comet = Guid.CreateVersion7();
@@ -261,6 +261,30 @@ public sealed class VideoSourcesTests
Assert.True(VideoSources.FromWorkspace(render.AsFailed("no"), project, @"C:\ws\exports\harbour.mp4", exists: false) is { IsUnsent: true, Missing: true });
}
+ [Test]
+ public void ASentRenderWhoseFileLeftTheWorkspaceIsNotListedAsMissing()
+ {
+ // Rc.14 review: its home holds it, and the home's entry stands for it; only a render not sent yet can be missing.
+ var store = new WorkspaceStore(context.CreateTempDirectory("ledger"));
+ var home = new BundleHome(BundleHome.ArchiveKind, Harbour);
+ var project = new WorkspaceEntry(Guid.CreateVersion7(), Harbour, "Social cut", false, home, "Harbour sunset", true, DateTimeOffset.UtcNow);
+ var folder = store.Project(project.ProjectId);
+ Directory.CreateDirectory(folder.ExportsDirectory);
+ WorkspaceRenderEntry Render(string file) => new(Guid.CreateVersion7(), Guid.CreateVersion7(), file, new string('a', 64), 8, "Instagram", "h264", 1080, 1920, 30, 12,
+ project.ProjectId, null, null, DateTimeOffset.UtcNow);
+ File.WriteAllText(folder.ExportFile("kept.mp4"), "rendered");
+ var kept = Render("kept.mp4").AsSent(DateTimeOffset.UtcNow);
+ var gone = Render("gone.mp4").AsSent(DateTimeOffset.UtcNow);
+ var lost = Render("lost.mp4");
+ folder.WriteRenders(WorkspaceRenders.Empty.With(kept).With(gone).With(lost));
+
+ var entries = VideoSources.ReadWorkspace(store, [project]);
+ Assert.Count(2, entries);
+ Assert.True(entries.Single(e => e.Id == kept.RenderId) is { IsWorkspaceSent: true, Missing: false });
+ Assert.True(entries.Single(e => e.Id == lost.RenderId) is { IsUnsent: true, Missing: true }, "a render not sent yet whose file is gone is missing");
+ Assert.False(entries.Any(e => e.Id == gone.RenderId));
+ }
+
[Test]
public void ACardStartsWithItsPresetAndKeepsSizesWhole()
{
diff --git a/tests/Chronos.App.Tests/Workspace/WorkspaceHostTests.cs b/tests/Chronos.App.Tests/Workspace/WorkspaceHostTests.cs
index e438e123..218f4e98 100644
--- a/tests/Chronos.App.Tests/Workspace/WorkspaceHostTests.cs
+++ b/tests/Chronos.App.Tests/Workspace/WorkspaceHostTests.cs
@@ -131,10 +131,13 @@ public sealed class WorkspaceHostTests(TestContext context)
Assert.Equal(at, mine.WorkspaceOpened[project]);
// Import takes another PC's preferences and keeps this PC's projects.
- var theirs = new AppSettings { WorkspaceSizeLimitGb = 40, WorkspaceFolder = @"E:\Elsewhere" };
+ var theirs = new AppSettings { WorkspaceSizeLimitGb = 40, WorkspaceFolder = @"E:\Elsewhere", LastArchivePath = @"D:\Photos" };
theirs.WorkspaceOpened[Guid.CreateVersion7()] = at.AddDays(-3);
+ mine.LastArchivePath = @"F:\Chronos";
var imported = mine.KeepLocalIn(AppSettings.Parse(theirs.ToJson())!);
Assert.Equal((40, @"D:\Fast\Workspace"), (imported.WorkspaceSizeLimitGb, imported.WorkspaceFolder));
+ // Another PC's archive folder can name one of this PC's own folders: this PC's stays.
+ Assert.Equal(@"F:\Chronos", imported.LastArchivePath);
Assert.Equal(at, imported.WorkspaceOpened.Values.Single());
Assert.Count(1, imported.WorkspaceOpened);
}
diff --git a/tests/Chronos.Server.Tests/Hosting/AdminVideosTests.cs b/tests/Chronos.Server.Tests/Hosting/AdminVideosTests.cs
index 5fffbfc0..173f6cc2 100644
--- a/tests/Chronos.Server.Tests/Hosting/AdminVideosTests.cs
+++ b/tests/Chronos.Server.Tests/Hosting/AdminVideosTests.cs
@@ -116,11 +116,21 @@ public sealed partial class AdminVideosTests(TestContext context)
Assert.Contains(@"data-view=""board"" aria-pressed=""${view === ""board""}"" data-i18n-title=""Admin.Videos.View.Board.Tip""", page);
Assert.Contains(@"return stored === ""list"" || stored === ""board"" ? stored : ""cards"";", page);
Assert.Contains(" board: `