GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): Claude thinking shown as a reply can no longer be quoted by Project516 · Pull Request #27934 · pingdotgg/t3code

fix(web): Claude thinking shown as a reply can no longer be quoted #27934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Project516 wants to merge 9 commits into pingdotgg:main
base: main
Loading
Loading
from Project516:p516/fix-issue-26789
+54 −3
Open

fix(web): Claude thinking shown as a reply can no longer be quoted #27934

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
9 commits
Select commit Hold shift + click to select a range
7bf002f
fix(web): Claude thinking shown as a reply can no longer be quoted
Project516 Nov 10, 2026
c710f94
Merge remote-tracking branch 'github/main' into pr-27934
maria-rcks Nov 11, 2026
77a39f7
Merge branch 'main' into p516/fix-issue-26789
Project516 Nov 11, 2026
240ddf3
Merge branch 'main' into p516/fix-issue-26789
Project516 Nov 11, 2026
b2e4437
Merge remote-tracking branch 'origin/main' into p516/fix-issue-26789
juliusmarminge Nov 14, 2026
8bf8a30
fix(web): hide Reply to this response on Claude thinking shown as a r…
juliusmarminge Nov 14, 2026
ffb9f3d
Merge remote-tracking branch 'upstream/main' into p516/fix-issue-26789
Project516 Nov 16, 2026
2cd0c0b
fix(web): sent messages stay quotable
Project516 Nov 16, 2026
7d60000
Merge remote-tracking branch 'upstream/main' into p516/fix-issue-26789
Project516 Nov 26, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

