Repository navigation
feat(sessions): add side chats in the session's side panel - #251
Merged
Merged
Conversation
A side chat is a full session forked from the parent's latest message,
in the same working folder. It opens as a tab in the parent's workspace
panel, is named `btw: <first message>`, and can be renamed, detached
into a regular forked session, or closed (which deletes it). Deleting a
session deletes its side chats.
Server:
- parent kind `side`; the branch route takes `kind: 'side'` without a
target message, adds a side chat note and answers open tool calls.
- `forkSession`, `removeSessions` and `setSessionParent` hold the fork,
delete and relation-rewrite logic. Deletes report side chats that
could not be removed separately (`sideChatFailures`).
- `GET /api/sessions/:id/side-chats` and `PATCH {detach: true}`. Detach
refuses a running side chat and blocks CLI starts while the relation
is rewritten (`SESSION_DETACHING`).
- side chats stay out of the session list, search and `ListSessions`,
except a session's own side chats in `ListSessions`.
- discarding a fork no longer removes the parent's worktree: only the
session that created a worktree (`worktreeOwnerSessionId`) removes it.
- repository sessions that already have messages are prewarmed again.
Desktop:
- `SessionConversation` is the conversation view shared by the main
session and side chat tabs; chat components take an explicit
`sessionId` instead of the active tab.
- CLI tasks are kept per session.
- side chat tabs: all connect, only the visible one prewarms; pages,
browser and file tabs a side chat opens go to the parent panel without
taking the active tab; Cmd+. stops the focused conversation.
- `RenameSessionDialog` is shared by the session header menu and the
side chat tab menu.
This was referenced Nov 14, 2026
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.
What this does
Adds side chats: ask about something without interrupting a session. A side chat is a full session forked from the session's latest message, in the same working folder, with the same tools. It opens as a tab in the session's side panel, is named
btw: <first message>, and can be renamed, detached into a regular forked session, or closed (which deletes it). Deleting a session deletes its side chats. The design is in docs/features/side-chat/tech-design.md.70 files, +3135 / −1101, no dependency or lockfile change.
Server
side.POST /api/sessions/:id/branchtakeskind: 'side'without a target message; the fork gets a side chat note, and open tool calls are answered with it.sessionLinksService:forkSession(branch route, StartSession fork and side chats),removeSessions(single delete, batch delete,discardSession) anddetachSideChat;sessionService.setSessionParentrewrites everysession-metathat carries a parent.sideChatFailuresfield. Detach refuses a running side chat (409). Starts are blocked while a session is being deleted or detached (SESSION_DELETED,SESSION_DETACHING).GET /api/sessions/:id/side-chats,PATCH /api/sessions/:id {detach: true}. The session list, search and board pickers leave side chats out;ListSessionsshows a session its own side chats so it can message them.btw: …title is set from the first user message, once, and never over a name the user gave.Desktop
SessionConversationis extracted fromActiveSessionand shared by the main view and side chat tabs. Chat components now take an explicitsessionId; the "fall back to the active tab" paths are gone.RenameSessionDialogis shared by the session header menu and the side chat tab menu.Fixes found on the way (both in the CHANGELOG)
repositoryrecord. Worktree records now carryworktreeOwnerSessionId, and only the creating session removes the worktree.Decisions worth reviewing
totalstays the file count, and the paging callers loop on it.Tests
Every behaviour change has a test that was run against the code with the change reverted and failed, then passed with it restored. Coverage is listed in the design doc's Tests section.
Gates from
.github/workflows/ci.yml, run locally on macOS with Bun 1.4.2:bun test: 2639 pass, 11 fail. The same 11 fail onmainon this machine (slash-command merging, ripgrep resolution, and the tests that load Claude Code agents and skills from the local environment).cd desktop && bun run lint: pass.cd desktop && bun run test -- --run: 227 files, 2827 pass, 4 skipped.bun test --randomize --seed=1on the touched server test files: pass apart from the same two slash-command tests.