Skip to content

fix(ios): show new opencode sessions immediately - #177

Closed
snvtac wants to merge 1 commit into
0xSero:mainfrom
snvtac:snvtac/176-ios-new-session-thread-list
Closed

fix(ios): show new opencode sessions immediately#177
snvtac wants to merge 1 commit into
0xSero:mainfrom
snvtac:snvtac/176-ios-new-session-thread-list

Conversation

@snvtac

@snvtac snvtac commented Jun 25, 2026

Copy link
Copy Markdown

Fixes #176.

Summary

  • Open newly started iOS sessions immediately after thread/start reconciles the thread into the Rust store, matching the existing Sessions screen behavior and avoiding the ensureThreadLoaded retry path.
  • Preserve an explicit agent runtime selection even when no model override is selected, so runtime-only choices like opencode do not fall back to Codex.
  • Store the resolved runtime kind on the first thread/start snapshot before projecting session summaries, with focused coverage for opencode and the default Codex path.

Why

The reported iOS flow shows the host creating a thread and returning from thread/start, but the app does not surface the new session. The client already has enough local state after thread/start; waiting for thread/read/thread/list can leave the UI stuck, and dropping an opencode runtime selection makes the first projected session look like the default Codex runtime.

Validation

  • rustfmt --edition 2024 shared/rust-bridge/codex-mobile-client/src/store/reconcile.rs shared/rust-bridge/codex-mobile-client/src/ffi/client.rs
  • git diff --check
  • Attempted cargo test --manifest-path shared/rust-bridge/codex-mobile-client/Cargo.toml apply_thread_start_response_for_runtime_projects_session_summary --lib; blocked by the existing codex-slingshot compile error: no JsonRpcWire in the root from codex_app_server_client.

@0xSero 0xSero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This remains important, but it needs a current-main rebase before merge. Main already contains the immediate openConversation(resolvedKey) navigation behavior, which is the only conflict; please drop that duplicate hunk while retaining the no-model runtime-selection and first-snapshot runtime fixes.

Please also add Android parity. AppLaunchState.updateSelectedModel and launchConfig currently clear selectedAgentRuntimeKind when the model is empty, reproducing the same runtime-only fallback on Android.

After rebasing, add focused Android coverage and rerun the Rust test once the repository-wide codex-slingshot/JsonRpcWire incompatibility is repaired. A live iOS opencode thread should be created and shown/opened immediately without restart before acceptance.

@0xSero

0xSero commented Aug 4, 2026

Copy link
Copy Markdown
Owner

I preserved the still-relevant runtime-selection work in current-main replacement PR #211, added Android parity and focused iOS/Android/Rust coverage, and omitted the navigation hunk already present on main. Closing this conflicted branch as superseded by #211. Thank you for identifying the runtime-only fallback and first-snapshot ordering problem.

@0xSero 0xSero closed this Aug 4, 2026
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.

iOS: tapping "new session" creates the thread on the host but the Litter app shows nothing (no error, no new thread in the list)

2 participants