Skip to content

Document the KERNEL_CONNECTION_FAILED live view event - #635

Draft
robertjamesprior wants to merge 2 commits into
mainfrom
hypeship/docs-live-view-connection-failed
Draft

robertjamesprior wants to merge 2 commits into
mainfrom
hypeship/docs-live-view-connection-failed

Conversation

@robertjamesprior

@robertjamesprior robertjamesprior commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The live view client posts KERNEL_CONNECTION_FAILED to the parent frame when a connect fails outright. Embedders build against the events table and the event is not in it.

  • adds the event to the parent-frame events table, version-gated so a missing event reads as unknown rather than as a successful start
  • documents the reason set both terminal events share — transport, signaling, media, peer, unsupported, server — so an embedder can branch on it instead of matching message text
  • handles the terminal events in the "detecting a viewer that never starts" sample
  • records that a failed connect posts one of the two terminal events, never both, and that the client does not retry a connect itself

The last point changes an already-documented event's contract, so it is worth a look on its own. KERNEL_CONNECTION_TIMEOUT was documented as a diagnostic to log alongside KERNEL_PLAYING; it now means the viewer will not start until the iframe reloads. The field list is unchanged, but reason is a stage name rather than connection timeout.

Dependency

Do not merge before the browser image carrying kernel/kernel-images#417 is generally available. Until then no image emits KERNEL_CONNECTION_FAILED, and no image emits a stage-named reason, so the version-gate note is the only thing keeping the table honest. #417 is a draft; re-verify the payload field lists and the reason set against the merged revision before merging.

Testing

Docs-only change to browsers/live-view.mdx. This checkout has no package.json or node_modules, so no local build or link check was run. The reason set and both field lists are read from the merged revision of #417.

The live view client posts KERNEL_CONNECTION_FAILED to the parent frame once it
has given up starting the viewer. Add it to the parent-frame events table,
version-gate it, handle it in the detection sample, and document that the client
retries transient failures internally so an embedder does not remount on top of
a retry the client is already running.
@mintlify

mintlify Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Kernel 🟢 Ready View Preview Sep 25, 2026, 9:23 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

The client reports a failed connect to the parent frame as a single terminal
event, and both terminal events now carry a machine-readable reason instead of
prose.

- add KERNEL_CONNECTION_FAILED to the parent-frame events table
- document the shared reason set -- transport, signaling, media, peer,
  unsupported, server -- so an embedder can branch on it without matching
  message text
- note that a failed connect posts one of the two terminal events, never both,
  and that the client does not retry a connect itself
- treat KERNEL_CONNECTION_TIMEOUT as terminal alongside it, and record the
  older reason string on images that predate the fix

Version-gated on the browser image carrying kernel/kernel-images#417.

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

Risk level: Very Low

This pull request only updates browsers/live-view.mdx (+22 / −2). It documents the KERNEL_CONNECTION_FAILED parent-frame event, the shared reason values, and how an embedder handles the terminal events in the existing sample. There is no application code, infrastructure, auth, permissions, or schema change, and the page is product documentation rather than model instructions.

Approving because the change is documentation-only and has not been approved yet.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

This branch was successfully deployed

1 active deployment
staging — cc978cb2 Deployed Sep 25, 2026 by mintlify[bot]
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.

1 participant