feat(web): old Claude threads compact on send instead of stacking notices #16631
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 5 commits into
main fromrefs/pull/16631/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
juliusmarminge added labelsmacroscope-review
- apps/web/src/components/ChatView.tsx line 9162Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -9009,4 +8932,7 @@90098932 );90108933 const messageIdForSend = newMessageId();90118934 const messageCreatedAt = new Date().toISOString();9012- const shouldQueueBehindActiveRun = phase === "running" && dispatchMode === "queue";8935+ // A stale Claude session compacts before this message so the turn does not re-read the8936+ // old history. The message queues behind the /compact run, since steering into it is8937+ // rejected.8938+ const compactBeforeSend =apps/web/src/components/chat/ChatComposer.tsx line 7606Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -7555,3 +7568,4 @@75557568 onPreviousPendingQuestion={onPreviousActivePendingUserInputQuestion}75567569 onInterrupt={handleInterruptPrimaryAction}75577570 onImplementPlanInNewThread={handleImplementPlanInNewThreadPrimaryAction}7571+ compactBeforeSendTokens={props.resumeCompactionTokens}
- apps/web/src/components/chat/MessagesTimeline.tsx line 1003Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -988,5 +998,6 @@988998 [shouldRestoreVisibleContentPosition],989999 );9901000 const timelineListFooter = useMemo(991- () => <TimelineListFooter composerInset={anchoredEndSpace ? 0 : contentInsetEndAdjustment} />,992- [anchoredEndSpace, contentInsetEndAdjustment],1001+ () => (1002+ <TimelineListFooter composerInset={anchoredEndSpace ? 0 : contentInsetEndAdjustment}>1003+ {footer}apps/web/src/components/chat/ChatComposer.tsx line 3012OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -2998,4 +3006,7 @@29983006 projectSelectionRequired ||29993007 environmentUnavailable !== null ||30003008 (!composerSendState.hasSendableContent && !showResumeAction);3001- const collapsedComposerPrimaryActionLabel = showResumeAction ? "Resume thread" : "Send message";3009+ const collapsedComposerPrimaryActionLabel = showResumeAction3010+ ? "Resume thread"3011+ : props.resumeCompactionTokens !== null3012+ ? "Compact and send"apps/web/src/components/chat/MessagesTimeline.tsx line 1003Resolvedby t3dotgg(GitHub profile, opens in a new tab)@@ -988,5 +998,6 @@988998 [shouldRestoreVisibleContentPosition],989999 );9901000 const timelineListFooter = useMemo(991- () => <TimelineListFooter composerInset={anchoredEndSpace ? 0 : contentInsetEndAdjustment} />,992- [anchoredEndSpace, contentInsetEndAdjustment],1001+ () => (1002+ <TimelineListFooter composerInset={anchoredEndSpace ? 0 : contentInsetEndAdjustment}>1003+ {footer}
- apps/web/src/components/ChatView.tsx lines 9751 to 9752Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -9806,3 +9755,5 @@98069755 failure = turnAttachmentsResult;98079756 }980897579758+ if (failure === null && compactBeforeSend) {9759+ const compactResult = await startThreadTurn({
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.




macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed