Skip to content

Add browser refs and command input protocol#42

Merged
glittercowboy merged 2 commits intomainfrom
codex/browser-refs-protocol
May 1, 2026
Merged

Add browser refs and command input protocol#42
glittercowboy merged 2 commits intomainfrom
codex/browser-refs-protocol

Conversation

@glittercowboy
Copy link
Copy Markdown
Contributor

@glittercowboy glittercowboy commented May 1, 2026

Summary

  • Adds browserRefs relay payloads for rendered ref overlays.
  • Adds browser user input kind constants for navigation, history, reload, ref actions, viewport, and device commands.
  • Documents the browserRefs message and validates decoding behavior.

Verification

  • go test ./...

Downstream

  • Daemon and cloud-app consume this module version for browser refs and command input kinds.

Summary by CodeRabbit

New Features

  • Added capability to capture and track visible interactive browser references, including their position and size information
  • Expanded browser input actions to include navigation controls (back, forward, reload), viewport and device configuration, and interactive element reference actions

Tests

  • Added comprehensive test coverage for the new browser references feature, validating serialization and compatibility

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cc1ac932-adac-4e1a-bde2-a936e6d08ec8

📥 Commits

Reviewing files that changed from the base of the PR and between a4328b6 and aee1274.

📒 Files selected for processing (4)
  • PROTOCOL.md
  • envelope.go
  • messages.go
  • messages_test.go

📝 Walkthrough

Walkthrough

This PR adds a new browserRefs protocol message type enabling daemons to transmit visible interactive browser element references with positional metadata to browsers, along with several new browser input kind constants. It includes protocol documentation, Go type definitions, envelope handling, and comprehensive test coverage.

Changes

Cohort / File(s) Summary
Protocol Documentation
PROTOCOL.md
Adds browserRefs message type specification to the Visual State protocol with fields for browser/session/channel identifiers, version, refs array with positional data, and timestamp.
Message Type Implementation
envelope.go, messages.go
Implements MsgTypeBrowserRefs constant, defines BrowserRefs and BrowserRef structs, adds message type routing in envelope's payload switch, and introduces new BrowserInputKind* constants for navigation, viewport, and device emulation actions.
Test Coverage
messages_test.go
Adds round-trip serialization tests, JSON validation (rejecting invalid refs type), and compatibility verification for unknown fields in browserRefs messages.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A protocol grows with every hop,
New browserRefs dance—they'll never stop!
Refs captured, positioned, and versioned with care,
Browser interactivity blooming everywhere! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add browser refs and command input protocol' accurately reflects the main changes: introduction of browserRefs message type and new browser input kind constants for commands.
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/browser-refs-protocol

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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

@glittercowboy glittercowboy merged commit 1e13e98 into main May 1, 2026
2 checks passed
@glittercowboy glittercowboy deleted the codex/browser-refs-protocol branch May 1, 2026 14:01
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