fix(apps): stop mangling long platforms and blob image URLs - #55
Merged
Merged
Conversation
Two bugs surfaced by the Talk-Wave submission (#54): - Platforms were truncated to 24 chars, turning "Progressive Web-App (PWA)" into "Progressive Web-App (PWA". Raise the bound to 32 and have the submission workflow report an over-length entry so the submitter can fix it, rather than silently writing a mangled value. - github.com/<owner>/<repo>/blob/<ref>/<path> image links passed the host allowlist but serve an HTML page, so they render as a broken image. Normalise them to raw.githubusercontent.com in both the workflow and the catalog builder.
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.
Two bugs the Talk-Wave submission (#54) ran into once its description was under the limit.
Platform truncation.
.map(p => p.slice(0, 24))cutProgressive Web-App (PWA)(25 chars) toProgressive Web-App (PWA— a mangled value written straight intoapps/<slug>.json. The bound is now 32 in both the workflow and the builder, and the workflow reports an over-length entry as a normal validation problem so the submitter can shorten it themselves instead of getting a silently broken listing./blob/image URLs.github.com/<owner>/<repo>/blob/<ref>/<path>is on the image host allowlist and serves an HTML page, not the image, so icons and screenshots submitted that way render broken. Both the workflow andscripts/build-catalog.mjsnow rewrite that shape toraw.githubusercontent.com.github.com/user-attachments/...URLs are untouched.No catalog change — no listing currently uses a blob URL or an over-length platform.