Restructure Settings nav, modernize import page, dedup/genres UX polish

Settings is now one top-nav entry with Credentials and Jobs as sidebar
sub-pages (jobs moved from /jobs to /settings/jobs). Manual import page
replaces the bare file input and free-text filename field with a drag-drop
dropzone and a proper file-picker table. Genres page drops the "force"
checkbox for two explicit buttons (Preview / Fix genres now). Dedup's
"Scan now" runs both the file-naming and acoustic passes together, and the
table labels which pass caught each candidate instead of showing the raw
pass name. .btn-ghost gets a visible border so it reads as a real button
next to Delete/Danger actions instead of looking unaligned. Job names
throughout the UI are now human-readable instead of raw job_key strings.

Also includes the fpcalc exit-code fix from earlier (fingerprint index
was discarding valid fingerprints on files with a benign decode warning).
This commit is contained in:
andrew
2026-07-09 10:26:40 -06:00
parent 1f733d6e91
commit b4dd2286a9
18 changed files with 315 additions and 108 deletions
+9 -4
View File
@@ -8,7 +8,7 @@ from app.models import JobRun, ScheduledJob
from app.security.deps import require_auth
from app.services import scheduler_service
router = APIRouter(prefix="/jobs", tags=["jobs"])
router = APIRouter(prefix="/settings/jobs", tags=["jobs"])
templates = Jinja2Templates(directory="app/templates")
@@ -38,6 +38,7 @@ def _job_list_context(db):
maintenance_jobs.append(
{
"job_key": job_key,
"label": scheduler_service.humanize_job_key(job_key),
"description": scheduler_service.MAINTENANCE_JOB_DESCRIPTIONS.get(job_key, ""),
"next_run": _format_next_run(next_run),
"enabled": enabled_by_key.get(job_key, True),
@@ -46,7 +47,11 @@ def _job_list_context(db):
recent_runs = list(
db.execute(select(JobRun).order_by(JobRun.started_at.desc()).limit(50)).scalars()
)
return {"maintenance_jobs": maintenance_jobs, "recent_runs": recent_runs}
return {
"maintenance_jobs": maintenance_jobs,
"recent_runs": recent_runs,
"humanize_job_key": scheduler_service.humanize_job_key,
}
@router.get("")
@@ -70,7 +75,7 @@ async def run_now(job_key: str, user: dict = Depends(require_auth)):
await scheduler_service.trigger_now(scheduler, job_key)
except ValueError as exc:
raise HTTPException(404, str(exc))
return RedirectResponse(url="/jobs", status_code=303)
return RedirectResponse(url="/settings/jobs", status_code=303)
@router.post("/{job_key:path}/toggle")
@@ -81,7 +86,7 @@ async def toggle_enabled(job_key: str, user: dict = Depends(require_auth), db=De
row = db.execute(select(ScheduledJob).where(ScheduledJob.job_key == job_key)).scalar_one_or_none()
currently_enabled = row.enabled if row else True
scheduler_service.set_maintenance_enabled(scheduler, job_key, not currently_enabled)
return RedirectResponse(url="/jobs", status_code=303)
return RedirectResponse(url="/settings/jobs", status_code=303)
@router.get("/runs/{run_id}/log", response_class=PlainTextResponse)