Skip to content

Commit 256f768

Browse files
Merge remote-tracking branch 'origin/main' into pr-32520
2 parents d177a77 + 80e6261 commit 256f768

21 files changed

Lines changed: 712 additions & 226 deletions

‎apps/mobile/src/components/ui/useBarInset.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export function useBarOverlap(): number {
3838
}
3939

4040
/**
41-
* The content's top safe area under the AppBar: a translucent bar's height, zero under a solid
42-
* one or on Android, where the bar sits in flow. For scroll content insets, which must not
43-
* double-count a solid bar.
41+
* The content's top safe area under the AppBar: the height of the iOS bar its column lays content
42+
* under, glass or solid, and zero on Android, where the bar sits in flow. For manual scroll
43+
* content insets.
4444
*/
4545
export function useContentTopInset(): number {
4646
const insets = useSafeAreaInsets();

‎apps/mobile/src/features/layout/workspace/workspace-list-insets.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
22

33
import { NATIVE_LIQUID_GLASS_SUPPORTED } from "../../../native/native-glass";
44

5-
/** A workspace list scrolls under its bar where the bar is glass; under a solid bar it starts below. */
6-
export const WORKSPACE_LIST_SCROLL_INSETS = {
7-
automaticallyAdjustsScrollIndicatorInsets: NATIVE_LIQUID_GLASS_SUPPORTED,
8-
contentInsetAdjustmentBehavior: NATIVE_LIQUID_GLASS_SUPPORTED ? "automatic" : "never",
9-
} as const;
10-
115
/** How far an empty workspace list keeps its message below a glass bar and its search. */
126
export function useWorkspaceListEmptyTopInset(): number {
137
const insets = useSafeAreaInsets();

‎apps/mobile/src/features/threads/ThreadDetailScreen.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,6 @@ function ThreadDetailBody(
14961496
keyboardOffset={composerKeyboardOffset}
14971497
sendingWithKeyboard={sendingWithKeyboard}
14981498
fitShortFeedToViewport={questionInFlow && !isKeyboardVisible}
1499-
contentTopInset={0}
15001499
contentBottomInset={
15011500
questionInFlow
15021501
? 0

‎apps/mobile/src/features/threads/ThreadFeed.tsx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ import { getReviewSectionIdForCheckpoint } from "../review/reviewModel";
170170
import { setReviewSelectedSectionId } from "../review/reviewState";
171171
import { Menu } from "../../components/ui/Menu";
172172
import { useAndroidControlSizing } from "../../components/ui/useAndroidControlSizing";
173-
import { useBarInset } from "../../components/ui/useBarInset";
173+
import { useBarInset, useContentTopInset } from "../../components/ui/useBarInset";
174174
import { copyPromptLink } from "../prompt-links/prompt-link-actions";
175175
import { parseReviewCommentMessageSegments } from "../review/reviewCommentSelection";
176176
import {
@@ -332,7 +332,6 @@ export interface ThreadFeedProps {
332332
readonly keyboardOffset: number;
333333
readonly sendingWithKeyboard?: boolean;
334334
readonly fitShortFeedToViewport?: boolean;
335-
readonly contentTopInset?: number;
336335
readonly contentBottomInset?: number;
337336
readonly historyControls?: ThreadFeedHistoryControls;
338337
readonly contentMaxWidth?: number;
@@ -2772,10 +2771,12 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
27722771
const markdownContentWidth = Math.max(0, contentWidth - ASSISTANT_ROW_HORIZONTAL_PADDING * 2);
27732772
const reviewCommentBubbleWidth = Math.min(Math.max(280, contentWidth * 0.85), contentWidth);
27742773
const barInset = useBarInset();
2775-
const topContentInset = props.contentTopInset ?? barInset;
2774+
const columnTopInset = useContentTopInset();
27762775
const bottomContentInset = props.contentBottomInset ?? 18;
27772776
const usesNativeAutomaticInsets =
27782777
props.usesAutomaticContentInsets === true && Platform.OS === "ios";
2778+
// Without the native contentInset, a list-header spacer clears the bar the column lays content under.
2779+
const topContentInset = usesNativeAutomaticInsets ? 0 : columnTopInset;
27792780
const anchorTopInset = usesNativeAutomaticInsets ? barInset : topContentInset;
27802781

27812782
const theme = useUniwindTheme();
@@ -3200,7 +3201,9 @@ export const ThreadFeed = memo(function ThreadFeed(props: ThreadFeedProps) {
32003201
if (state) onIsAtEndChange?.(state.isAtEnd);
32013202
};
32023203
const handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
3203-
reportHeaderMaterialVisibility(event.nativeEvent.contentOffset.y + anchorTopInset > 6);
3204+
reportHeaderMaterialVisibility(
3205+
event.nativeEvent.contentOffset.y + (usesNativeAutomaticInsets ? barInset : 0) > 6,
3206+
);
32043207
handleMetricsChange();
32053208
};
32063209
// oxlint-disable-next-line t3code/no-unreasoned-state-sync -- subscribes to the list's end state to report it to the parent

‎apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import { usePendingTaskListActions } from "../home/usePendingTaskListActions";
4848
import { useThreadListActions } from "../home/useThreadListActions";
4949
import { useFabScroll } from "../home/FabScrollContext";
5050
import { WorkspaceListHeader } from "../layout/workspace/WorkspaceListHeader";
51-
import { WORKSPACE_LIST_SCROLL_INSETS } from "../layout/workspace/workspace-list-insets";
5251
import { WorkspaceSidebarColumn } from "../layout/workspace/WorkspaceSidebarColumn";
5352
import {
5453
ThreadListV2PendingRow,
@@ -592,7 +591,9 @@ function ThreadNavigationSidebarPane(props: ThreadNavigationSidebarProps) {
592591
itemsAreEqual={sidebarItemsAreEqual}
593592
keyExtractor={(item) => item.key}
594593
renderItem={renderListItem}
595-
{...WORKSPACE_LIST_SCROLL_INSETS}
594+
automaticallyAdjustsScrollIndicatorInsets
595+
// The column lays the list under its bar, glass or solid; UIKit insets it past both.
596+
contentInsetAdjustmentBehavior="automatic"
596597
contentContainerStyle={[
597598
styles.threadListContent,
598599
{

‎apps/server/src/mcp/OrchestratorMcpService.test.ts‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ describe("OrchestratorMcpService", () => {
9191
const parentProjection = {
9292
thread: { id: parentThreadId },
9393
runs: [],
94-
contextTransfers: [
95-
{
96-
id: resultTransferId,
97-
type: "subagent_result",
98-
sourceThreadId: childThreadId,
99-
targetThreadId: parentThreadId,
100-
sourcePoint: { runId: childRunId },
101-
},
102-
],
10394
subagents: [
10495
{
10596
id: taskId,
@@ -131,7 +122,15 @@ describe("OrchestratorMcpService", () => {
131122
completedAt: DateTime.makeUnsafe("2026-10-03T10:05:00Z"),
132123
},
133124
],
134-
contextTransfers: [],
125+
contextTransfers: [
126+
{
127+
id: resultTransferId,
128+
type: "subagent_result",
129+
sourceThreadId: childThreadId,
130+
targetThreadId: parentThreadId,
131+
sourcePoint: { runId: childRunId },
132+
},
133+
],
135134
messages: [
136135
{
137136
id: MessageId.make("message:mcp-ack-result"),
@@ -160,6 +159,7 @@ describe("OrchestratorMcpService", () => {
160159
return hasNestedWork
161160
? {
162161
...childProjection,
162+
contextTransfers: [],
163163
subagents: [
164164
{ ...parentProjection.subagents[0]!, status: "running" as const },
165165
],
@@ -169,7 +169,6 @@ describe("OrchestratorMcpService", () => {
169169
const snapshot = hasNestedWork
170170
? {
171171
...parentProjection,
172-
contextTransfers: [],
173172
subagents: parentProjection.subagents.map((task) => ({
174173
...task,
175174
result: null,

0 commit comments

Comments
 (0)