Document live view parent frame events - #611
Merged
Merged
Conversation
The embedded live view already posts connection and playback events to the parent window, but none of them were documented, so an embedder had no supported way to tell a working viewer from one that never starts. Documents the five outbound events and the one inbound event, the recommended health check gating on KERNEL_PLAYING, and the referrer requirement for read-only control. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
The event ships on all current images, but the capabilities field was
added alongside the read-only acknowledgement work; older active images
post only { type: 'KERNEL_CONNECTED', connected: true }.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Risk assessment: Very Low
Decision: No new approval. This automation already approved commit 329afae and the PR has not changed since.
Independent re-evaluation of the current diff:
- Scope: One file,
browsers/live-view.mdx(+59 / -0). Adds a Parent frame events section: outbound/inbound event tables, an origin/referrer note, and a TypeScript example that gates onKERNEL_PLAYING. - Codepaths / blast radius: Documentation-only. No application, API, config, CI, or infrastructure files change. The TypeScript block is example copy, not shipped runtime.
- Infrastructure / ops: None.
- Security / shared systems: None. This documents existing iframe
postMessageevents; it does not change auth, permissions, or runtime behavior. - CODEOWNERS: No CODEOWNERS file. The
mainbranch ruleset does not require code-owner review.
Risk is unchanged (Very Low). No approval to revoke.
Sent by Cursor Automation: Assign PR reviewers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
The embedded live view client already posts connection and playback events to the parent window, and accepts one message back, but none of them were documented. An embedder following the docs rendered the iframe and had no signal for success or failure — a viewer that never connects looks exactly like one that is still loading.
Adds a "Parent frame events" section to
browsers/live-view.mdxcovering:KERNEL_CONNECTED,KERNEL_PLAYING,KERNEL_PAUSED,KERNEL_CONNECTION_TIMEOUT,KERNEL_READ_ONLY_CHANGED) and the one accepted from it (KERNEL_SET_READ_ONLY), with their payloads.KERNEL_PLAYING, since it fires only once frames actually arrive, and remount the iframe if it hasn't arrived within a bounded window.KERNEL_CONNECTION_TIMEOUTis not sufficient on its own — the watchdog behind it is cleared once negotiation begins, so a connection that stalls after that point never emits it.document.referrer, so a restrictiveReferrer-Policyleaves the client unable to resolve the embedder's origin and causesKERNEL_SET_READ_ONLYto be rejected.Events, payloads and the origin behaviour were read off the image client rather than taken from an existing description. Availability is described as "a recent browser image" rather than naming image tags, since those aren't a documented surface.
Testing
mint broken-linkspasses locally, which is what CI runs.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only change to live view embedding guidance; no runtime or API behavior changes in this repository.
Overview
Adds a Parent frame events section to the live view docs so embedders can observe iframe
postMessagetraffic and drive read-only mode without reloading.The new content catalogs five outbound events (
KERNEL_CONNECTED,KERNEL_PLAYING,KERNEL_PAUSED,KERNEL_CONNECTION_TIMEOUT,KERNEL_READ_ONLY_CHANGED) and inboundKERNEL_SET_READ_ONLY, including payload shapes and which behaviors need a recent browser image vs. legacyKERNEL_CONNECTEDwithoutcapabilities.It also documents operational guidance: use
KERNEL_PLAYINGas the health signal (with a TypeScript remount/watchdog example), whyKERNEL_CONNECTION_TIMEOUTalone is insufficient after negotiation starts, and that parent origin trust depends ondocument.referrer(so strictReferrer-Policycan blockKERNEL_SET_READ_ONLY).Reviewed by Cursor Bugbot for commit 329afae. Bugbot is set up for automated code reviews on this repo. Configure here.