Skip to content

Show only main pet posts in Recent posts feed (#120)#127

Merged
jonnyjohannes merged 1 commit into
masterfrom
fix/mastodon-thread-posts-120
Jun 10, 2026
Merged

Show only main pet posts in Recent posts feed (#120)#127
jonnyjohannes merged 1 commit into
masterfrom
fix/mastodon-thread-posts-120

Conversation

@MilesMorel

Copy link
Copy Markdown
Collaborator

Problem

Closes #120. The "Recent posts" grid on the landing page showed blank, imageless cards.

Each pet is posted to Mastodon as a thread: the main post carries the photo + caption, and caption-overflow continuation posts have no media attachment. The grid took the first 6 RSS <item>s indiscriminately, so those imageless thread replies rendered as empty placeholder cards.

Fix

docs/index.html:

  • Add an itemImageUrl(item) helper returning the first image attachment URL (or "").
  • Map each RSS item to { item, imageUrl }, filter out the imageless thread replies, then slice to the post limit — so only main posts show and each item's image URL is computed once.
  • Drop the now-dead placeholder branch; every rendered card has a real image.

Verification

Served docs/ locally and loaded the page: the grid renders 6 main pet posts, no blank cards, no related console errors. Against the live feed at the time, 10 of 20 items were main posts (with images) — comfortably above the 6-post limit.

🤖 Generated with Claude Code

Each pet is posted to Mastodon as a thread: a main post carries the
photo while caption-overflow continuation posts have no media. The
website's Recent posts grid took the first 6 RSS items indiscriminately,
rendering the imageless thread replies as blank placeholder cards.

Filter the feed to items that have an image before slicing to the post
limit, so only the main posts appear. Closes #120.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@binamkayastha binamkayastha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jonnyjohannes jonnyjohannes merged commit d356e1f into master Jun 10, 2026
2 checks passed
@jonnyjohannes jonnyjohannes deleted the fix/mastodon-thread-posts-120 branch June 10, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix webpage to not show mastadon posts without images

3 participants