Skip to content

hotfix: avoid OG root file/dir name collision on CF#11

Merged
jrphilo merged 1 commit into
mainfrom
hotfix/og-root-collision
Apr 22, 2026
Merged

hotfix: avoid OG root file/dir name collision on CF#11
jrphilo merged 1 commit into
mainfrom
hotfix/og-root-collision

Conversation

@jrphilo
Copy link
Copy Markdown
Collaborator

@jrphilo jrphilo commented Apr 22, 2026

Summary

On preview, /og/docs.png and /og/changelog.png return 404 HTML (from Next, not from CF's asset handler) because their filenames collide with the /og/docs/ and /og/changelog/ directories that hold the per-slug PNGs. CF Workers Assets can't resolve the file vs directory at the same path, so the worker intercepts and Next 404s.

Move root cards inside the subfolders at _root.png — no filename overlap, CF serves them cleanly.

/og/docs/start-here/install.png etc. were never affected; only the two index/root cards were broken.

Test plan

  • Regenerate local build — public/og/docs/_root.png and public/og/changelog/_root.png produced
  • After deploy, confirm preview.happyhq.com/og/docs/_root.png and /og/changelog/_root.png return 200
  • Confirm <meta og:image> on /docs root page now points at the new path
  • Force-refresh Slack unfurl (or test in a fresh channel) to confirm the updated card shows

🤖 Generated with Claude Code

public/og/docs.png alongside public/og/docs/ (and same for changelog)
breaks CF Workers Assets serving — the worker gets the request, Next
handles it, and returns a 404 HTML page because we deleted the routes.
Local Next serves both fine, but CF's asset handler can't resolve the
collision.

Move root cards inside their subdirectories at _root.png so there's no
file/directory name overlap. Sub-slug cards were already served fine —
this only touches the docs and changelog index cards.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jrphilo jrphilo merged commit 8ac1c3b into main Apr 22, 2026
1 check was pending
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