View modal batch: autofocus, suggestions UX, post-title click, retire copyright/artist #41

Merged
bvandeusen merged 3 commits from dev into main 2026-06-01 07:01:42 -04:00
Showing only changes of commit 5d284aae9f - Show all commits
+5 -2
View File
@@ -25,10 +25,13 @@ def _img(sha: str, predictions: dict) -> ImageRecord:
@pytest.mark.asyncio
async def test_threshold_filters_low_confidence_general(db):
# Default general threshold is 0.50 (alembic 0029 lowered it from
# 0.95). Use 0.30/0.60 to keep the test asserting threshold behavior
# rather than the exact cutoff number.
img = _img(
"a" * 64,
{
"smile": {"category": "general", "confidence": 0.80},
"lowconf": {"category": "general", "confidence": 0.30},
"sword": {"category": "general", "confidence": 0.97},
},
)
@@ -37,7 +40,7 @@ async def test_threshold_filters_low_confidence_general(db):
sl = await SuggestionService(db).for_image(img.id)
names = [s.display_name for s in sl.by_category.get("general", [])]
assert "sword" in names
assert "smile" not in names
assert "lowconf" not in names
@pytest.mark.asyncio