Repository navigation
Add contextual side conversations to Community Edition - #243
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b4d0c32e1
ℹ️ 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".
| # It is the first message, or the second behind an in-memory fallback summary. | ||
| for index, message in enumerate(messages[:2]): | ||
| if is_parent_background(message): | ||
| return message, [*messages[:index], *messages[index + 1 :]] |
There was a problem hiding this comment.
Find parent background after injected session blocks
When a side chat has both a user-identity block and a frozen-memory block, inject_session_blocks() prepends both before the parent background. During mid-turn compaction, _history_for_summary() therefore places the background at index 2, outside this search. The background then enters run_compaction() and gets persisted in the child's checkpoint; subsequent turns prepend the live parent context again, duplicating parent information and retaining stale facts after parent edits. Search past the session blocks rather than assuming the background occupies one of the first two positions, and cover the identity-plus-memory case in the split test.
Useful? React with 👍 / 👎.
| reopen: (sideId) => { | ||
| const side = findSideChat(sideId); | ||
| if (!side) return; | ||
| seedChatItem(side); | ||
| openTab(side); |
There was a problem hiding this comment.
Restore the initial quote when reopening an empty side chat
If someone creates a side chat from a selection, refreshes before sending its first message, and reopens it from the parent, the selected passage is no longer supplied with the question. open() initializes quotedFollowUp, but composer drafts are memory-only and this reopening path never restores it. The panel still displays the saved quote in its header, while streamSend sends no quoted_follow_up and the backend injects only the broader parent transcript, so questions such as “what does this mean?” lose their selected referent. Restore the saved quote for a genuinely empty side chat on reopening, or attach it server-side when admitting the first turn.
Useful? React with 👍 / 👎.
Purpose and behavior
Change walkthrough
src/frontend/src/components/chat/selection/messageSelectionActions.tsxandsrc/frontend/src/components/canvas/SideChatPanel.tsxcall the side-chat API.src/backend/api/routes/v1/side_chats.pydelegates ownership checks, creation and listing tosrc/backend/core/chat/side_chats.py. Migrationce_0050links child sessions to their parent, andsrc/backend/core/llm/context/parent_background.pyprovides background to the agent.src/backend/core/llm/context/workspace_hooks.pyrecords file candidates after each tool call. The internet-search MCP merges preferred-host and general results.Risk and compatibility
/v1/classifymust remove that call.Verification
git diff --cached --check, the Node 22 frontend production build, and 71 targeted Python tests covering side chats, workspace pins, batched search and subagents. Alembic reportsce_0050as its single head.Recovery
Review follow-up