3 changes: 3 additions & 0 deletions 3 apps/web/src/components/chat/AssistantCitationSource.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,15 @@ export function AssistantCitationSource({
itemKey,
request,
listRef,
quotable,
children,
}: {
messageId: MessageId;
threadRef?: ScopedThreadRef;
itemKey: string;
request: AssistantCitationTarget | null;
listRef: RefObject<LegendListRef | null>;
quotable: boolean;
children: ReactNode;
}) {
const rootRef = useRef<HTMLDivElement>(null);
Expand All @@ -374,6 +376,7 @@ export function AssistantCitationSource({
data-assistant-citation-source={messageId}
data-assistant-citation-environment={threadRef?.environmentId}
data-assistant-citation-thread={threadRef?.threadId}
data-assistant-citation-quotable={quotable}
>
{children}
</div>
Expand Down
15 changes: 15 additions & 0 deletions 15 apps/web/src/components/chat/MessagesTimeline.logic.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
timelineTurnFoldRunIdsByEntryId,
liveAnswerPreview,
deriveMessagesTimelineRowsWithState,
isQuotableAssistantMessage,
isTimelineMinimapTurnVisible,
resolveAssistantMessageCopyState,
resolveTimelineMinimapHitStrip,
Expand Down Expand Up @@ -74,6 +75,20 @@ describe("resolveAssistantMessageCopyState", () => {
});
});

describe("isQuotableAssistantMessage", () => {
it("does not offer quotes on Claude thinking shown as a reply", () => {
const ref = (driver: string, nativeId: string) => ({
driver: ProviderDriverKind.make(driver),
nativeId,
strength: "strong" as const,
});
expect(isQuotableAssistantMessage(ref("claudeAgent", "msg_01:thinking:1"))).toBe(false);
expect(isQuotableAssistantMessage(ref("claudeAgent", "6b1f0c2e-uuid"))).toBe(true);
expect(isQuotableAssistantMessage(ref("codex", "msg_01:thinking:1"))).toBe(true);
expect(isQuotableAssistantMessage(null)).toBe(true);
});
});

describe("deriveMessagesTimelineRows", () => {
it.each([
["html-render", "reply-run", true],
Expand Down
11 changes: 11 additions & 0 deletions 11 apps/web/src/components/chat/MessagesTimeline.logic.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import {
type OrchestrationV2IdleCompaction,
type WorktreeSetupSnapshot,
type OrchestrationV2ProjectedTurnItem,
type OrchestrationV2ProviderRef,
type RunAttemptId,
type RuntimeRequestId,
RunId,
Expand Down Expand Up @@ -734,6 +735,16 @@ export function resolveAssistantMessageCopyState({
};
}

// Claude 5.1+ shows a thinking block before a tool call as a reply. It is still reasoning,
// which no provider lets users quote, and quoting it trips Claude's reasoning_extraction refusal.
export function isQuotableAssistantMessage(
nativeItemRef: OrchestrationV2ProviderRef | null | undefined,
) {
return !(
nativeItemRef?.driver === "claudeAgent" && /:thinking:\d+$/u.test(nativeItemRef.nativeId ?? "")
);
}

function deriveTerminalAssistantMessageIds(timelineEntries: ReadonlyArray<TimelineEntry>) {
const lastAssistantMessageIdByResponseKey = new Map<string, string>();
let nullTurnResponseIndex = 0;
Expand Down
11 changes: 9 additions & 2 deletions 11 apps/web/src/components/chat/TimelineAssistantRows.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import { McpAppFrame } from "./McpAppFrame";
import { readResponseSubagents, useAssistantMessageText } from "../../state/entities";
import { MessageCopyButton } from "./MessageCopyButton";
import { AssistantCitationSource } from "./AssistantCitationSource";
import { resolveAssistantMessageCopyState } from "./MessagesTimeline.logic";
import {
isQuotableAssistantMessage,
resolveAssistantMessageCopyState,
} from "./MessagesTimeline.logic";
import { cn } from "~/lib/utils";
import { formatChatTimestampTooltip, formatDayAwareTimestamp } from "../../timestampFormat";
import { readThreadTurnItems } from "../../state/entities";
Expand Down Expand Up @@ -48,6 +51,7 @@ export function AssistantTimelineRow({ row }: { row: Extract<TimelineRow, { kind
itemKey={row.id}
request={ctx.citationRequest}
listRef={ctx.listRef}
quotable={isQuotableAssistantMessage(row.projectedItem?.item.nativeItemRef)}
>
<ChatMarkdown
text={messageText}
Expand Down Expand Up @@ -107,6 +111,7 @@ export function SentMessageTimelineRow({
itemKey={row.id}
request={ctx.citationRequest}
listRef={ctx.listRef}
quotable
>
<ChatMarkdown
text={row.text}
Expand Down Expand Up @@ -232,7 +237,9 @@ function AssistantMessageMeta({
{projectedItem?.item.type === "assistant_message" ? (
<AssistantForkButton projectedItem={projectedItem} />
) : null}
{!message.streaming && projectedItem ? (
{!message.streaming &&
projectedItem &&
isQuotableAssistantMessage(projectedItem.item.nativeItemRef) ? (
<AssistantReplyButton message={message} itemId={projectedItem.sourceItemId} />
) : null}
{!message.streaming && (
Expand Down
9 changes: 9 additions & 0 deletions 9 apps/web/src/lib/assistantTextSelection.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,15 @@ describe("captureAssistantTextSelection", () => {
expect(capture(source, nativeSelection([quote, 0], [control, 1]))).toBeNull();
});

it("does not quote a response marked unquotable", () => {
const quote = textNode("Reasoning shown as a reply.");
const source = new SelectionNode("DIV", "", {
"data-assistant-citation-source": "assistant",
"data-assistant-citation-quotable": "false",
}).append(quote);
expect(capture(source, nativeSelection([quote, 0], [quote, quote.length]))).toBeNull();
});

it.each([
new SelectionNode("BUTTON"),
new SelectionNode("SPAN", "", { role: "button" }),
Expand Down
8 changes: 7 additions & 1 deletion 8 apps/web/src/lib/assistantTextSelection.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ export function captureAssistantTextSelection(
const last = selectedTextBoundary(range, range.commonAncestorContainer, true);
if (first === null || last === null) return null;
const source = first.parentElement?.closest<HTMLElement>("[data-assistant-citation-source]");
if (!source || !viewport.contains(source)) return null;
if (
!source ||
!viewport.contains(source) ||
source.matches("[data-assistant-citation-quotable=false]")
) {
return null;
}

// Paragraph selection can end at the next block's offset 0 or a parent
// boundary. Validate the text actually selected, not that empty endpoint.
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.