Share the cloud conversation runtime adapter - #945
Closed
Neonforge98 wants to merge 1 commit into
Closed
Conversation
This was referenced Aug 25, 2026
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The shared-session React hook owned cloud token refresh, initial plane reconstruction, incremental plane loading, hidden-runner access settings, live overlay registration, cleanup, and signal bumps. A Work Item conversation bridge would have to copy all of that plumbing, which is the main reason the earlier #844 implementation grew large.
Solution
Move those I/O boundaries into one imperative cloudConversationRuntime adapter and make the existing hook call it. The adapter remains a thin layer over #944 conversation continuation primitives; it does not own dispatch, terminal state, cursors, or audience routing. Initial context loading keeps the same bounded 60-row window, current-intent exclusion, local-root merge, and author attribution.
This is a behavior-preserving extraction. Team Chat remains outside the Agent conversation plane, and no cloud API, schema, or capability behavior changes.
Potential risks
The adapter updates the same Jotai atoms through the instrumented store instead of hook-local setters. Those atoms use the same store and notify the same subscribers. Token refresh now goes through the existing imperative getFreshCloudAccessToken helper, which performs the same compare-and-set auth update.
Verification