Report Neko connection timeouts to parent frame - #362
Open
robertjamesprior wants to merge 4 commits into
Open
Conversation
robertjamesprior
marked this pull request as ready for review
September 2, 2026 15:24
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
sjmiller609
removed their request for review
September 3, 2026 15:04
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
iceTransportPolicy: relaywhen the dashboard passes a retry attemptLatest investigation
Test plan
bunx eslint src/neko/base.tsbun run buildGOCACHE=/tmp/go-build-cache go test ./lib/nekoclient ./cmd/api/apifromserverNote
Medium Risk
Changes WebRTC connection policy on retries and embed parent/child messaging for timeouts and remote control; mis-handled messages or relay-only retries could affect live-view connectivity, but scope is limited to the embedded client.
Overview
Improves embedded Neko live-view observability and recovery when WebRTC stalls, and lets the parent dashboard toggle input lock without reloading the iframe.
On connection timeout, the client now
postMessages aKERNEL_CONNECTION_TIMEOUTevent to the parent with ICE/peer/signaling/WebSocket state, the activeiceTransportPolicy, and summaries of recent local/remote ICE candidates (type, protocol, IPv4/IPv6). WhenkernelLiveViewAttemptis greater than zero, peer creation usesiceTransportPolicy: 'relay'so retries can take a TURN path instead of repeating the same direct ICE failure.Read-only behavior is centralized in
applyReadOnlyMode: URL params still apply at startup, but the parent can sendKERNEL_SET_READ_ONLYto override hosting lock, release control when enabling read-only, and restore implicit hosting when disabling it. The servergo.modreplace pin forkernel/neko/serveris bumped to match.Reviewed by Cursor Bugbot for commit b3ee84c. Bugbot is set up for automated code reviews on this repo. Configure here.