fix(cloudmatch): preserve session-stable appLaunchMode in resume - #599
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38febbfe60
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ...resolveResumeIdentity(candidate.sessionId), | ||
| recoveryMode: true, | ||
| appId: resolveSessionClaimAppId(candidate), | ||
| appLaunchMode: candidate.appLaunchMode, |
There was a problem hiding this comment.
Carry appLaunchMode through persisted recovery fallback
When recovery falls back to runtimeSnapshotRef.current.resumeContext because the active-session list has no ready candidate, that synthetic candidate is built from persisted fields that do not include appLaunchMode (runtimeSnapshot.ts only stores session/server/app identity). In that transient-list-miss recovery path, this new argument is always undefined, so claimSession falls back to the current UI-derived settings and can still renegotiate a gamepad/touch-created session back to default. Persist/carry the session's wire mode, or recover it from the session GET, before claiming from this fallback.
Useful? React with 👍 / 👎.
…table recovery claims Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…nCloudGaming#599) * Pass session-stable appLaunchMode in claim/resume requests Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Persist session appLaunchMode through snapshots and poll merges for stable recovery claims Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
| This PR fixes resume instability caused by renegotiating the immutable
appLaunchModeparameter. Claim requests now send the wire value echoed by the server when the session was created, instead of the live UIsettings.appLaunchModetoggle.Types & Data Flow
opennow-stable/src/shared/gfn.ts- AddedappLaunchMode?: numbertoActiveSessionInfoandSessionClaimRequestopennow-stable/src/main/gfn/types.ts- TypedsessionRequestData.appLaunchModeinSessionEntryCloudMatch Payloads
opennow-stable/src/main/gfn/cloudmatch.ts-getActiveSessionsparses and returnsappLaunchModefrom the/v2/sessionlist responseopennow-stable/src/main/gfn/cloudmatch.ts-buildClaimRequestBodyaccepts an optionalsessionAppLaunchModeoverriding the default settings-derived valueopennow-stable/src/main/gfn/cloudmatch.ts-claimSessionthreadsinput.appLaunchModeintobuildClaimRequestBodyCall Sites
opennow-stable/src/renderer/src/App.tsx- PassexistingSession.appLaunchMode/candidate.appLaunchModetoclaimSessionin resume and recovery pathsopennow-stable/src/main/ipc/sessionHandlers.ts- PassreadyCandidate.appLaunchModetoclaimSessionin the create-session fallback pathTests
opennow-stable/src/main/gfn/cloudmatch.test.ts- Added regression test asserting claim payload uses session-stableappLaunchModeover live settingsNote
Medium Risk
Touches all session resume/claim paths for GFN CloudMatch; behavior change is narrow but session connectivity is user-critical if the echoed value is missing or wrong.
Overview
Resume/claim no longer renegotiates
appLaunchModefrom the live stream settings toggle, which was causing CloudMatch resume failures when the UI mode differed from the session the server created.Active-session listing now captures the wire
appLaunchModeechoed insessionRequestDataand exposes it onActiveSessionInfo. Claim PUT payloads prefer that session-stable value inbuildClaimRequestBody, with a fallback to settings-derived wire values when it is missing. Renderer resume/recovery and main-process create-session claim paths passappLaunchModethrough toclaimSession. A regression test asserts the claim body keeps the original mode even when current settings say default.Reviewed by Cursor Bugbot for commit 38febbf. Configure here.