fix(ui): show embedded subagent history while visibility stays inactive
Busy context-panel session chats could render only the working-status row when the iframe booted inactive or lost its visibility handshake, because message reads shared the composer/background-work gate. Keep message subscriptions enabled in the mounted session-chat panel so materialized history remains visible (#2903, #2892). Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
committed by
Cursor Agent
co-authored by
Serhii Dziupin
parent
1060ad1913
commit
903638db94
@@ -5,17 +5,29 @@ import { useSessionUIStore } from '@/sync/session-ui-store';
|
||||
|
||||
type ChatViewProps = {
|
||||
active?: boolean;
|
||||
/**
|
||||
* Controls message-history subscription independently of `active`.
|
||||
* Embedded session-chat panels keep this true so history stays visible
|
||||
* while composer focus / background work remain gated by visibility.
|
||||
*/
|
||||
messagesEnabled?: boolean;
|
||||
readOnly?: boolean;
|
||||
initialAllowPromptingSubagentSessions?: boolean;
|
||||
};
|
||||
|
||||
export const ChatView: React.FC<ChatViewProps> = ({ active = true, readOnly = false, initialAllowPromptingSubagentSessions }) => {
|
||||
export const ChatView: React.FC<ChatViewProps> = ({
|
||||
active = true,
|
||||
messagesEnabled,
|
||||
readOnly = false,
|
||||
initialAllowPromptingSubagentSessions,
|
||||
}) => {
|
||||
const currentSessionId = useSessionUIStore((state) => state.currentSessionId);
|
||||
|
||||
return (
|
||||
<ChatErrorBoundary sessionId={currentSessionId || undefined}>
|
||||
<ChatContainer
|
||||
active={active}
|
||||
messagesEnabled={messagesEnabled}
|
||||
readOnly={readOnly}
|
||||
initialAllowPromptingSubagentSessions={initialAllowPromptingSubagentSessions}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user