@devries-cameron20 / t3code Mirror · read-only / commits / 968dd51704
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 19:30 UTC

fix(web): the branch toolbar and thread details panel stay cached while a reply streams (#23103)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 21, 2026 at 14:39 UTC 968dd51704441138559a3fe9c348719f2b11e0c6
1 file changed +6 -3
apps/web/src/components/chat/useComposerSelection.ts
+6 -3
@@ -237,12 +237,15 @@ export function useComposerSelection(input: ComposerSelectionInput) {
237 };
238 const onEnvModeChangeStable = useStableCallback(onEnvModeChange);
239
240 + // Reads only the id: the shell changes on every streamed event, and a new handler
241 + // re-renders the branch toolbar and thread details panel with it.
242 + const activeThreadId = activeThread?.id;
243 const onStartFromOriginChange = (nextStartFromOrigin: boolean) => {
241 - if (canOverrideServerThreadEnvMode && activeThread) {
244 + if (canOverrideServerThreadEnvMode && activeThreadId !== undefined) {
245 setPendingServerThreadStartFromOriginByThreadId((current) =>
243 - current[activeThread.id] === nextStartFromOrigin
246 + current[activeThreadId] === nextStartFromOrigin
247 ? current
245 - : { ...current, [activeThread.id]: nextStartFromOrigin },
248 + : { ...current, [activeThreadId]: nextStartFromOrigin },
249 );
250 return;
251 }