Crisp hero (prefer og:image), 7-card Highlights, no-recycle Replace + session History
- Hero blur fix: brief enrichment now prefers a page's og:image even when a feed thumbnail exists (feed thumbs are often tiny; the hero is shown large). Verified: BBC hero upgrades to the 1024px share image, ScienceDaily to 1920px. - Today is now 'Highlights from Today' — hero + 6 (brief size 7), which also makes the secondary grid a balanced 3+3 instead of an orphaned 3+1. - Replace now excludes every article seen this session (a client-side seen-set), so it never cycles back to something already shown. - New session History panel (this tab only, no account): lists everything seen, including swapped-away stories, so they stay recoverable. Persistent history/favorites are tabled for sign-in later. Tests: og:image upgrade of an existing feed image (86 total). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -127,13 +127,16 @@ def enrich_brief_images(conn: sqlite3.Connection, brief_date: str, fetch=fetch_o
|
||||
stamps image_checked_at either way so failures are not retried forever.
|
||||
Returns how many images were newly found.
|
||||
"""
|
||||
# Brief items not yet checked. We fetch even when a feed image exists,
|
||||
# because feed thumbnails are often tiny and the hero is shown large — a
|
||||
# page's og:image (the social-share image) is the better hero visual.
|
||||
rows = conn.execute(
|
||||
"""
|
||||
SELECT a.id, a.canonical_url
|
||||
FROM daily_briefs b
|
||||
JOIN daily_brief_items bi ON bi.brief_id = b.id
|
||||
JOIN articles a ON a.id = bi.article_id
|
||||
WHERE b.brief_date = ? AND a.image_url IS NULL AND a.image_checked_at IS NULL
|
||||
WHERE b.brief_date = ? AND a.image_checked_at IS NULL
|
||||
ORDER BY bi.rank
|
||||
LIMIT ?
|
||||
""",
|
||||
|
||||
Reference in New Issue
Block a user