Skip to content

Added: dynamic Open Graph/Twitter metadata for saved results#418

Open
mnot wants to merge 1 commit into
mainfrom
claude/brave-solomon-5d060a
Open

Added: dynamic Open Graph/Twitter metadata for saved results#418
mnot wants to merge 1 commit into
mainfrom
claude/brave-solomon-5d060a

Conversation

@mnot

@mnot mnot commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Saved result pages (/saved/{id}) now emit per-result og:title, og:description, og:url, and Twitter summary-card tags, so sharing a saved link unfurls into a meaningful preview (tested URI + a problem/warning roll-up) instead of the generic site card.

Approach

  • Metadata is derived only for saved results, where the full resource (and its notes) is already loaded when the <head> renders. Live tests are still fetching at that point, so they keep the static site metadata.
  • New social_meta() helper in html_base.py builds the values; the OG block in response_start.html is now conditional and adds twitter:card/title/description, with og:url pointing at the saved permalink.
  • Single results get a BAD/WARN roll-up (e.g. "1 problem, 2 warnings found by REDbot's HTTP checks."); clean results say "No problems found…"; descend results get a generic "resource and its embedded resources" description (detected via resource.descend, since the saved-load path doesn't pass a descend kw).
  • og:image is unchanged (static logo) — no per-result image exists.

Verification

Ran a local daemon and confirmed all three paths against real checks:

  • Live (non-saved) → static OG (unchanged)
  • Saved single → dynamic title/description/permalink, correct singular/plural, apostrophe escaped
  • Saved descend → generic embedded-resources description

make typecheck and make lint clean (pylint 10.00/10, j2lint passes).


🤖 AI-generated by Claude (Opus 4.8). Design, the link-preview mockup, and the local end-to-end verification were reviewed by @mnot; the human author reviewed before merge.

Saved result pages now emit per-result og:title, og:description, og:url
and Twitter summary-card tags so that sharing a /saved/ link unfurls into
a meaningful preview (tested URI plus a problem/warning roll-up) instead
of the generic site card.

The metadata is derived only for saved results, where the full resource
(and its notes) is available when the <head> is rendered; live tests are
still fetching at that point, so they keep the static site metadata. The
roll-up counts BAD/WARN notes for single results; descend results get a
generic "resource and its embedded resources" description.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant