@@ -170,7 +170,7 @@ import { getReviewSectionIdForCheckpoint } from "../review/reviewModel";
170170import { setReviewSelectedSectionId } from "../review/reviewState" ;
171171import { Menu } from "../../components/ui/Menu" ;
172172import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing" ;
173- import { useBarInset } from "../../components/ui/useBarInset" ;
173+ import { useBarInset , useContentTopInset } from "../../components/ui/useBarInset" ;
174174import { copyPromptLink } from "../prompt-links/prompt-link-actions" ;
175175import { parseReviewCommentMessageSegments } from "../review/reviewCommentSelection" ;
176176import {
@@ -236,8 +236,9 @@ import { readEnvironmentScope, usePreparedConnection } from "../../state/session
236236import { projectEnvironment } from "../../state/projects" ;
237237import {
238238 needsWorkspaceBasenameLookup ,
239- pickWorkspaceBasenameMatch ,
239+ pickWorkspaceLinkMatch ,
240240 WORKSPACE_BASENAME_LOOKUP_LIMIT ,
241+ workspaceLinkLookupQuery ,
241242} from "@t3tools/client-runtime/workspace-basename-lookup" ;
242243import {
243244 resolveThreadLink ,
@@ -332,7 +333,6 @@ export interface ThreadFeedProps {
332333 readonly keyboardOffset : number ;
333334 readonly sendingWithKeyboard ?: boolean ;
334335 readonly fitShortFeedToViewport ?: boolean ;
335- readonly contentTopInset ?: number ;
336336 readonly contentBottomInset ?: number ;
337337 readonly historyControls ?: ThreadFeedHistoryControls ;
338338 readonly contentMaxWidth ?: number ;
@@ -1914,7 +1914,10 @@ function renderFeedEntry(
19141914 const bubbleBodyVisible = foldRowId === null || foldExpanded ;
19151915 const intentBadge = props . userMessageGrouping . continuesSteer
19161916 ? null
1917- : resolveUserMessageIntentBadge ( message . inputIntent ) ;
1917+ : resolveUserMessageIntentBadge (
1918+ message . inputIntent ,
1919+ message . projectedItem ?. item . status === "pending" ,
1920+ ) ;
19181921 const referenceIds = new Set (
19191922 collectComposerContextReferences ( message . text ) . map ( ( reference ) => reference . contextId ) ,
19201923 ) ;
@@ -2772,10 +2775,12 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
27722775 const markdownContentWidth = Math . max ( 0 , contentWidth - ASSISTANT_ROW_HORIZONTAL_PADDING * 2 ) ;
27732776 const reviewCommentBubbleWidth = Math . min ( Math . max ( 280 , contentWidth * 0.85 ) , contentWidth ) ;
27742777 const barInset = useBarInset ( ) ;
2775- const topContentInset = props . contentTopInset ?? barInset ;
2778+ const columnTopInset = useContentTopInset ( ) ;
27762779 const bottomContentInset = props . contentBottomInset ?? 18 ;
27772780 const usesNativeAutomaticInsets =
27782781 props . usesAutomaticContentInsets === true && Platform . OS === "ios" ;
2782+ // Without the native contentInset, a list-header spacer clears the bar the column lays content under.
2783+ const topContentInset = usesNativeAutomaticInsets ? 0 : columnTopInset ;
27792784 const anchorTopInset = usesNativeAutomaticInsets ? barInset : topContentInset ;
27802785
27812786 const theme = useUniwindTheme ( ) ;
@@ -2893,17 +2898,18 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
28932898 props . workspaceRoot &&
28942899 relativePath &&
28952900 ! / [ \\ / ] $ / . test ( presentation . path ) &&
2896- needsWorkspaceBasenameLookup ( relativePath ) &&
2901+ workspaceLinkLookupQuery ( presentation . path , props . workspaceRoot ) !== null &&
28972902 readEnvironmentScope ( props . environmentId , AuthFilesystemReadScope )
28982903 ) {
2904+ const workspaceRoot = props . workspaceRoot ;
28992905 const originalPath = resolveWorkspaceFilePath ( props . workspaceRoot , relativePath ) ;
29002906 void executeAtomQuery (
29012907 appAtomRegistry ,
29022908 projectEnvironment . searchEntries ( {
29032909 environmentId : props . environmentId ,
29042910 input : {
2905- cwd : props . workspaceRoot ,
2906- query : relativePath ,
2911+ cwd : workspaceRoot ,
2912+ query : workspaceLinkLookupQuery ( relativePath , workspaceRoot ) ?? relativePath ,
29072913 kind : "file" ,
29082914 limit : WORKSPACE_BASENAME_LOOKUP_LIMIT ,
29092915 } ,
@@ -2913,7 +2919,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
29132919 ( result ) => {
29142920 const match =
29152921 result . _tag === "Success"
2916- ? pickWorkspaceBasenameMatch ( relativePath , result . value . entries )
2922+ ? pickWorkspaceLinkMatch ( relativePath , workspaceRoot , result . value . entries )
29172923 : null ;
29182924 if ( ! match || match === relativePath ) {
29192925 openAt ( relativePath ) ;
@@ -2930,7 +2936,10 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
29302936 ) . then (
29312937 ( metadata ) =>
29322938 openAt (
2933- metadata . _tag === "Success" && metadata . value ?. kind !== "directory"
2939+ metadata . _tag === "Success" &&
2940+ ( needsWorkspaceBasenameLookup ( relativePath )
2941+ ? metadata . value ?. kind !== "directory"
2942+ : metadata . value === null )
29342943 ? match
29352944 : relativePath ,
29362945 ) ,
@@ -3200,7 +3209,9 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
32003209 if ( state ) onIsAtEndChange ?.( state . isAtEnd ) ;
32013210 } ;
32023211 const handleScroll = ( event : NativeSyntheticEvent < NativeScrollEvent > ) => {
3203- reportHeaderMaterialVisibility ( event . nativeEvent . contentOffset . y + anchorTopInset > 6 ) ;
3212+ reportHeaderMaterialVisibility (
3213+ event . nativeEvent . contentOffset . y + ( usesNativeAutomaticInsets ? barInset : 0 ) > 6 ,
3214+ ) ;
32043215 handleMetricsChange ( ) ;
32053216 } ;
32063217 // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes to the list's end state to report it to the parent
0 commit comments