diff --git a/src/main/services/team/TeamProvisioningService.ts b/src/main/services/team/TeamProvisioningService.ts index 3a15f284..53d94a0b 100644 --- a/src/main/services/team/TeamProvisioningService.ts +++ b/src/main/services/team/TeamProvisioningService.ts @@ -3154,9 +3154,14 @@ export class TeamProvisioningService { } } } else { - // Pre-ready: provisioning narration is shown in the ProvisioningProgressBlock banner - // (via provisioningOutputParts). Do NOT push to live cache to avoid duplicate display - // and leaking internal provisioning monologue into the Activity timeline. + // Pre-ready: keep showing provisioning narration in the banner, but also mirror it + // into the live cache so Messages/Activity can show the earliest assistant output. + if (!run.silentUserDmForward && !hasCapturedSendMessage) { + const cleanText = stripAgentBlocks(text).trim(); + if (cleanText.length > 0) { + this.pushLiveLeadTextMessage(run, cleanText); + } + } } } diff --git a/src/renderer/components/team/TeamDetailView.tsx b/src/renderer/components/team/TeamDetailView.tsx index 44814acf..a5f13521 100644 --- a/src/renderer/components/team/TeamDetailView.tsx +++ b/src/renderer/components/team/TeamDetailView.tsx @@ -1606,6 +1606,7 @@ export const TeamDetailView = ({ teamName }: TeamDetailViewProps): React.JSX.Ele expandOverrides={expandedSet} onToggleExpandOverride={toggleExpandOverride} teamSessionIds={teamSessionIds} + currentLeadSessionId={data?.config.leadSessionId} onMemberClick={setSelectedMember} onCreateTaskFromMessage={(subject, description) => { openCreateTaskDialog(subject, description); diff --git a/src/renderer/components/team/activity/ActivityTimeline.tsx b/src/renderer/components/team/activity/ActivityTimeline.tsx index 4089bba5..49e3abb1 100644 --- a/src/renderer/components/team/activity/ActivityTimeline.tsx +++ b/src/renderer/components/team/activity/ActivityTimeline.tsx @@ -44,10 +44,12 @@ interface ActivityTimelineProps { onToggleExpandOverride?: (key: string) => void; /** * All session IDs belonging to this team (current + history). - * When two adjacent messages have different leadSessionId but both are in this set, - * the "New session" separator is suppressed (it's a reconnect, not a new session). + * Used together with currentLeadSessionId to suppress only the reconnect boundary + * from the current live session back into the team's previous session history. */ teamSessionIds?: Set; + /** Current lead session ID for the active team, if known. */ + currentLeadSessionId?: string; } const VIEWPORT_THRESHOLD = 0.15; @@ -155,6 +157,7 @@ export const ActivityTimeline = ({ expandOverrides, onToggleExpandOverride, teamSessionIds, + currentLeadSessionId, }: ActivityTimelineProps): React.JSX.Element => { const [visibleCount, setVisibleCount] = useState(MESSAGES_PAGE_SIZE); @@ -361,13 +364,15 @@ export const ActivityTimeline = ({ const prevSessionId = getItemSessionId(timelineItems[realIndex - 1]); const currSessionId = getItemSessionId(item); if (prevSessionId && currSessionId && prevSessionId !== currSessionId) { - // Suppress separator when both sessions belong to the same team - // (reconnects produce new session IDs but are not "new sessions" from user's perspective) - const isSameTeam = + // Suppress only the boundary between the current live session and the team's + // older session history. Older historical session boundaries should still render. + const isReconnectBoundary = + !!currentLeadSessionId && teamSessionIds && teamSessionIds.has(prevSessionId) && - teamSessionIds.has(currSessionId); - if (!isSameTeam) { + teamSessionIds.has(currSessionId) && + (prevSessionId === currentLeadSessionId || currSessionId === currentLeadSessionId); + if (!isReconnectBoundary) { sessionSeparator = (
0 && trimmed.length <= MAX_TEXT_LENGTH && !sending && - !isProvisioning && !attachmentsBlocked; // Track whether we initiated a send — clear draft only on confirmed success @@ -345,7 +344,7 @@ export const MessageComposer = ({
{isProvisioning ? ( - Launching... + Launching... inbox delivery only ) : !isTeamAlive ? ( @@ -462,7 +461,7 @@ export const MessageComposer = ({ id={`compose-${teamName}`} placeholder={ isProvisioning - ? 'Team is launching... Please wait.' + ? 'Team is launching... message will be queued for inbox delivery.' : 'Write a message... (Enter to send, Shift+Enter for new line)' } value={draft.text} @@ -476,7 +475,7 @@ export const MessageComposer = ({ minRows={2} maxRows={6} maxLength={MAX_TEXT_LENGTH} - disabled={sending || isProvisioning} + disabled={sending} cornerAction={
{/* NOTE: ContextRing disabled — usage formula is inaccurate */}