@@ -34,6 +34,7 @@ import {
3434import { PullRequestFilesSheet } from "./features/pull-requests/PullRequestFiles" ;
3535import { PullRequestReviewSheet } from "./features/pull-requests/PullRequestReviewSheet" ;
3636import { PullRequestReviewersScreen } from "./features/pull-requests/PullRequestReviewersScreen" ;
37+ import { PullRequestFilterSearchScreen } from "./features/pull-requests/PullRequestFilterSearchScreen" ;
3738import {
3839 RenderErrorBoundary ,
3940 RenderFailureView ,
@@ -147,6 +148,7 @@ const HEADER_SCROLL_EDGE_EFFECTS = nativeHeaderScrollEdgeEffects(Platform.OS, Pl
147148
148149type AppScreenOptions = NativeStackNavigationOptions & {
149150 readonly unstable_navigationItemStyle ?: "editor" ;
151+ readonly unstable_headerMinimizationBehavior ?: "onScrollUp" ;
150152} ;
151153
152154const GLASS_HEADER_OPTIONS : AppScreenOptions = {
@@ -169,6 +171,13 @@ const DETAIL_HEADER_OPTIONS: AppScreenOptions = {
169171 headerShown : Platform . OS !== "android" ,
170172} ;
171173
174+ // Like Messages on the Duo: reading back through history (scrolling up) minimizes the
175+ // header, and reversing toward the latest message restores it. Other devices ignore it.
176+ const THREAD_HEADER_OPTIONS : AppScreenOptions = {
177+ ...DETAIL_HEADER_OPTIONS ,
178+ unstable_headerMinimizationBehavior : "onScrollUp" ,
179+ } ;
180+
172181const SOLID_HEADER_OPTIONS : AppScreenOptions = {
173182 headerBackButtonDisplayMode : "minimal" ,
174183 headerBackTitle : "" ,
@@ -681,6 +690,21 @@ const RootStackConfig = createWorkspaceStackNavigator({
681690 headerBackVisible : false ,
682691 } ,
683692 } ) ,
693+ PullRequestFilterSearch : createNativeStackScreen ( {
694+ screen : PullRequestFilterSearchScreen ,
695+ // Android pushes it like the branch picker; a formSheet there leaves the list's header
696+ // peeking above it once the keyboard opens.
697+ options :
698+ Platform . OS === "android"
699+ ? { presentation : "card" , headerShown : false }
700+ : {
701+ ...DETAIL_HEADER_OPTIONS ,
702+ ...HORIZONTAL_FORM_SHEET_OPTIONS ,
703+ sheetAllowedDetents : formSheetDetents ( 0.75 ) ,
704+ sheetGrabberVisible : true ,
705+ headerBackVisible : false ,
706+ } ,
707+ } ) ,
684708 PullRequestDiscussion : createNativeStackScreen ( {
685709 screen : PullRequestDiscussionScreen ,
686710 options : DETAIL_HEADER_OPTIONS ,
@@ -707,7 +731,7 @@ const RootStackConfig = createWorkspaceStackNavigator({
707731 Thread : createNativeStackScreen ( {
708732 screen : ThreadRouteScreen ,
709733 linking : { path : "threads/:environmentId?/:threadId?" , alias : [ "new/draft" ] } ,
710- options : DETAIL_HEADER_OPTIONS ,
734+ options : THREAD_HEADER_OPTIONS ,
711735 } ) ,
712736 NewTaskProject : createNativeStackScreen ( {
713737 screen : NewTaskRouteScreen ,
0 commit comments