Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): starting sessions show as working in the chat view #14000

Closedxrehpicx(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/14000/headopened View on GitHub

Showing 1 changed file with 3 additions and 1 deletion.

x
0 of 1 viewed, 1 left
3 additions and 1 deletionapps/web/src/components/ChatView.tsxModified
View file
@@ -1729,7 +1729,6 @@
const [localServerErrorsByThreadKey, setLocalServerErrorsByThreadKey] = useState<
Record<string, LocalThreadErrorEntry>
>({});
- const [isConnecting, _setIsConnecting] = useState(false);
const isRevertingCheckpoint = useComposerDraftStore((store) =>
store.rewindingThreadKeys.has(routeThreadKey),
@@ -2885,6 +2884,9 @@
conversationProviderStatus !== null &&
conversationProviderStatus.supportsConversationRollback !== false;
const phase = derivePhase(activeThread?.session ?? null);
+ // Server-derived, so a reload, a route change after a draft send, or another
+ // client still sees a session held in startup (e.g. a slow provider hook).
+ const isConnecting = phase === "connecting";
const threadActivities = activeThread?.activities ?? EMPTY_ACTIVITIES;
const latestCheckpointCompletedAt = activeThread?.checkpoints.at(-1)?.completedAt ?? null;
const workspaceMutationId = useMemo(() => {