GeezerVison is showing github.com — feat(id-native-shell): live WorldClient session loop feeding PresentedView (#788) by dezren39 · Pull Request #10536 · developing-today/code
Conversation
dezren39
commented
Nov 15, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What
Step 2 remainder for F13.6 (issue #788), following merged PR #10526: the live WorldClient session loop feeding the renderer, plus the live-host durable-outcome parity test.
session::run_session (exported as id_native_shell::run_session): sends the join frame, splits the client stream (reader in its own task — frame reads are not cancel-safe, the same split the CLI join pump uses), validates and folds every host frame into SessionState, publishes each new view on a channel, and routes outbound frames to the session world via route_frame (byte-identical to WorldClient::send_json on a with_world client). Ends on host close, a contract/host refusal, or outbound-channel close; returns the final state.
- Binary:
--node <id> --capability <cap> [--world <name>] [--addr <ip:port>] [--no-relay] (the id world join parameters) starts the session on a background thread; a Bevy system drains published views into PresentedView. Without a target the window opens session-less and the announce line says so. The outbound sender is held in a resource for the app lifetime; Bevy keyboard/clipboard capture wiring on top of the existing events mapping is follow-on presentation work.
tests/live_session.rs: serves a real host in-process (tic-tac-toe installed), plays one game through BOTH the native loop (ann: 0, 1, 2) and a terminal-style raw WorldClient (bo: 3, 4), then asserts on the host journal exported via the admin fixture recorder: inputs land as identical durable Input events at sequences 2-6 and the recorded records equal the live world records. Oracle is the journal, not either client.
- Hygiene in passing: the session test module gets the same unwrap/expect allow its sibling test modules already carry, so the crate clippy gate can pass for this crate.
Tests
cargo test -p id-native-shell — PASS: lib 21/21, live_session 1/1, parity 3/3, transcript 3/3 (nix develop shell).
cargo clippy -p id-native-shell --all-targets --no-deps — PASS, 0 errors.
cargo tree -p id | grep -ci bevy — 0: the default id build still pulls no Bevy (isolation rule holds; new deps are native-shell-only, dev-deps are test-only).
- Note: full-workspace
cargo clippy -p id-native-shell --all-targets (without --no-deps) currently fails in id-core (canonical_cbor.rs unwrap_used, 3 errors) on unmodified main code — pre-existing, untouched by this PR.
Issue #788 stays open: steps 3-4 (rich surfaces) remain conditional on the design Q1 decision.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
- New Features
- The native shell can now join a live world when provided with connection details, display updated views, and send input to the host.
- The app can also open without a live session, and reports its session status at startup.
- Connection options include world selection, direct addresses, and relay control. Invalid or incomplete options produce an error with usage guidance.
- Documentation
- Updated the running instructions with session connection options and no-session behavior.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…dView (#788)
Step 2 remainder: run_session joins a live host (split-stream reader task, contract-validated frames folded into SessionState, views published to the renderer, outbound frames routed to the session world), the binary wires it behind --node/--capability and drains views into PresentedView, and tests/live_session.rs proves durable-outcome parity against a live host (one tic-tac-toe game played through both the native loop and a terminal-style raw client; host journal as oracle).
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
❌ Failed 2026-11-15T19:16:19.186235Z We couldn’t complete this review. Comment @codex review to try again. |
9c59ee7 |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 15, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Caution
Review failed
The pull request is closed.
Walkthrough
-
The native shell adds optional host-session connection arguments and a session loop. It routes frames, processes host updates, and sends received views to the renderer. A live-host integration test checks alternating inputs and durable outcomes.
Changes: Native Shell Live Session
| Layer / File(s) |
Summary |
Session runner and public API pkgs/id/crates/id-native-shell/Cargo.toml, pkgs/id/crates/id-native-shell/src/session.rs, pkgs/id/crates/id-native-shell/src/lib.rs, pkgs/id/crates/id-native-shell/README.md |
Adds Tokio dependencies and the public run_session entry point. The runner sends a join frame, processes host frames, routes outbound frames, and publishes views. The README describes the session loop. |
Shell connection and view wiring pkgs/id/crates/id-native-shell/src/main.rs, pkgs/id/crates/id-native-shell/README.md |
Adds session argument parsing, host connection setup, a background session thread, and renderer view updates. Startup output distinguishes connected and disconnected operation. |
Live-host session validation pkgs/id/crates/id-native-shell/tests/live_session.rs, pkgs/id/crates/id-native-shell/tests/parity.rs |
Adds a live-host test that alternates inputs between native and terminal clients, then checks the resulting events and durable records. Updates parity-test documentation to distinguish its scope. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant NativeShell
participant parse_args
participant connect
participant WorldClient
participant Host
participant run_session
participant drain_session_views
participant PresentedView
NativeShell->>parse_args: Parse session options
NativeShell->>connect: Connect using parsed options
connect->>WorldClient: Establish host connection
NativeShell->>run_session: Start session with WorldClient
run_session->>WorldClient: Send routed join frame
WorldClient->>Host: Exchange session frames
Host->>WorldClient: Return host frames
WorldClient->>run_session: Provide host frames
run_session->>drain_session_views: Publish session views
drain_session_views->>PresentedView: Replace presented view
Loading
Merge Risk: Low · up to 9c59e
-
The new session loop works for the shipped binary's single-connection use. Edge cases remain for programmatic callers: cancelling a session leaves a background reader running, ending one session can close sibling sessions on a shared connection, and a stalled host write can delay error reporting. These are worth tightening but are unlikely to block merging.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning Some tools did not complete. Review the errors below.
Clippy (1.99.1)
-
Clippy execution timed out
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 15, 2026
This was referenced Nov 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|