fix(chat): enable in-place subtask navigation in embedded session-chat iframe (#2138)

This commit is contained in:
Andrey Meshkov
2026-07-13 08:32:18 +03:00
committed by GitHub
parent 3362ebbfa3
commit 7888dd65b3
10 changed files with 316 additions and 26 deletions
@@ -53,6 +53,7 @@ import {
sendImplementationResponseToReviewer,
sendReviewFeedbackToOriginal,
} from '@/lib/reviewFlow';
import { isEmbeddedSessionChat } from '@/components/layout/contextPanelEmbeddedChat';
const CONTAIN_LAYOUT_STYLE = { contain: 'layout' as const, transform: 'translateZ(0)' };
@@ -252,7 +253,11 @@ const UserSubtaskPart: React.FC<{ part: SubtaskPartLike }> = ({ part }) => {
className="typography-meta text-muted-foreground hover:text-foreground transition-colors underline underline-offset-2"
onClick={() => {
if (!effectiveDirectory) return;
if (isMobile || isVSCodeRuntime()) {
// In contexts with no ContextPanel (embedded
// session-chat iframe) or single-surface layouts
// (mobile, VS Code), navigate in place. Otherwise
// open a new side-panel tab.
if (isEmbeddedSessionChat() || isMobile || isVSCodeRuntime()) {
setCurrentSession(taskSessionID, effectiveDirectory);
return;
}