GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@dezren39 dezren39 commented Nov 15, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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
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.

All reactions
repo-worker-tmp-code-b
feat(id-native-shell): live WorldClient session loop feeding Presente…
9c59ee7
…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).
@dezren39
dezren39 requested a review from a team as a code owner November 15, 2026 19:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Explain Change →

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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit f417286 into main Nov 15, 2026
1 check failed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/9341-788-live-session branch November 15, 2026 19:19
This was referenced Nov 15, 2026
id: Phase 13 F13.6 native client shells on the shell contract #788
Closed
main-broken: developing-today/code id @1920f34 — basic: nix flake check (biome-check) #8904
Closed
id(id-native-shell): run_session retains every durable event for the whole session — unbounded memory growth in a long-lived shell, and nothing reads it #10613
Closed
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
This was referenced Nov 24, 2026
Audit programme: seven-lane review of PRs, issues and designs (2026-11-23) #13871
Open
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

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.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.