Skip to content

Conversation

@ComputelessComputer
Copy link
Collaborator

@ComputelessComputer ComputelessComputer commented Dec 3, 2025

Summary

Adds a &v=1 version parameter to all OG image URLs to force browsers to fetch fresh images instead of serving stale cached versions.

Root cause: PR #2086 added proper Netlify CDN cache headers (Netlify-Vary: query), but users who had previously visited the site still had the old (incorrect) OG images cached in their browser. Because the cache headers include max-age=31536000, immutable, browsers won't revalidate these URLs until the cache expires (1 year).

Fix: Adding a version parameter (&v=1) changes the URL, forcing all browsers to treat it as a new resource and fetch fresh images. This is a standard cache-busting technique.

Files updated:

  • apps/web/src/routes/_view/index.tsx (homepage blog section)
  • apps/web/src/routes/_view/blog/$slug.tsx (blog pages + related articles)
  • apps/web/src/routes/_view/changelog/$slug.tsx
  • apps/web/src/routes/_view/docs/$.tsx
  • apps/web/src/routes/_view/templates/$slug.tsx
  • apps/web/src/routes/_view/shortcuts/$slug.tsx
  • apps/web/src/routes/_view/gallery/$type.$slug.tsx

Review & Testing Checklist for Human

  • Verify in production that the homepage blog section shows 3 different OG images (not duplicates)
  • Check browser DevTools Network tab to confirm OG image requests include &v=1 and are not served from memory cache
  • If OG templates change in the future, remember to bump v=1 to v=2 to invalidate caches again

Recommended test plan: After deployment, open the homepage in an incognito window, scroll to the blog section, and verify each blog card displays a unique OG image with the correct title/date.

Notes

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 58f3ded
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692fafa255992900089f91c2
😎 Deploy Preview https://deploy-preview-2087--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 58f3ded
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692fafa24d6a250008372495
😎 Deploy Preview https://deploy-preview-2087--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

Appends a static cache-busting query parameter &v=1 to generated Open Graph image URLs across seven web route files; no other logic, control flow, or exported signatures were changed.

Changes

Cohort / File(s) Summary
OG Image Cache-Busting
apps/web/src/routes/_view/blog/$slug.tsx, apps/web/src/routes/_view/changelog/$slug.tsx, apps/web/src/routes/_view/docs/$.tsx, apps/web/src/routes/_view/gallery/$type.$slug.tsx, apps/web/src/routes/_view/index.tsx, apps/web/src/routes/_view/shortcuts/$slug.tsx, apps/web/src/routes/_view/templates/$slug.tsx
Appends the query parameter &v=1 to dynamically generated Open Graph image URLs (og:image / twitter:image). No control-flow, error handling, or exported signature changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Repetitive, low-risk string change applied consistently across multiple files.
  • Minimal logic density; focus reviewers can skim the seven locations to confirm correct URL concatenation and no accidental mutation of existing params.

Possibly related PRs

Suggested reviewers

  • yujonglee

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a version parameter to OG URLs for cache-busting purposes.
Description check ✅ Passed The description is directly related to the changeset, providing context about the cache-busting fix, root cause, and listing all modified files.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1764732044-fix-og-image-cache

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 965d531 and 58f3ded.

📒 Files selected for processing (1)
  • .github/workflows/api_ci.yaml (0 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/api_ci.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: ci
  • GitHub Check: fmt
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: Devin

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@ComputelessComputer ComputelessComputer merged commit c5d7b91 into main Dec 3, 2025
13 of 14 checks passed
@ComputelessComputer ComputelessComputer deleted the devin/1764732044-fix-og-image-cache branch December 3, 2025 03:42
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.

2 participants