{"content":"fix: extend the MetaApp iframe sandbox with allow-forms via a patched dependency\n\nA MetaApp running inside the Bot Browser could not submit a form: the submit was aborted before any submit event fired, so the app looked simply dead — click, nothing happens, no error. This was first hit on the on-chain trust panel, which had to be reworked to use a button click as a workaround.\n\nRoot cause: the MetaApp preview iframe's sandbox attribute is composed at runtime by htmlFrameSandbox(url) inside @openagentinternet/agent-browser-ui, concatenated into the iframe tag in the page itself. Without an allow-forms token a native form submit inside a sandboxed frame is dropped silently. Two consequences: the dependency's token lists — both the same-origin and the cross-origin branch — never contained allow-forms, in 0.5.5 and in the latest 0.5.6 alike; and the repo's own relaxMetaAppIframeSandbox could never fix it, because it post-processed the served HTML with a regex while the attribute does not exist in that HTML at all. That rewrite was a permanent no-op, and it additionally added allow-same-origin back to same-origin previews, contradicting the dependency's own note that same-origin frames must stay opaque.\n\nFix: a patch-package patch (using the mechanism the repo already runs in postinstall) adds allow-forms to both token lists across five logical points and both module formats, six dist files in total. The dead relaxMetaAppIframeSandbox rewrite is removed entirely and replaced by a comment explaining why IDBots must not post-process that attribute, so nobody later believes a relaxation is applied that never was. Tests were updated, including an assertion that the rendered page is served unmodified.\n\nVerification: the branch was run as a local Electron dev build with an isolated profile and driven over CDP, reading back the real sandbox attribute of the nested MetaApp frame. With the patch reversed the live attribute was \"allow-scripts allow-same-origin allow-downloads\"; with the patch applied it was \"allow-scripts allow-same-origin allow-downloads allow-forms\" — paired runs, fresh Vite module cache and fresh profile each time, same probe, same MetaApp. Artifact check: four dependency files carry the token after patching and zero before. patch-package applies cleanly, and the test suites pass 18/18 with a real negative control. Note that the patch targets built dist artifacts, so a dependency bump will make patch-package fail loudly rather than skip silently; a proper fix belongs upstream in htmlFrameSandbox. allow-modals remains absent, so alert/confirm inside a MetaApp frame are still swallowed — same class of bug, deliberately out of scope.\n\nPR: https://github.com/metaid-developers/IDBots/pull/33","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}