Fix hero image wiped on article re-fetch; launch on Explore (#110) - #113
Merged
Conversation
Two reader fixes for 0.5.1: - The image dedup pass in renderArticle pre-seeds the hero thumbnail URL into its seen-set, then walked every img INCLUDING the hero — deleting the hero as a duplicate of itself (and the matching body lead image right after). Most visible after "Fetch full content" adds an og:image to the frontmatter: the refetched article lost its top image entirely. The pass now skips images inside .article-hero. Fixes the re-fetch image wipe; heroes render at all again. - On launch the dashboard (Explore) renders but the sidebar nav kept its hardcoded "All Items" highlight. Default the active nav to Explore in the markup and re-sync it after init renders the hub. Fixes #110 Both covered by a new Playwright spec (hero-image.spec.ts) verified red on the old code and green on the fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AdXEsWQTadb9qbTQjLkMqn
shellen
marked this pull request as ready for review
August 26, 2026 19:17
This was referenced Aug 26, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hero image wiped by "Fetch full content"
renderArticle's image dedup pre-seeds the frontmatter thumbnail URL into its seen-set to kill body duplicates — but it walks every<img>in the rendered HTML including the hero itself, so the hero is removed as a duplicate of its own pre-seeded URL (empty.article-herodiv left behind). Truncated feed articles usually have no frontmatter image (lead image lives in the body, renders fine); a re-fetch adds the site'sog:imageto frontmatter, arming the pre-seed — which then deletes both the new hero and the matching body lead image. More content, no image.Fix: the dedup loop skips images inside
.article-hero. The pre-seed then does what it was meant to — remove the body copy, keep the hero. This also fixes heroes never surviving render on any article that had a frontmatter image.Launch highlights All Items instead of Explore (#110)
init()renders the Explore dashboard but the nav'sactiveclass was hardcoded on All Items in the markup and never synced. Moved the default to Explore and re-sync afterrenderHub().Testing
tests/e2e/hero-image.spec.ts: hero survives dedup, body duplicate still removed, distinct images untouched, launch nav = Explore. Verified red on old code, green on fix..article-herodiv present,imgremoved — on every article with a frontmatter image).e2e-realfailures are pre-existing environment issues, identical on unmodified main.Hold for 0.5.1 early next week — do not merge yet (merging refreshes the public rolling DMG; rollout intentionally deferred so issues can be staffed).
🤖 Generated with Claude Code
https://claude.ai/code/session_01AdXEsWQTadb9qbTQjLkMqn