Skip to content

fix(play): a package too big for the chat's save is still built in the chat, and links open on a press (#100) - #101

Merged
alekswebnet merged 2 commits into
mainfrom
fix/play-save-in-chat
Nov 24, 2026
Merged

alekswebnet merged 2 commits into
mainfrom
fix/play-save-in-chat

Conversation

@alekswebnet

@alekswebnet alekswebnet commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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

In ChatGPT (the owner's run, 2026-11-24) a 230 MB Interactive Video could not be downloaded without leaving the chat: #98 refused a package bigger than the card saves and pointed to the build page, where the video has to be chosen again. And a press on "Open in the build page" opened nothing in the card. Both worked only from the browser's own menu on the link (right-click, "Open link in new tab").

What a person sees now

  • A package bigger than the chat saves: Download fetches the video and builds the package in the chat, as before play: Download saves nothing inside a chat's card; the card can save, so the page should hand it the file #98. Then the row under the stage says: "This .h5p is 235 MB, more than the chat saves with one press. To save it, right-click Download, or press and hold it, and open the link in a new tab."
  • The chat answers that it did not save: "The chat did not save it. To save it, right-click Download, or press and hold it, and open the link in a new tab."
  • "Open in the build page": opens on a press where the framing page opens links.
  • The row's own "Open in the build page" button is gone. The one in the bar stays.
  • A package the chat does save, and the page outside a chat: as before.

For the page that frames this one

Message Way What it does
{ type: 'opens' } to the page The framing page opens links itself. Optional.
{ type: 'open', href } from the page A link of the page was pressed: open this address. Sent only after opens, and only for a plain press; a press with a key held and the browser's own menu are left to the browser.
sizes beside links to the page No longer read. Only the refusal used it.

saves, save and saved are as in #98, but above max the page no longer refuses: it leaves the save to the browser and says the way above.

Checked

By hand, as this repository has no page tests: the built site served locally and framed by a page of another origin acting as a card, with a store on a third origin. "Sandboxed" is a frame with sandbox="allow-scripts allow-same-origin allow-forms", which lets the page save nothing and open no tab, as ChatGPT's card was found to.

Case Result
A quiz, max 64 MB, the card answers yes (light and dark at 720 px, light at 360 px; once sandboxed) "The chat is saving…", then "Saved…", then the row goes; the browser saves nothing
A quiz, the card first answers with another number, with no number, with no ok the row stays on saving until the real answer
A quiz, the card answers no (sandboxed; light at 720 px, dark at 360 px) the did-not-save row with the way to save it; Download stays a link to the package
A quiz above max the too-big row; no save; the browser saves water.h5p
The same, sandboxed the too-big row; nothing saved, as in a chat; Download is a link to the package
An Interactive Video from its address, above max needs-bytes, the package built with the video in it (6.3 MB), the too-big row; the browser saves it
The same, sandboxed (720 and 360 px) the same row; nothing saved; Download is a link to the package
An Interactive Video, max 64 MB saved by the card, as in #98
No saves the browser saves, no row: as before
opens, a press on "Open in the build page" (sandboxed) one open with /h5p/build/#source=…; no tab
No opens, the same press a tab opens, as before; sandboxed, nothing opens, as in a chat today

Not verified


Summary by cubic

Fixes the play page so a package too big for the chat to save is still built in the chat instead of sending the person back to the build page to re-choose a video, and so the page's links open on a press where the framing chat opens them itself.

  • Oversized packages stay ready behind Download as a plain link, with right-click or press-and-hold instructions where the frame saves nothing.
  • The row's "Open in the build page" button is removed; the one in the bar stays.
  • A framing page can send { type: 'opens' } to have pressed link addresses handed back as { type: 'open', href }; the browser keeps key-modified presses and its own menu.
  • The sizes field beside links is no longer read.

Written for commit 30a5a41. Summary will update on new commits.

View guided diff Turn on auto-fix

…t and kept behind Download, and a framing page that opens links is handed them (#100)

@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 3 files

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

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

Comment thread README.md Resolved
@alekswebnet
alekswebnet merged commit fa8948b 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: inside a chat, a package too big for the chat's save cannot be downloaded without leaving it, and links open nothing on a press

1 participant