hotfix: avoid OG root file/dir name collision on CF#11
Merged
Conversation
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>
This was referenced May 13, 2026
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.
Summary
On preview,
/og/docs.pngand/og/changelog.pngreturn 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.pngetc. were never affected; only the two index/root cards were broken.Test plan
public/og/docs/_root.pngandpublic/og/changelog/_root.pngproducedpreview.happyhq.com/og/docs/_root.pngand/og/changelog/_root.pngreturn 200<meta og:image>on/docsroot page now points at the new path🤖 Generated with Claude Code