fix(app-builder): route sessions through cloud-agent-next#3021
Open
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
Open
fix(app-builder): route sessions through cloud-agent-next#3021kilo-code-bot[bot] wants to merge 1 commit intomainfrom
kilo-code-bot[bot] wants to merge 1 commit intomainfrom
Conversation
| const sessions = await getProjectSessions(projectId); | ||
|
|
||
| // Session state for the active session (populated below) | ||
| const legacyMessageEntries = await Promise.all( |
Contributor
Author
There was a problem hiding this comment.
WARNING: Legacy histories are loaded eagerly for every session
This pulls the full R2 message history for every legacy session on each getProject call, including collapsed/ended sessions the user may never open. Projects with several long legacy sessions can now allocate and return all histories at once, which risks high memory usage and slow page loads; consider loading only the active legacy session here and fetching ended-session history lazily when expanded.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (13 files)
Previous warning about eager legacy R2 history loading was resolved by lazy-loading ended legacy sessions. Reviewed by gpt-5.5-2026-04-23 · 925,809 tokens |
e510047 to
1a6067b
Compare
…etire v1 streaming - Default app_builder_project_sessions.worker_version to 'v2' and remove the PostHog feature-flag gate so every new project runs on cloud-agent-next. - Drop the v1 cloud-agent branches from the send/start/interrupt service paths; legacy v1 sessions are now read-only and the backend always upgrades to a fresh v2 session when the user sends a message. - Remove the prepareLegacySession tRPC endpoint and WebSocket streaming coordinator on the client. Ended v1 sessions load their R2 history lazily via a new getLegacySessionMessages tRPC query (fired from the ExpandableSessionBlock via loadMessages), so getProject no longer fans out N R2 reads on every project load. - Simplify v1 session plumbing: v1 messages.ts keeps only the helpers the upgrade path uses; streaming.ts destructures cloudAgentSessionId and drops the partial-message bookkeeping that was only meaningful while v1 had a live WebSocket.
1a6067b to
4f208a9
Compare
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.
Summary
prepareLegacySessionendpoints and set new App Builder session rows to default tov2.Verification
Visual Changes
N/A
Reviewer Notes