Skip to content

The build page says a damaged link is damaged, and how to bring its source - #39

Merged
alekswebnet merged 1 commit into
mainfrom
fix/build-page-damaged-link
Nov 13, 2026
Merged

alekswebnet merged 1 commit into
mainfrom
fix/build-page-damaged-link

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #38.

For a link whose source cannot be read, the build page now says the link arrived damaged and shows what to do, above the source box. Before this, it said the link carried an activity, over an empty box, and put the only message under Build, out of sight.

What changes

  • The hero: "The link you opened arrived damaged, so the activity in it cannot be read" replaces "The link you opened carries an activity an AI chat wrote". It stays for the visit, since that link carried nothing whatever comes after.
  • Step 1: a message above the box gives the three ways on: ask the chat for the link again, open the .source.json file it gave (a button opens the file picker), or paste the source. "The link carried it here" is hidden. The step's marker turns red, as for a source that is not JSON.
  • Once a source arrives by file or paste, the message goes, the step turns done, and Build works as before. The page's address then carries that source, so a reload is an ordinary link.
  • The technical reason ("not base64url", "neither JSON nor deflated JSON") goes to the console instead of the status under Build.
  • Unchanged: a link that can be read, a link whose source names files, and the landing page with no link.

Files: src/h5p/build/index.njk, src/h5p/build/build-page.ts, and one rule in src/assets/site.css (a class unread on <html>, beside linked).

Tested

  • pnpm install --frozen-lockfile, pnpm typecheck and pnpm build pass.
  • A Playwright script, kept outside the repo since the site has no e2e tests, ran 34 checks in Chromium against the built site. All 34 pass with this change. Against the live site, the same script fails 18 of them.
    • Three damaged links: ChatGPT's real one, a good link cut short, and random bytes.
    • On a 1280 × 800 window, the message sits at 456–552 px, on the first screen. On a 390 × 844 phone it starts at 502 px, with the button at 614 px.
    • Opening ChatGPT's .source.json from the damaged state built and played the quiz. The address then carried that source exactly, and a reload behaved as an ordinary link.
    • Typing a source into the box also removes the message.
    • A good link still builds at once. Changing the address from good to damaged and back switches the page both ways.
    • A source that names files still asks for them, and the landing page is unchanged.
  • Not run: Firefox and WebKit, whose Playwright browsers are not installed here.

Summary by cubic

Fixes the build page so a link whose source cannot be read now says the link arrived damaged and shows how to bring the source, instead of claiming it carried an activity over an empty box.

  • The hero and the source step say the link is damaged and give three ways in: ask the chat for the link again, open the .source.json file it gave, or paste the source.
  • The message stays until a source arrives by file or paste, after which the step turns done, Build works as before, and the page address carries that source.
  • The technical reason moves from the status under Build to the console.
  • Readable links, links whose source names files, and the landing page with no link are unchanged.

Closes #38.

Written for commit d5c11d1. Summary will update on new commits.

View guided diff Turn on auto-fix

…ource

A chat writes the link out in its reply, and a compressed source survives no wrong
character: a link ChatGPT gave held 43 characters of its own in place of 37. The page
then said the link had carried the source, over an empty box, with the reason under
Build, out of sight.

For a link whose source cannot be read, the hero now says the link arrived damaged,
and the ways to bring the source are above its box: ask the chat for the link again,
open the source file it gave, or paste the source. They go once a source is there.
The reason goes to the console.

Closes #38.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Tip: cubic could auto-approve low-risk PRs like this, if it thinks it's safe to merge. Learn more

View guided diff | Turn on auto-fix | Re-trigger cubic

@alekswebnet
alekswebnet merged commit 7278ba8 into main Nov 13, 2026
4 checks passed
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.

The build page: a link that arrives damaged is said to have carried its source

1 participant