Repository navigation
Refresh Cloud transcript bindings when chat reconnects - #18038
Closed
azooz2003-bit wants to merge 5 commits into
Closed
azooz2003-bit wants to merge 5 commits into
azooz2003-bit wants to merge 5 commits into
Conversation
|
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 configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
When a Cloud Agent Chat page reconnects, the server previously reused its cached transcript session without consulting the current terminal hook record. If the agent resumed in another pane or its transcript path moved, Focus Terminal targeted the old pane and the page could keep tailing the old file.
Subscriptions now re-resolve terminal sessions first, refresh changed terminal bindings, reattach changed transcript paths, and fall back to cached history when the hook store is temporarily unavailable.
Depends on #16069 and targets
fix/cloud-transcript-terminal-rebind.Validation
485660de8d3de3a416cf35a3afeba4c9f8f8c03c.7285635d7dbc0426b602f743d1225a3138a37e63.agent-chat,bun test/transcript-reconnect.test.ts: red before the fix because reconnect Focus Terminal usedOLD-SURFACE; green after the fix. Covers Claude and Codex, same-path binding refresh, changed transcript paths, new event delivery, and cached-history fallback during hook-store misses.bun run check: passed (typecheck, 28 scripts, 44 tests across 13 bun:test files).src/main.tsxandsrc/gallery-main.tsx: passed.git diff --check 25677e569383a99a9fd3a898328b19b85b069797..HEAD: passed.No live Cloud instance or browser validation.
Changelog
Fixed: Cloud Agent Chat reconnects now follow the agent's current terminal and transcript.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes Cloud Agent Chat reconnects so Focus Terminal and transcripts follow the agent's current terminal instead of a stale cached session. Previously the server reused its cached transcript session without consulting the terminal hook record; if the agent resumed in another pane or its transcript path moved, the page kept tailing the old file.
Subscriptions now re-resolve terminal sessions first, refresh changed terminal bindings, reattach changed transcript paths, and fall back to cached history only when the hook store is temporarily unavailable.
subscribehandler so the current hook record wins over the session cache.Depends on #16069.
Written for commit 7285635. Summary will update on new commits.
Migrated from #16070 after correcting the PR author identity. The original head commit 7285635 is preserved.