safe-content-frame: shim initialization errors leave the failed frame mounted
Problem
An authenticated shim initialization error received through the window-message path rejects frame loading but leaves the iframe and its listeners mounted until the host itself unmounts.
Reproduction
Mount a sandbox host, let its iframe emit the authenticated error initialization message, catch the rejected load promise, and inspect the host. The failed iframe remains attached.
Root cause
The MessagePort error path reports the error and runs frame cleanup. The equivalent window-message error path only reports the error. The React host reports that rejection but does not own enough initialized state to dispose the failed frame afterward.
Proposed fix
Make the authenticated window-message error path perform the same idempotent cleanup as the port-message path while preserving the original load rejection.
Verification
Add frame-level and React host regressions proving the rejection is reported and the failed iframe and listeners are removed without requiring an explicit later dispose call.
Source: assistant-ui/assistant-ui