Start face indexing from Settings
Beside the thumbnail sweep, because it is the same kind of thing: a job that runs for an hour, is asked for once, and reports into the activity list above it. It is also downstream of that sweep -- detection reads the proxies it builds -- so the two belong in that order, and the coverage line says how many images are waiting on a proxy rather than only how many are left to index. The button drives the Identity Manager's own state rather than a second copy, so it cannot disagree with that screen about whether a pass is running, and either place can start or stop it. The pass now opens an activity row. The caption promises progress will appear in the list above, and without a row it would not: the button would be the only sign anything was happening, invisible from every other screen. Coverage is read when the Settings page opens. The figures live in the catalog and this page deliberately holds no session, so they arrive through a closure rather than being kept current -- they are only ever looked at while the page is on screen, and the check is two counts and an indexed scan. Also adds DARKROOM_NO_SYNC. Redirecting XDG_DATA_HOME isolates a test launch's catalog and thumbnails but not its server, and I found that out by pushing a test catalog over the live one. The guard sits in start_derived_sync rather than at its three call sites, because the sweep firing a sync is correct and a flag checked in three places is one that gets missed in a fourth. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,19 @@ export component SettingsPage inherits Rectangle {
|
||||
in property <bool> library-open: false;
|
||||
callback thumbnail-library();
|
||||
|
||||
/// TRACES: FR-CULL-8
|
||||
/// The face-indexing pass, and what a coverage check last found.
|
||||
///
|
||||
/// Beside the thumbnail sweep because it is the same kind of thing: a job
|
||||
/// that runs for an hour, is asked for once, and reports into the list
|
||||
/// above. It is also *downstream* of that sweep — face detection reads the
|
||||
/// proxies it builds — so the two belong in the same place, in that order.
|
||||
in property <bool> face-indexing: false;
|
||||
in property <string> face-coverage;
|
||||
/// No model on disk, so the pass cannot run at all.
|
||||
in property <bool> face-model-missing: false;
|
||||
callback index-faces();
|
||||
|
||||
// --- cache ---------------------------------------------------------
|
||||
in-out property <string> original-budget;
|
||||
in property <bool> original-unlimited: false;
|
||||
@@ -369,6 +382,48 @@ export component SettingsPage inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// TRACES: FR-CULL-8
|
||||
// Face indexing, directly under the sweep that feeds
|
||||
// it. Detection runs on the proxies the pass above
|
||||
// builds, so a library that has not been thumbnailed
|
||||
// has nothing here to index — which is why the
|
||||
// coverage line says how many images are waiting on a
|
||||
// proxy rather than only how many are left.
|
||||
if root.library-open: Rectangle {
|
||||
height: Theme.gap-sm;
|
||||
}
|
||||
|
||||
if root.library-open: Caption {
|
||||
text: "Face indexing looks for people in the "
|
||||
+ "photographs already thumbnailed above. It "
|
||||
+ "runs once per library and syncs, so your "
|
||||
+ "other devices never repeat the work.";
|
||||
wrap: word-wrap;
|
||||
}
|
||||
|
||||
if root.library-open && root.face-coverage != "": Caption {
|
||||
text: root.face-coverage;
|
||||
wrap: word-wrap;
|
||||
}
|
||||
|
||||
if root.library-open && root.face-model-missing: Caption {
|
||||
text: "No face model is installed, so this cannot run.";
|
||||
wrap: word-wrap;
|
||||
}
|
||||
|
||||
if root.library-open: Rectangle {
|
||||
height: Theme.control-height;
|
||||
|
||||
Button {
|
||||
x: 0;
|
||||
text: root.face-indexing
|
||||
? "Indexing faces…"
|
||||
: "Index faces in the whole library";
|
||||
enabled: !root.face-indexing && !root.face-model-missing;
|
||||
clicked => { root.index-faces(); }
|
||||
}
|
||||
}
|
||||
|
||||
if root.activity-kept > 0: Rectangle {
|
||||
height: Theme.control-height;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user