Skip to content

feat(verify): a Download button on the preview page - #82

Merged
alekswebnet merged 1 commit into
mainfrom
feat/verify-preview-download
Oct 26, 2026
Merged

alekswebnet merged 1 commit into
mainfrom
feat/verify-preview-download

Conversation

@alekswebnet

Copy link
Copy Markdown
Contributor

Closes #81.

h5p-verify --preview showed the package's name and nothing to take the file away with. Whoever reviewed a package there had to find the folder the command ran in, and in the h5p-author skill's flow an agent chose that folder. The preview's bar now has a Download button beside the name. One click saves the .h5p under its own name, and the content plays as before.

Changes

  • lib/preview.html: a Download link in the bar.
    • Its address is the one the page already parsed and checked for the player's src: http or https only, from the parsed URL's href (A package address reaches src as text, and CodeQL files the same alerts after every change #71), never the settings text.
    • It hides once the presence stream fails, when the page says the preview has ended, because the server it downloads from has gone.
    • It's styled with system colours, as the rest of the page is, and aria-describedby names the file.
  • tests/preview.test.ts: a browser clicks Download and compares the saved file with the package byte for byte. It then ends the preview and waits for the link to go.
  • Docs: the verifier's README, docs/verify.md and the --preview entry in AGENTS.md. The skills are left alone until the release, because they're installed from main.

Testing

  • The verifier's suite: 24 of 24 in Google Chrome, which the verifier picks when it's installed, and typecheck passes.
  • The new test on the old page: times out waiting for a download, so it fails there and passes here.
  • Played by hand with a German Question Set built by the h5p-author skill:
    • The bar looks right in light and dark mode at 1100 px, and wraps under the name at 390 px.
    • Download is the first Tab stop.

Not verified: Firefox and Safari's download handling, and Windows.

Release

A minor for @missing-elements/h5p-verify: 1.3.0. Nothing else changes. Once it's on npm, the h5p-verify and h5p-author skills can tell the reviewer about the button.

🤖 Generated with Claude Code

The preview showed the package's name and nothing to take the file away with, so whoever
reviewed a package there had to find the folder the command ran in; in the h5p-author skill's
flow, an agent chose it. The bar now has a Download button beside the name, which saves the .h5p
under its own name.

The link takes the address the page already parsed and checked for the player's src, http or
https only, from the parsed URL's href (#71). It hides once the presence stream fails, when the
page says the preview has ended, since the server it downloads from has gone. A test clicks it in
a browser and compares the saved file with the package byte for byte, then ends the preview and
waits for the link to go: it times out on the old page, and passes.

Closes #81.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alekswebnet
alekswebnet merged commit ef3fa69 into main Oct 26, 2026
7 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.

h5p-verify --preview: a Download button for the package

1 participant