Skip to content

feat: strengthen browser surface protocol#40

Merged
glittercowboy merged 1 commit intomainfrom
codex/unified-web-surface-protocol
Apr 30, 2026
Merged

feat: strengthen browser surface protocol#40
glittercowboy merged 1 commit intomainfrom
codex/unified-web-surface-protocol

Conversation

@glittercowboy
Copy link
Copy Markdown
Contributor

@glittercowboy glittercowboy commented Apr 30, 2026

Summary

  • Add browser input frame/control metadata, acknowledgements, and transport status messages.
  • Add preview bridge access messages for local-direct and preview-origin browser flows.
  • Document browser input safety, transport status, and bridge access contracts.

Verification

  • go test ./...

Dependency Order

  • Merge and tag this protocol module before daemon and cloud-app consumer PRs.

Summary by CodeRabbit

  • New Features
    • New input acknowledgment system providing feedback on control requests with rejection reasons
    • Real-time transport status monitoring including queue depth, dropped frame counts, and performance metrics
    • Enhanced frame and viewport metadata tracking for improved rendering accuracy
    • Secure bridge access lifecycle with time-limited, grant-based authorization

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The pull request extends the browser shared-session protocol with new message types and enriches existing schemas. New message types include browserUserInputAck for input acknowledgement, browserTransportStatus for transport health metrics, and browserBridgeAccessOpen/Opened/Close for bridge access lifecycle management. Several existing message types (browserFrame, browserUserInput, browserControlClaim/Release) gain optional fields for frame references, viewport metadata, and coordinate/render information. The Go implementation is updated to parse these new message types and define corresponding structs.

Changes

Cohort / File(s) Summary
Protocol Documentation
PROTOCOL.md
Defines new message schemas (browserUserInputAck, browserTransportStatus, browserBridgeAccessOpen/Opened/Close) and extends existing messages (browserFrame, browserUserInput, control messages) with optional versioning, viewport, coordinate space, and rendered geometry metadata.
Message Envelope Parser
envelope.go
Adds five new cases to the payloadForType switch to unmarshal the new browser message types (...UserInputAck, ...TransportStatus, ...BridgeAccessOpen/Opened/Close) into their corresponding payload structs.
Message Type Definitions
messages.go
Introduces message type constants for new messages, adds owner/kind/coordinate-space/rejection-reason constants, and defines new structs (BrowserUserInputAck, BrowserTransportStatus, BrowserBridgeAccessOpen/Opened). Extends BrowserSessionOpen, BrowserFrame, BrowserControlClaim/Release, and BrowserUserInput with optional metadata fields; updates BrowserBridgeAccessClose to carry grant/preview identifiers and reason.
Test Coverage
messages_test.go
Expands TestEnvelopeRoundTrip to cover new message types and additional struct fields, including control versions, transport metrics, and rendered geometry. Adds TestBrowserUserInputMetadataJSONNames to verify marshaled JSON property names for BrowserUserInput metadata fields.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 New messages hop across the wire,
Input acks and status higher,
Bridge access opens, closes clean,
The finest protocol we've seen! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: strengthen browser surface protocol' accurately reflects the main changes: extending the browser protocol with new message types, metadata fields, and safety/transport contracts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/unified-web-surface-protocol

Review rate limit: 6/10 reviews remaining, refill in 21 minutes and 17 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@glittercowboy glittercowboy merged commit 1812fca into main Apr 30, 2026
1 of 2 checks passed
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