diff --git a/apps/mobile/modules/t3-review-diff/ios/T3ReviewDiffView.swift b/apps/mobile/modules/t3-review-diff/ios/T3ReviewDiffView.swift index bd023ff348..31eeb9d704 100644 --- a/apps/mobile/modules/t3-review-diff/ios/T3ReviewDiffView.swift +++ b/apps/mobile/modules/t3-review-diff/ios/T3ReviewDiffView.swift @@ -558,6 +558,8 @@ public final class T3ReviewDiffView: ExpoView, UIScrollViewDelegate { rowsDecodeGeneration += 1 tokensDecodeGeneration += 1 contentView.tokensByRowId = [:] + rows = [] + contentView.rows = [] hasAppliedInitialRowIndex = false lastVisibleFileId = nil pendingScrollFileId = nil @@ -658,6 +660,7 @@ public final class T3ReviewDiffView: ExpoView, UIScrollViewDelegate { contentView.invalidateVisibleViewport() contentView.setNeedsDisplay() applyInitialRowIndexIfNeeded() + applyPendingScrollIfNeeded() emitVisibleFileIfNeeded() let debugKey = "\(rows.count):\(Int(bounds.width)):\(Int(bounds.height)):\(Int(height))" diff --git a/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx b/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx index 1942e5737d..75c71775bb 100644 --- a/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx +++ b/apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx @@ -536,6 +536,22 @@ export function ThreadFilesTreeScreen() { [projectName], ); + if (selectedThread === null || environmentId === null || threadId === null) { + if (fileInspector.supported) { + return ( + + ); + } + return ; + } + + if (cwd === null) { + return ; + } + if (fileInspector.supported) { return ( ; - } - - if (cwd === null) { - return ; - } - return ( { + if (environmentId === null || threadId === null) { + return null; + } + try { + return scopedThreadKey(EnvironmentId.make(environmentId), ThreadId.make(threadId)); + } catch { + return null; + } + }, [environmentId, threadId]); const activateAuxiliaryPaneRole = useCallback((role: WorkspaceAuxiliaryPaneRole) => { const owner = Symbol(role); activeRoleOwner.current = owner; diff --git a/apps/mobile/src/features/threads/ThreadComposer.tsx b/apps/mobile/src/features/threads/ThreadComposer.tsx index cc941e9f2b..053d8b84b2 100644 --- a/apps/mobile/src/features/threads/ThreadComposer.tsx +++ b/apps/mobile/src/features/threads/ThreadComposer.tsx @@ -451,14 +451,14 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer const handleSend = useCallback(async () => { const threadId = props.selectedThread.id; - if (!canSend || inFlightThreadIdsRef.current.has(threadId)) return; + if (inFlightThreadIdsRef.current.has(threadId)) return; inFlightThreadIdsRef.current.add(threadId); try { await onSendMessage(); } finally { inFlightThreadIdsRef.current.delete(threadId); } - }, [canSend, onSendMessage, props.selectedThread.id]); + }, [onSendMessage, props.selectedThread.id]); const handleCommandSelect = useCallback( (item: ComposerCommandItem) => { if (!composerTrigger) return; diff --git a/apps/mobile/src/features/threads/ThreadRouteScreen.tsx b/apps/mobile/src/features/threads/ThreadRouteScreen.tsx index f412825c8c..2a96ee7ad2 100644 --- a/apps/mobile/src/features/threads/ThreadRouteScreen.tsx +++ b/apps/mobile/src/features/threads/ThreadRouteScreen.tsx @@ -254,7 +254,9 @@ function ThreadRouteContent( const inspectorMode = inspectorSelection?.routeThreadIdentity === routeThreadIdentity ? inspectorSelection.mode - : null; + : fileInspector.supported && selectedThreadCwd !== null + ? "files" + : null; useEffect(() => { setInspectorSelection((current) => {