@devries-cameron20 / t3code-1 / commits / dff750b1b8
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): stop question answers from resetting the editor caret (#11337)

shivam committed Oct 14, 2026 at 07:32 UTC dff750b1b8818eb004b8c3d060edcdc09f88a07f
1 file changed +4 -16
apps/web/src/components/ChatView.tsx
+4 -16
@@ -10428,13 +10428,7 @@ export default function ChatView(props: ChatViewProps) {
10428 );
10429
10430 const onChangeActivePendingUserInputCustomAnswer = useCallback(
10431 - (
10432 - questionId: string,
10433 - value: string,
10434 - nextCursor: number,
10435 - expandedCursor: number,
10436 - _cursorAdjacentToMention: boolean,
10437 - ) => {
10431 + (questionId: string, value: string) => {
10432 if (!activePendingUserInput) {
10433 return;
10434 }
@@ -10454,16 +10448,10 @@ export default function ChatView(props: ChatViewProps) {
10448 ),
10449 },
10450 }));
10457 - const snapshot = composerRef.current?.readSnapshot();
10458 - if (
10459 - snapshot?.value !== value ||
10460 - snapshot.cursor !== nextCursor ||
10461 - snapshot.expandedCursor !== expandedCursor
10462 - ) {
10463 - composerRef.current?.focusAt(nextCursor);
10464 - }
10451 + // The editor owns this selection. Resetting it before the answer renders
10452 + // can re-enter Lexical with offsets from the previous skill token.
10453 },
10466 - [activePendingUserInput, activePendingRequestKey, composerRef],
10454 + [activePendingUserInput, activePendingRequestKey],
10455 );
10456
10457 const onAdvanceActivePendingUserInput = useCallback(() => {