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:
@@ -963,6 +963,7 @@ pub fn run(paths: Vec<PathBuf>) -> Result<()> {
|
||||
&window,
|
||||
identity.clone(),
|
||||
library.catalog(),
|
||||
activity.clone(),
|
||||
move || {
|
||||
let (_, session) = lib_store.session()?;
|
||||
dr_thumbs::ThumbStore::open(&library::thumbs_dir(
|
||||
@@ -1276,6 +1277,25 @@ pub fn run(paths: Vec<PathBuf>) -> Result<()> {
|
||||
if let Some(w) = weak.upgrade() {
|
||||
settings_ui::render(&w, &ctl);
|
||||
}
|
||||
},
|
||||
{
|
||||
// Face coverage, read when the page opens. The figures live in the
|
||||
// catalog and the settings page holds no session, so they arrive
|
||||
// through here rather than being kept up to date continuously —
|
||||
// they are only ever looked at while this page is on screen.
|
||||
let lib = library.clone();
|
||||
let catalog = library.catalog();
|
||||
move |w: &AppWindow| {
|
||||
let store = lib.session().and_then(|(_, s)| {
|
||||
dr_thumbs::ThumbStore::open(&library::thumbs_dir(&s.server, &s.user_id)).ok()
|
||||
});
|
||||
identity_ui::refresh_coverage(w, &catalog, store.as_ref());
|
||||
w.set_identity_model_missing(
|
||||
lib.session()
|
||||
.and_then(|(_, s)| library::face_models(&s.server, &s.user_id))
|
||||
.is_none(),
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2037,6 +2057,9 @@ pub fn run(paths: Vec<PathBuf>) -> Result<()> {
|
||||
if std::env::var_os("DARKROOM_START_IDENTITY").is_some() {
|
||||
window.invoke_identity_open();
|
||||
}
|
||||
if std::env::var_os("DARKROOM_START_SETTINGS").is_some() {
|
||||
window.invoke_settings_open();
|
||||
}
|
||||
|
||||
{
|
||||
let weak = window.as_weak();
|
||||
|
||||
Reference in New Issue
Block a user