Skip to content

Add WebSocket bridge for Jump with multi-device support#92

Open
shanerbaner82 wants to merge 3 commits intomainfrom
jump-multi-device
Open

Add WebSocket bridge for Jump with multi-device support#92
shanerbaner82 wants to merge 3 commits intomainfrom
jump-multi-device

Conversation

@shanerbaner82
Copy link
Copy Markdown
Contributor

Summary

  • Adds a Workerman-based WebSocket + TCP bridge server (websocket-server.php) so Jump can send real-time reload events and bridge calls to connected devices
  • Supports multiple simultaneous device connections — both iOS and Android devices receive pings, reloads, and bridge calls concurrently (previously only the last device to connect got updates)
  • Adds JumpBridge PHP client for device RPC via length-prefixed TCP framing
  • Refactors JumpCommand to manage WS/bridge server lifecycle, port discovery, and Vite asset proxying
  • Updates router.php to read Vite dev server port/host from the hot file

Test plan

  • Run php artisan native:jump and connect a single device — verify reload on file change
  • Connect both an iOS and Android device simultaneously — verify both receive reload events
  • Disconnect one device — verify the other continues receiving updates
  • Trigger a bridge call — verify it reaches connected devices
  • Verify Vite hot-reload asset proxying works when a Vite dev server is running

🤖 Generated with Claude Code

Replace the single-device connection model with a connection pool so
multiple iOS/Android devices can connect to the same Jump instance
simultaneously and all receive real-time reloads, keepalive pings,
and bridge calls.

- Add websocket-server.php (Workerman-based WS + TCP bridge server)
- Add JumpBridge.php client for PHP-to-device RPC via length-prefixed TCP
- Add jump_bridge_functions.php (nativephp_call helper)
- Refactor JumpCommand to start WS bridge, discover ports, proxy Vite assets
- Update router.php to read Vite dev server config from hot file
- Register bridge service provider bindings in NativeServiceProvider

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shanerbaner82 shanerbaner82 requested a review from simonhamp April 11, 2026 16:43
shanerbaner82 and others added 2 commits April 13, 2026 15:57
- Change QR code data from JSON to jump:// deep link URL so scanning
  with the native camera app opens Jump and auto-connects
- Render QR code directly in the terminal using Unicode block characters,
  eliminating the need to open a browser

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add /jump/open endpoint that redirects browser to jump:// deep link
  (fallback for Android camera which only opens http:// URLs)
- Update terminal QR instructions for iOS (Camera or Jump app) and
  Android (Jump app only)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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