Quality scan v4: calibrated PIL verdicts (dark/blurry, 300px downscale, threshold 200); persist status+flag_reason; lazy thumbnails (11.5s→0.08s page load)

This commit is contained in:
2026-08-09 14:11:54 +10:00
parent 03f8af42c5
commit 2945b1c0f6
4 changed files with 126 additions and 138 deletions

View File

@@ -15,6 +15,7 @@
<span class="badge {{ item["status"] }}">{{ item["status"] }}</span>
<span style="color:#666"> · {{ item["source"] }}</span>
{% if item["size_mb"] %}<span style="color:#666"> · {{ item["size_mb"] }}MB</span>{% endif %}
{% if item.get("flag_reason") %}<span style="color:#d43"> · ⚠ {{ item["flag_reason"] }}</span>{% endif %}
</div>
<div class="actions">
<button class="approve" hx-post="/review/{{ item["sha256"] }}/approve" hx-target="#card-{{ sha8 }}" hx-swap="outerHTML" hx-on::after-request="if(event.detail.successful){this.closest('.card').remove();updateCount();showToast('Approved');}">✅ Keep</button>

View File

@@ -32,6 +32,8 @@
.badge.approved { background: #1d4; color: #031; }
.badge.rejected { background: #d43; color: #fff; }
.badge.scanned { background: #333; }
.badge.keep { background: #1d4; color: #031; }
.badge.delete_candidate { background: #d43; color: #fff; }
.badge.review { background: #da4; color: #321; }
.card .actions { display: flex; gap: .25rem; padding: .5rem; }
.card button { flex: 1; border: 0; border-radius: 4px; padding: .4rem; cursor: pointer; font-size: .75rem; }
@@ -57,7 +59,7 @@
<form method="get" action="/review" style="display:flex;gap:.5rem;" autocomplete="off">
<select name="status">
<option value="">all statuses</option>
{% for s in ["scanned", "review", "approved", "rejected"] %}
{% for s in ["keep", "review", "delete_candidate", "scanned", "approved", "rejected"] %}
<option value="{{ s }}" {% if status == s %}selected{% endif %}>{{ s }}</option>
{% endfor %}
</select>