Skip to content

fix(play): a framing page can say that a file did not come, and the page asks the person for it (#106) - #107

Merged
alekswebnet merged 2 commits into
mainfrom
fix/play-file-failed
Nov 24, 2026
Merged

alekswebnet merged 2 commits into
mainfrom
fix/play-file-failed

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #106. Part of missing-elements/h5p-toolkit#210.

Where a card cannot bring a file the page asked it for, the page waited on with nothing said. The app server's card now says so (h5p-toolkit#271), and the page takes it.

What a person sees now

  • Download, and the video does not come from the chat: the row under the stage says "Your video could not be fetched from the chat: its address may have run out. Choose it from your computer instead.", its bar goes, and Download reads "Try again". The activity plays on.
  • A file the activity cannot be built without does not come: the page's own "Add your video", saying "Your video could not be fetched from the chat. Choose it from your computer; it stays in your browser."

For the page that frames this one

Message Way What it does
{ type: 'failed', name } to the page A file the page asked for did not come. Optional. At any other time than the two above it does nothing.

The row's words are those the page already has for a file it fetches itself, in a tab of its own: one function says both now.

Checked

By hand, as this repository has no page tests: the built site served locally, framed by a page of another origin acting as a card, its frame sandboxed.

Case Result
Download, the card sends progress and then failed (light at 720 px, dark at 360 px) the row counts ("400 kB of 2.0 MB"), then the row above, "Try again"; the activity stays ready
The file needed to build, the card sends progress and then failed (light at 720 px, dark at 360 px) the loader with its count, then "Add your video" with the reason
The cases of #98, #100, #102 and #104, and the six card behaviours of #93 and #95 unchanged
  • No page error in any run. npm run build passes. Screenshots of both views looked at.

Not verified

  • Not in ChatGPT: its file store has not refused a file in a run, so this was only made to happen in the stand-in.
  • Chromium only.

Summary by cubic

Handles a failed message from a framing page so the play page no longer waits silently when a file it asked for did not come. For a download, the row under the stage explains and shows "Try again"; for a file needed to build the activity, the page asks the person to choose it from their computer, noting it stays in their browser. Both apply whether or not any of the file came first, and even when the question is shown already.

Written for commit 611edcd. Summary will update on new commits.

View guided diff Turn on auto-fix

@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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

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

Comment thread src/h5p/play/play-page.ts Resolved
@alekswebnet
alekswebnet merged commit 9771190 into main Nov 24, 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.

play: a framing page can say that a file did not come, and the page then asks the person for it

1 participant