Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(mobile): 横屏任务侧栏不再被聊天页系统顶栏盖住 (#5368)

Dash19a3da155b91
diff --git a/apps/mobile/app/sessions/[sessionId].tsx b/apps/mobile/app/sessions/[sessionId].tsx
index fd09808579..f124a5d29a 100644
--- a/apps/mobile/app/sessions/[sessionId].tsx
+++ b/apps/mobile/app/sessions/[sessionId].tsx
@@ -2736,10 +2736,6 @@ export default function SessionScreen() {
: composerRuntimeSummary.modelSummary
: '';
const adaptiveWindow = useAdaptiveWindow();
- const nativeHeaderHeight = useSessionHeaderHeight(JSON.stringify([
- windowDimensions.width, windowDimensions.height, windowDimensions.fontScale,
- insets.top, insets.bottom, insets.left, insets.right, adaptiveWindow.barEdge,
- ]));
const paneLayout = sessionPaneLayout(adaptiveWindow);
const horizontalSystemHeader = Platform.OS === 'ios' && adaptiveWindow.barEdge === 'none'
&& !paneLayout.persistent && !shareSelectionActive && !companionChat;
@@ -2778,6 +2774,13 @@ export default function SessionScreen() {
// onClosed 才 false。它同时保证退场期 TalkBack 背景隔离,以及旋转/收窄退出宽屏时
// 不会提前卸载 Drawer 而吞掉 pending 导航。
const [sessionListDrawerOverlayMounted, setSessionListDrawerOverlayMounted] = useState(false);
+ // iOS 系统导航栏在 RN 内容之上,临时抽屉的 zIndex 盖不住它:抽屉存续期间收起系统栏,
+ // 抽屉自身的弹层(选项、改名、下拉菜单)仍在树内正常弹出。收起期间沿用打开前的顶栏
+ // 高度,遮罩下的聊天内容不跳动。
+ const nativeHeaderHeight = useSessionHeaderHeight(JSON.stringify([
+ windowDimensions.width, windowDimensions.height, windowDimensions.fontScale,
+ insets.top, insets.bottom, insets.left, insets.right, adaptiveWindow.barEdge,
+ ]), sessionListDrawerOverlayMounted);
// 退出宽屏后 layout.drawerWidth 会变 0;退场期间继续用最后一个有效宽度,避免面板几何跳变。
const sessionListDrawerWidthRef = useRef(wideSessionNav.drawerWidth);
if (wideSessionNav.enabled) sessionListDrawerWidthRef.current = wideSessionNav.drawerWidth;
@@ -8964,6 +8967,7 @@ export default function SessionScreen() {
onBack={goBackToHome} />
</> : <SessionHeaderBar
horizontalSystemHeader={horizontalSystemHeader}
+ systemBarHidden={sessionListDrawerOverlayMounted}
currentSession={currentSession}
diffCount={diffCount}
isDeviceAccessRevoked={isDeviceAccessRevoked}
@@ -10110,6 +10114,7 @@ type SessionHeaderIcon = typeof Folder;
function SessionHeaderBar({
horizontalSystemHeader,
+ systemBarHidden = false,
currentSession,
diffCount,
isDeviceAccessRevoked,
@@ -10136,6 +10141,8 @@ function SessionHeaderBar({
title,
}: {
horizontalSystemHeader: boolean;
+ /** 临时任务列表抽屉存续期间收起系统栏,让抽屉顶部控件可见可点。 */
+ systemBarHidden?: boolean;
currentSession: RemoteSession | null;
diffCount: number;
isDeviceAccessRevoked: boolean;
@@ -10220,6 +10227,8 @@ function SessionHeaderBar({
// Let UINavigationBar align controls with the system status area, including Duo portrait.
if (horizontalSystemHeader) {
+ // Stack.Toolbar left/right forces headerShown: true; drop them while the bar is hidden.
+ if (systemBarHidden) return <Stack.Screen options={{ headerShown: false }} />;
const files = overview?.actions.find(action => action.id === 'files');
return <>
<Stack.Screen options={{ headerShown: true, headerTransparent: true,
diff --git a/apps/mobile/src/__tests__/homeDesktopFirst.test.ts b/apps/mobile/src/__tests__/homeDesktopFirst.test.ts
index a309b956ed..14f9413252 100644
--- a/apps/mobile/src/__tests__/homeDesktopFirst.test.ts
+++ b/apps/mobile/src/__tests__/homeDesktopFirst.test.ts
@@ -760,7 +760,16 @@ describe('mobile home desktop-first surface', () => {
expect(source).toContain('testID="home.remoteAccessGuide"');
// 引导态没有可筛选的对话:表头退化为纯品牌标题(无下拉菜单),新建 FAB 不渲染。
expect(source).toContain('{showRemoteGuide ? (');
- expect(source).toContain("{newSessionInSystemBar || showRemoteGuide || taskSuggestionsPending || taskSuggestionsMode === 'empty' ? null : (");
+ expect(source).toContain("const newSessionEntryVisible = !showRemoteGuide && !taskSuggestionsPending && taskSuggestionsMode !== 'empty';");
+ expect(source).toContain('{newSessionInSystemBar || newSessionInHeader || !newSessionEntryVisible ? null : (');
+ // 临时任务列表抽屉不浮动新建按钮,新建放进抽屉顶栏;常驻列与首页不变。
+ expect(source).toContain('const headerNewSession = newSessionInHeader && newSessionEntryVisible;');
+ // 顶栏新建与浮动按钮走同一入口(openNewSession → guardedPush → 抽屉 runNavigation 先关再跳)。
+ expect(source).toContain('onPress={() => openNewSession()} testID="home.headerNewSessionButton">');
+ expect(source).toContain("if (run) run(() => push(href)); else push(href);");
+ // 抽屉与首页左上角都只打开系统菜单(HomeChromeDrawer 自有渲染测试),不再有关闭分支。
+ expect(source).toContain('onPress={openChromeMenu}\n testID="home.chromeMenu"');
+ expect(source).not.toContain('onDismiss');
const guideSource = readSource('src/components/RemoteAccessGuide.tsx');
// 文案已 i18n 化,断言改查 zh-CN catalog(单一事实源);源码只保留结构/交互契约。
diff --git a/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.ts b/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.ts
index e5d3e655cd..4326f8e236 100644
--- a/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.ts
+++ b/apps/mobile/src/__tests__/sessionHeaderDesktopFirst.test.ts
@@ -96,6 +96,11 @@ describe('mobile session header desktop-first surface', () => {
expect(source).toContain('testID="session.composerFrost"');
expect(source).toContain('<View ref={topOverlayRef} onLayout={handleTopOverlayLayout} pointerEvents="box-none" style={styles.sessionChrome} testID="session.chrome">');
expect(source).toContain('<View style={[styles.sessionChromeContent, { paddingTop: horizontalSystemHeader ? nativeHeaderHeight : insets.top + (paneLayout.persistent ? spacing.lg : 0) }, companionChat && { backgroundColor: colors.surface }]}>');
+ // 临时任务列表抽屉在树内,盖不住 iOS 系统栏:抽屉存续期间收起系统栏,内容区沿用打开前的顶栏高度。
+ expect(source).toContain(']), sessionListDrawerOverlayMounted);');
+ expect(source).toContain('systemBarHidden={sessionListDrawerOverlayMounted}');
+ // Stack.Toolbar 左右栏会强制 headerShown: true,收起期间整组不渲染。
+ expect(source).toContain('if (systemBarHidden) return <Stack.Screen options={{ headerShown: false }} />;');
expect(chromeStyle).toContain("position: 'absolute'");
// Let native glass press feedback extend beyond the 44pt iOS header.
expect(chromeStyle).toContain("overflow: Platform.OS === 'ios' ? 'visible' : 'hidden'");
diff --git a/apps/mobile/src/__tests__/sessionHeaderHeight.test.tsx b/apps/mobile/src/__tests__/sessionHeaderHeight.test.tsx
index 0cae9eb0f2..9fa2982a94 100644
--- a/apps/mobile/src/__tests__/sessionHeaderHeight.test.tsx
+++ b/apps/mobile/src/__tests__/sessionHeaderHeight.test.tsx
@@ -19,12 +19,13 @@ describe('task header geometry during native preload', () => {
let root: Root;
let height = 0;
let key = '';
- function Probe() { height = useSessionHeaderHeight(key); return null; }
+ let hold = false;
+ function Probe() { height = useSessionHeaderHeight(key, hold); return null; }
async function render() { await act(async () => root.render(<Probe />)); }
async function settle() { await act(async () => state.listener?.({ data: { closing: false } })); }
beforeEach(() => {
Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });
- state.focused = true; state.height = 82; state.listener = undefined;
+ state.focused = true; state.height = 82; state.listener = undefined; hold = false;
state.navigation.addListener.mockImplementation((_event, listener) => {
state.listener = listener; return () => { state.listener = undefined; };
});
@@ -48,6 +49,31 @@ describe('task header geometry during native preload', () => {
state.focused = true; await render(); await settle();
state.height = 50; await render(); expect(height).toBe(50);
});
+ it('holds the content height while the system bar is hidden and never caches the hidden height', async () => {
+ await render(); await settle(); expect(height).toBe(82);
+ hold = true; state.height = 24; await render(); expect(height).toBe(82);
+ // The next preload of this geometry still starts from the visible-bar measurement.
+ await act(async () => root.render(null));
+ hold = false; state.focused = false; state.height = 120;
+ await render(); expect(height).toBe(82);
+ state.focused = true; state.height = 82; await render(); await settle(); expect(height).toBe(82);
+ });
+ it('keeps holding after release until the restored bar reports a new height', async () => {
+ await render(); await settle(); expect(height).toBe(82);
+ hold = true; state.height = 24; await render(); expect(height).toBe(82);
+ // The drawer is gone but the native bar has not been measured again yet.
+ hold = false; await render(); expect(height).toBe(82);
+ state.height = 82; await render(); expect(height).toBe(82);
+ state.height = 90; await render(); expect(height).toBe(90);
+ });
+ it('does not cache the hidden height left over after release', async () => {
+ await render(); await settle();
+ hold = true; state.height = 24; await render();
+ hold = false; await render(); expect(height).toBe(82);
+ await act(async () => root.render(null));
+ state.focused = false; state.height = 120;
+ await render(); expect(height).toBe(82);
+ });
it('does not record offscreen estimates or a closing transition as measured geometry', async () => {
await render();
await act(async () => state.listener?.({ data: { closing: true } }));
diff --git a/apps/mobile/src/__tests__/sessionListDrawer.test.ts b/apps/mobile/src/__tests__/sessionListDrawer.test.ts
index 44376a9aa4..9c1fa8d3b4 100644
--- a/apps/mobile/src/__tests__/sessionListDrawer.test.ts
+++ b/apps/mobile/src/__tests__/sessionListDrawer.test.ts
@@ -57,9 +57,10 @@ describe('mobile session list drawer', () => {
expect(text).toContain('.failOffsetY([-16, 16])');
// 关闭动画期间 overlay 恒拦截,不放行点击穿透半透明 scrim(review #1328)。
expect(text).toContain('pointerEvents="auto"');
- // 临时面板使用主页的关闭入口,不再有重复主页底栏。
+ // 临时面板不再有重复主页底栏;左上角与常驻列一样是系统菜单,关闭走遮罩、左滑与系统返回。
expect(text).not.toContain('sessionDrawer.home');
- expect(text).toContain('onDismiss={persistent ? undefined : onClose}');
+ expect(text).not.toContain('onDismiss');
+ expect(text).toContain('newSessionInHeader={!persistent}');
});
it('uses the actual Home instead of maintaining a second list or data controller', () => {
diff --git a/apps/mobile/src/__tests__/sessionListDrawerUpdates.test.tsx b/apps/mobile/src/__tests__/sessionListDrawerUpdates.test.tsx
index fd704ea3e1..814cd7a20f 100644
--- a/apps/mobile/src/__tests__/sessionListDrawerUpdates.test.tsx
+++ b/apps/mobile/src/__tests__/sessionListDrawerUpdates.test.tsx
@@ -164,11 +164,12 @@ describe('shared Home drawer host', () => {
expect(container.querySelector('[data-testid="sessionDrawer.home"]')).toBeNull();
expect(container.querySelector('[data-testid="sessionDrawer.scrim"]')).toBeNull();
});
- it('uses the Home leading close action and has no home footer in the temporary panel', async () => {
+ it('keeps the Home menu in the temporary panel, puts New task in its header, and closes from the scrim', async () => {
await act(async () => root.render(<SessionListDrawer {...props} />));
expect(container.querySelector('[data-testid="sessionDrawer.home"]')).toBeNull();
- expect(native.home?.onDismiss).toBe(props.onClose);
- await act(async () => native.home?.onDismiss?.());
+ expect(native.home).not.toHaveProperty('onDismiss');
+ expect(native.home?.newSessionInHeader).toBe(true);
+ (container.querySelector('[data-testid="sessionDrawer.scrim"]') as HTMLElement).click();
expect(props.onClose).toHaveBeenCalledOnce();
});
it('keeps Home mounted while changing task, width, or drawer presentation', async () => {
diff --git a/apps/mobile/src/session/HomeSurface.tsx b/apps/mobile/src/session/HomeSurface.tsx
index 506b4cfa5c..177aa552e5 100644
--- a/apps/mobile/src/session/HomeSurface.tsx
+++ b/apps/mobile/src/session/HomeSurface.tsx
@@ -60,6 +60,7 @@ import {
Lock,
Pin,
RefreshCw,
+ SquarePen,
UsersRound,
X,
} from 'lucide-react-native';
@@ -391,8 +392,9 @@ export interface MobileHomeProps {
/** The same Home surface, constrained by its host rather than the screen width. */
width?: number;
currentSessionId?: string;
- onDismiss?: () => void;
newSessionInSystemBar?: boolean;
+ /** Temporary drawers put New task in their own header instead of floating over the short list. */
+ newSessionInHeader?: boolean;
onSelectSession?: (item: RemoteSessionListItem) => void;
runNavigation?: (action: () => void) => void;
newSessionActionRef?: MutableRefObject<(() => void) | null>;
@@ -414,7 +416,7 @@ export function MobileHome(props: MobileHomeProps) {
</RemoteSessionStoreSubscriptionGate>;
}
-function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newSessionInSystemBar = false, onSelectSession, runNavigation, newSessionActionRef }: MobileHomeProps) {
+function HomeScreenContent({ active = true, onModeChange, width, newSessionInSystemBar = false, newSessionInHeader = false, onSelectSession, runNavigation, newSessionActionRef }: MobileHomeProps) {
const ownedSharedTasks = useSharedTasks();
const [sharedCollapsed, setSharedCollapsed] = useState(false);
// The retained page and its visible sidebar must never release each other's subscriptions.
@@ -2056,6 +2058,10 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newS
candidateMode: taskSuggestionsCandidateMode,
syncing: taskSuggestionsSyncing,
});
+ // 无可控电脑时不提供入口;完整空态已有主按钮,避免重复显示新建 CTA。
+ const newSessionEntryVisible = !showRemoteGuide && !taskSuggestionsPending && taskSuggestionsMode !== 'empty';
+ // 临时任务列表抽屉的新建放在顶栏,不浮动遮挡短列表。
+ const headerNewSession = newSessionInHeader && newSessionEntryVisible;
const selectedDeviceLabel = useMemo(() => {
if (!selectedDeviceId) return t('devices.list.allConversations');
// 设备列表尚未同步回来时,用偏好里存的设备名兜底,避免冷启动表头闪占位文案。
@@ -2742,7 +2748,7 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newS
contentContainerStyle={[
styles.listContent,
{
- paddingBottom: (newSessionInSystemBar ? spacing.sm : LEGACY_HOME_LIST_BOTTOM_RESERVE) + insets.bottom,
+ paddingBottom: (newSessionInSystemBar || newSessionInHeader ? spacing.sm : LEGACY_HOME_LIST_BOTTOM_RESERVE) + insets.bottom,
paddingTop: residentList.enabled ? 0 : chromeHeight,
},
]}
@@ -2860,8 +2866,7 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newS
/>
) : null}
- {newSessionInSystemBar || showRemoteGuide || taskSuggestionsPending || taskSuggestionsMode === 'empty' ? null : (
- // 无可控电脑时不提供入口;完整空态已有主按钮,避免重复显示新建 CTA。
+ {newSessionInSystemBar || newSessionInHeader || !newSessionEntryVisible ? null : (
// iOS: the circle stretches into the new task's composer pill (origin → morph handoff).
<HomeNewTaskButton bottomInset={insets.bottom} disabled={newSessionDisabled} morph
onPress={(origin) => openNewSession(undefined, undefined, undefined, origin)} />
@@ -2909,12 +2914,13 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newS
{nativeHomeHeader ? null : (
<View onLayout={(e) => setHomeHeaderWidth(e.nativeEvent.layout.width)} style={styles.homeHeader}>
<View style={styles.headerLeadingActions}>
+ {/* 临时任务列表抽屉同样放系统菜单:关闭走遮罩、左滑和系统返回。 */}
<HomeHeaderGlassButton
- accessibilityLabel={onDismiss ? t('home.drawer.closeA11y') : t('devices.list.a11y.openMenu')}
- onPress={onDismiss ?? openChromeMenu}
+ accessibilityLabel={t('devices.list.a11y.openMenu')}
+ onPress={openChromeMenu}
testID="home.chromeMenu"
>
- <>{onDismiss ? <X color={colors.textPrimary} size={iconSize.action} strokeWidth={iconStroke.regular} /> : <Menu color={colors.textPrimary} size={iconSize.action} strokeWidth={iconStroke.regular} />}</>
+ <Menu color={colors.textPrimary} size={iconSize.action} strokeWidth={iconStroke.regular} />
</HomeHeaderGlassButton>
</View>
{showRemoteGuide ? (
@@ -2957,7 +2963,13 @@ function HomeScreenContent({ active = true, onModeChange, width, onDismiss, newS
{showRemoteGuide ? (
<View style={styles.headerActions} />
) : (
- <View style={[styles.headerActions, showHeaderRemoteDesktop && styles.headerActionsWide]}>
+ <View style={[styles.headerActions, (showHeaderRemoteDesktop || headerNewSession) && styles.headerActionsWide]}>
+ {headerNewSession ? (
+ <HomeHeaderGlassButton accessibilityLabel={t('devices.list.a11y.newRemoteConversation')} disabled={newSessionDisabled}
+ onPress={() => openNewSession()} testID="home.headerNewSessionButton">
+ <SquarePen color={colors.textPrimary} size={iconSize.action} strokeWidth={iconStroke.regular} />
+ </HomeHeaderGlassButton>
+ ) : null}
{showHeaderRemoteDesktop ? (
<HomeHeaderGlassButton accessibilityLabel={t('remoteDesktop.title')} onPress={openSelectedRemoteDesktop} testID="home.remoteDesktopButton">
<Monitor color={colors.textPrimary} size={iconSize.action} strokeWidth={iconStroke.regular} />
diff --git a/apps/mobile/src/session/SessionListDrawer.tsx b/apps/mobile/src/session/SessionListDrawer.tsx
index 4720fe5d7c..52725dcd2e 100644
--- a/apps/mobile/src/session/SessionListDrawer.tsx
+++ b/apps/mobile/src/session/SessionListDrawer.tsx
@@ -188,8 +188,9 @@ export function SessionListDrawer({ currentSessionId, persistent = false, newSes
<Animated.View style={[styles.panel, { paddingLeft: insets.left, paddingTop: insets.top, width: panelWidth },
!persistent && panelStyle]} testID="sessionDrawer.panel">
<View ref={homeContentRef} style={styles.content}>
- <MobileHome onDismiss={persistent ? undefined : onClose} newSessionActionRef={newSessionActionRef} width={width} currentSessionId={currentSessionId}
- newSessionInSystemBar={newSessionInSystemBar} onSelectSession={onSelectSession} runNavigation={runNavigation} />
+ <MobileHome newSessionActionRef={newSessionActionRef} width={width} currentSessionId={currentSessionId}
+ newSessionInSystemBar={newSessionInSystemBar} newSessionInHeader={!persistent}
+ onSelectSession={onSelectSession} runNavigation={runNavigation} />
</View>
</Animated.View>
diff --git a/apps/mobile/src/session/useSessionHeaderHeight.ts b/apps/mobile/src/session/useSessionHeaderHeight.ts
index b7f06ef9cd..45a0c93772 100644
--- a/apps/mobile/src/session/useSessionHeaderHeight.ts
+++ b/apps/mobile/src/session/useSessionHeaderHeight.ts
@@ -1,4 +1,4 @@
-import { useLayoutEffect, useState, useCallback } from 'react';
+import { useLayoutEffect, useRef, useState, useCallback } from 'react';
import { useFocusEffect, useNavigation } from 'expo-router';
import { useHeaderHeight } from 'expo-router/react-navigation';
@@ -10,8 +10,18 @@ type HeaderNavigation = {
addListener(event: 'transitionEnd', callback: (event: { data: { closing: boolean } }) => void): () => void;
};
-export function useSessionHeaderHeight(geometryKey: string): number {
+/**
+ * `hold`: the system bar is temporarily hidden; keep the last visible height and do not cache.
+ * The bar is restored after `hold` clears, so the hidden measurement can outlive it by a render:
+ * keep holding until the native height moves off the value observed while hidden.
+ */
+export function useSessionHeaderHeight(geometryKey: string, hold = false): number {
const nativeHeight = useHeaderHeight();
+ const heldHeight = useRef<number | null>(null);
+ const hiddenNativeHeight = useRef<number | null>(null);
+ if (hold) hiddenNativeHeight.current = nativeHeight;
+ else if (hiddenNativeHeight.current !== null && hiddenNativeHeight.current !== nativeHeight) hiddenNativeHeight.current = null;
+ const holding = hold || hiddenNativeHeight.current !== null;
const navigation = useNavigation<HeaderNavigation>();
const [settled, setSettled] = useState(false);
useFocusEffect(useCallback(() => {
@@ -21,10 +31,12 @@ export function useSessionHeaderHeight(geometryKey: string): number {
return () => { unsubscribe(); setSettled(false); };
}, [navigation]));
useLayoutEffect(() => {
- if (!settled || nativeHeight <= 0 || !Number.isFinite(nativeHeight)) return;
+ if (holding || !settled || nativeHeight <= 0 || !Number.isFinite(nativeHeight)) return;
measuredHeights.delete(geometryKey);
measuredHeights.set(geometryKey, nativeHeight);
while (measuredHeights.size > 8) measuredHeights.delete(measuredHeights.keys().next().value!);
- }, [settled, geometryKey, nativeHeight]);
- return !settled ? measuredHeights.get(geometryKey) ?? nativeHeight : nativeHeight;
+ }, [holding, settled, geometryKey, nativeHeight]);
+ const height = !settled ? measuredHeights.get(geometryKey) ?? nativeHeight : nativeHeight;
+ if (!holding) heldHeight.current = height;
+ return heldHeight.current ?? height;
}
diff --git a/docs/design-evidence/iphone-duo-adaptation.md b/docs/design-evidence/iphone-duo-adaptation.md
index 2e6badf68f..83ddcdfa9e 100644
--- a/docs/design-evidence/iphone-duo-adaptation.md
+++ b/docs/design-evidence/iphone-duo-adaptation.md
@@ -302,3 +302,11 @@ Metro 会静态解析所有 region 分支,即使运行 Global,也需要本
- Duo 外屏竖屏实测六个不同任务,第六个打开后捕获历史控制器淘汰;重进最早任务捕获有效磁盘快照命中(20 项),正文正常显示。重进最近任务、展开横屏侧栏往返没有新增磁盘命中。此轮未做逐帧动画分析、断网实机测试或其他设备验收。
- 实测发现并修复磁盘 IO 清理错误:Expo File.moveSync 会更新源对象 URI,finally 删除源对象实际删除了正式快照。现在只清理原始临时 URI。模拟器确认快照和索引真实保留;新增回归覆盖移动成功、写入失败、移动失败。
- 63 项相关测试、Mobile 类型检查通过。测试覆盖淘汰后的离线磁盘恢复;不等同于模拟器断网验收。临时诊断日志已移除。
+
+## 横屏临时任务侧栏与系统栏(2026-10-02)
+
+- 问题:iPhone 横屏等宽而不高的窗口(宽 ≥ 600、未达常驻条件)使用临时任务侧栏,它在页面树内靠 zIndex 覆盖;聊天页 iOS 系统栏位于 RN 内容之上,返回、标题和右侧操作叠在侧栏顶部并遮挡其按钮,也不随遮罩变暗。iPad 窄窗口(mini 竖屏、分屏、台前调度)同属此路径。
+- 曾试过把侧栏放进 `FullWindowOverlay`:该层总被提到窗口最前,侧栏自身弹出的选项面板、改名弹窗和下拉菜单会被挡在其后,已放弃。
+- 现行做法:临时侧栏存续期间收起聊天页系统栏,关闭完成后恢复。`Stack.Toolbar` 左右栏会强制 `headerShown: true`,收起期间整组不渲染。正文沿用打开前的顶栏高度,收起期间的高度不写入几何缓存。
+- 按用户决定:临时侧栏左上角与常驻侧栏、首页一致为系统菜单(替代 2026-09-20「左上角提供关闭操作」);关闭走遮罩、左滑和选择任务。新建任务从底部浮动按钮移到侧栏顶栏,不再遮挡短列表;常驻侧栏与首页的新建入口不变。选中行高亮保持在安全区内侧,不铺到屏幕边缘。
+- 目检:Global iPhone Air iOS 27.0 横屏,侧栏顶部控件完整可见、遮罩下正文位置不变,关闭后系统栏完整恢复(辅助功能触发关闭)。新建按钮新位置、侧栏内菜单入口及其弹层本轮未由 AI 实点验证(Device Hub 不接收合成点击);iOS 27.1 竖向系统栏(`barEdge`)未处理也未验证。