Make feature backfill an explicit Settings action
Drop the auto-run at launch; add a "Backfill audio features" button to
Settings > Storage (next to Cleanup orphans / Scan). The button disables and
shows a spinner while running. Backfill remains background, yielding, and
resumable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 files changed,
+28 insertions,
-4 deletions
| 421 |
421 |
|
browser.import_path(&path);
|
| 422 |
422 |
|
}
|
| 423 |
423 |
|
}
|
| 424 |
|
- |
// Backfill feature vectors for samples imported before the feature store
|
| 425 |
|
- |
// existed. No-op for new/covered libraries; skips if a CLI import is already
|
| 426 |
|
- |
// running (it'll resume on next launch). Runs silently in the background.
|
| 427 |
|
- |
browser.start_backfill();
|
| 428 |
424 |
|
(Some(browser), None)
|
| 429 |
425 |
|
}
|
| 430 |
426 |
|
Err(e) => {
|
| 291 |
291 |
|
}
|
| 292 |
292 |
|
});
|
| 293 |
293 |
|
|
|
294 |
+ |
// Backfill audio features: compute and store the feature data used by
|
|
295 |
+ |
// tag suggestions for samples that lack a current version (e.g. imported
|
|
296 |
+ |
// before the feature store existed). Reuses the analysis worker and runs
|
|
297 |
+ |
// in the background; the button reflects in-progress state.
|
|
298 |
+ |
ui.add_space(theme::space::SM);
|
|
299 |
+ |
ui.horizontal(|ui| {
|
|
300 |
+ |
let running = state.backfill_in_progress;
|
|
301 |
+ |
let label = if running {
|
|
302 |
+ |
"Backfilling audio features..."
|
|
303 |
+ |
} else {
|
|
304 |
+ |
"Backfill audio features"
|
|
305 |
+ |
};
|
|
306 |
+ |
if ui
|
|
307 |
+ |
.add_enabled(!running, egui::Button::new(label))
|
|
308 |
+ |
.on_hover_text(
|
|
309 |
+ |
"Compute the audio feature data used by tag suggestions for samples \
|
|
310 |
+ |
that don't have it yet. Runs in the background \u{2014} keep working; \
|
|
311 |
+ |
it yields to any analysis you start and resumes later.",
|
|
312 |
+ |
)
|
|
313 |
+ |
.clicked()
|
|
314 |
+ |
{
|
|
315 |
+ |
state.start_backfill();
|
|
316 |
+ |
}
|
|
317 |
+ |
if running {
|
|
318 |
+ |
ui.spinner();
|
|
319 |
+ |
}
|
|
320 |
+ |
});
|
|
321 |
+ |
|
| 294 |
322 |
|
ui.add_space(theme::space::MD);
|
| 295 |
323 |
|
ui.separator();
|
| 296 |
324 |
|
ui.add_space(theme::space::SM);
|