@@ -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 ;
@@ -2772,10 +2772,12 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
27722772 const markdownContentWidth = Math . max ( 0 , contentWidth - ASSISTANT_ROW_HORIZONTAL_PADDING * 2 ) ;
27732773 const reviewCommentBubbleWidth = Math . min ( Math . max ( 280 , contentWidth * 0.85 ) , contentWidth ) ;
27742774 const barInset = useBarInset ( ) ;
2775- const topContentInset = props . contentTopInset ?? barInset ;
2775+ const columnTopInset = useContentTopInset ( ) ;
27762776 const bottomContentInset = props . contentBottomInset ?? 18 ;
27772777 const usesNativeAutomaticInsets =
27782778 props . usesAutomaticContentInsets === true && Platform . OS === "ios" ;
2779+ // Without the native contentInset, a list-header spacer clears the bar the column lays content under.
2780+ const topContentInset = usesNativeAutomaticInsets ? 0 : columnTopInset ;
27792781 const anchorTopInset = usesNativeAutomaticInsets ? barInset : topContentInset ;
27802782
27812783 const theme = useUniwindTheme ( ) ;
@@ -2893,17 +2895,18 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
28932895 props . workspaceRoot &&
28942896 relativePath &&
28952897 ! / [ \\ / ] $ / . test ( presentation . path ) &&
2896- needsWorkspaceBasenameLookup ( relativePath ) &&
2898+ workspaceLinkLookupQuery ( presentation . path , props . workspaceRoot ) !== null &&
28972899 readEnvironmentScope ( props . environmentId , AuthFilesystemReadScope )
28982900 ) {
2901+ const workspaceRoot = props . workspaceRoot ;
28992902 const originalPath = resolveWorkspaceFilePath ( props . workspaceRoot , relativePath ) ;
29002903 void executeAtomQuery (
29012904 appAtomRegistry ,
29022905 projectEnvironment . searchEntries ( {
29032906 environmentId : props . environmentId ,
29042907 input : {
2905- cwd : props . workspaceRoot ,
2906- query : relativePath ,
2908+ cwd : workspaceRoot ,
2909+ query : workspaceLinkLookupQuery ( relativePath , workspaceRoot ) ?? relativePath ,
29072910 kind : "file" ,
29082911 limit : WORKSPACE_BASENAME_LOOKUP_LIMIT ,
29092912 } ,
@@ -2913,7 +2916,7 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
29132916 ( result ) => {
29142917 const match =
29152918 result . _tag === "Success"
2916- ? pickWorkspaceBasenameMatch ( relativePath , result . value . entries )
2919+ ? pickWorkspaceLinkMatch ( relativePath , workspaceRoot , result . value . entries )
29172920 : null ;
29182921 if ( ! match || match === relativePath ) {
29192922 openAt ( relativePath ) ;
@@ -2930,7 +2933,10 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
29302933 ) . then (
29312934 ( metadata ) =>
29322935 openAt (
2933- metadata . _tag === "Success" && metadata . value ?. kind !== "directory"
2936+ metadata . _tag === "Success" &&
2937+ ( needsWorkspaceBasenameLookup ( relativePath )
2938+ ? metadata . value ?. kind !== "directory"
2939+ : metadata . value === null )
29342940 ? match
29352941 : relativePath ,
29362942 ) ,
@@ -3200,7 +3206,9 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
32003206 if ( state ) onIsAtEndChange ?.( state . isAtEnd ) ;
32013207 } ;
32023208 const handleScroll = ( event : NativeSyntheticEvent < NativeScrollEvent > ) => {
3203- reportHeaderMaterialVisibility ( event . nativeEvent . contentOffset . y + anchorTopInset > 6 ) ;
3209+ reportHeaderMaterialVisibility (
3210+ event . nativeEvent . contentOffset . y + ( usesNativeAutomaticInsets ? barInset : 0 ) > 6 ,
3211+ ) ;
32043212 handleMetricsChange ( ) ;
32053213 } ;
32063214 // 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