diff --git a/apps/mobile/README.md b/apps/mobile/README.md index 35811d263b..3ba7461d97 100644 --- a/apps/mobile/README.md +++ b/apps/mobile/README.md @@ -33,6 +33,8 @@ MOBILE_LIVE_HOST_URL='http://127.0.0.1:/?token=' pnpm vitest run ap pnpm --filter @botharness/mobile export # Metro bundles for iOS and Android ``` +For first-DM visibility, working-indicator ordering and reply scrolling, use the [first-reply regression checks](../../docs/agents/mobile-first-reply.md) ([中文](../../docs/agents/mobile-first-reply.zh.md)). The guide separates source coverage from queued iOS/Android acceptance. + ## Full client in the app Every native screen can offer "Open full client" (`src/ui/open-full-client.tsx`), which opens `app/full-client.tsx` as a full-screen modal with no header bar; a draggable floating exit button (`src/ui/floating-exit.tsx`) that snaps to either side edge leaves it, and holding it shows an "Exit web mode" tooltip. It loads `/botharness-device/web/` in a WebView on the route the native screens are using and sends the device credential as a header only on that first load; the Host answers with a session cookie scoped to that directory ([ADR-0199](../../docs/adr/0199-paired-devices-reach-the-host-through-a-same-listener-device-gateway.md#full-web-client-in-the-app-1654)). The target (`home`, a PersonaBot DM, or a private input request) becomes a hash the Web Client reads to land there. Links that leave the Host's web directory open in the system browser. When the Host refuses the device, the modal shows "Pair again" instead of the page. `react-native-webview` is native code, so a development build made before this change must be rebuilt. diff --git a/apps/mobile/test/conversation-streaming-rows.test.tsx b/apps/mobile/test/conversation-streaming-rows.test.tsx index 7c53953401..ea57339e9b 100644 --- a/apps/mobile/test/conversation-streaming-rows.test.tsx +++ b/apps/mobile/test/conversation-streaming-rows.test.tsx @@ -1,7 +1,13 @@ // @vitest-environment jsdom import { act, type ReactNode } from 'react'; import { createRoot } from 'react-dom/client'; -import { expect, it, vi } from 'vitest'; +import type { + FlatListProps, + LayoutChangeEvent, + NativeScrollEvent, + NativeSyntheticEvent, +} from 'react-native'; +import { afterEach, beforeEach, expect, it, vi } from 'vitest'; import type { RosterBot } from '../src/host/client'; import type { ConversationTimelineSnapshot } from '../src/host/conversation'; @@ -16,21 +22,29 @@ const state = vi.hoisted(() => ({ })); const counts = vi.hoisted(() => ({ renderItem: 0, rows: new Map() })); +const native = vi.hoisted(() => ({ + list: undefined as FlatListProps | undefined, + scrollToOffset: vi.fn(), +})); const stream = vi.hoisted(() => { const timelineListeners = new Set<() => void>(); const bubbleListeners = new Map void>>(); const bubbles = new Map(); - const history = (id: string, body: string, author: 'bot' | 'human') => ({ + const history = ( + id: string, + body: string, + author: 'bot' | 'human', + ): ConversationTimelineSnapshot['messages'][number] => ({ id, at: '2026-10-19T08:00:00Z', author, - bot: author === 'bot' ? 'ada' : undefined, + ...(author === 'bot' ? { bot: 'ada' } : {}), body, attachments: [], delivery: 'committed', }); - const timeline = { + let timeline: ConversationTimelineSnapshot = { status: 'live', messages: [history('m1', 'question', 'human'), history('m2', 'earlier answer', 'bot')], drafts: [{ draftId: 'd1', botSlug: 'ada' }], @@ -39,9 +53,22 @@ const stream = vi.hoisted(() => { fromCache: false, }; return { - conversation: { loadOlder: () => Promise.resolve() }, + history, + publish(next: Partial) { + timeline = { ...timeline, ...next }; + for (const listener of timelineListeners) listener(); + }, + reset() { + bubbles.clear(); + timeline = { + ...timeline, + messages: [history('m1', 'question', 'human'), history('m2', 'earlier answer', 'bot')], + drafts: [{ draftId: 'd1', botSlug: 'ada' }], + }; + }, + conversation: { loadOlder: () => Promise.resolve(), send: vi.fn() }, playback: { - getTimelineSnapshot: () => timeline as unknown as ConversationTimelineSnapshot, + getTimelineSnapshot: () => timeline, subscribe(listener: () => void) { timelineListeners.add(listener); return () => timelineListeners.delete(listener); @@ -68,7 +95,10 @@ vi.mock('../src/ui/shell/recent-chats', () => ({ chatHref: () => '', useRecentChat: () => () => {}, })); -vi.mock('../src/host/native-source-drafts', () => ({ useSourceDraft: () => ['', () => {}] })); +vi.mock('../src/host/native-source-drafts', async () => { + const { useState } = await import('react'); + return { useSourceDraft: () => useState('') }; +}); vi.mock('expo-router', () => ({ useIsFocused: () => true, Stack: { @@ -93,15 +123,40 @@ vi.mock('react-native', async () => { }); vi.mock('react-native-reanimated', async () => { const shim = await import('./reanimated-shim'); - const FlatList = (props: Parameters[0]) => - shim.default.FlatList({ + const { useLayoutEffect, useMemo } = await import('react'); + const FlatList = ( + props: Parameters[0] & + FlatListProps & { + ref: (node: unknown) => void; + }, + ) => { + native.list = props; + useLayoutEffect(() => { + props.ref({ scrollToOffset: native.scrollToOffset }); + return () => props.ref(null); + }, [props.ref]); + return shim.default.FlatList({ ...props, renderItem: (info) => { counts.renderItem += 1; return props.renderItem(info); }, }); - return { ...shim, default: { ...shim.default, FlatList } }; + }; + return { + ...shim, + useAnimatedRef: () => + useMemo(() => { + const ref = Object.assign( + (node: unknown) => { + ref.current = node; + }, + { current: null as unknown }, + ); + return ref; + }, []), + default: { ...shim.default, FlatList }, + }; }); vi.mock('react-native-worklets', () => ({ scheduleOnRN: (callback: () => void) => callback() })); vi.mock('../src/host/host-session', async () => { @@ -185,7 +240,18 @@ vi.mock('../src/ui/chat/activity-row', () => ({ ActivityRow: () => null })); vi.mock('../src/ui/chat/question-card', () => ({ QuestionCard: () => null })); vi.mock('../src/ui/chat/channel-title', () => ({ ChannelTitle: () => null })); vi.mock('../src/ui/chat/chat-title', () => ({ ChatTitle: () => null })); -vi.mock('../src/ui/chat/composer', () => ({ Composer: () => null })); +vi.mock('../src/ui/chat/composer', () => ({ + Composer: ({ onChange, onSend }: { onChange(value: string): void; onSend(): void }) => ( + <> + + + + ), +})); vi.mock('../src/ui/chat/image-viewer', () => ({ ImageViewer: () => null })); vi.mock('../src/ui/chat/jump-to-latest', () => ({ JumpToLatest: () => null })); vi.mock('../src/ui/chat/pull-to-compose-hint', () => ({ PullToComposeHint: () => null })); @@ -228,6 +294,35 @@ import { ConversationScreen } from '../src/ui/chat/conversation-screen'; Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true }); +let frames = new Map(); +let nextFrame = 0; +beforeEach(() => { + frames = new Map(); + nextFrame = 0; + vi.stubGlobal('requestAnimationFrame', (callback: FrameRequestCallback) => { + frames.set(++nextFrame, callback); + return nextFrame; + }); + vi.stubGlobal('cancelAnimationFrame', (id: number) => frames.delete(id)); + native.list = undefined; + native.scrollToOffset.mockClear(); + stream.conversation.send.mockClear(); + stream.reset(); + state.host.roster.bots = []; + counts.rows.clear(); + counts.renderItem = 0; +}); +afterEach(() => vi.unstubAllGlobals()); + +const flushFrames = () => + act(() => { + for (let round = 0; round < 64 && frames.size; round += 1) { + const pending = [...frames.values()]; + frames.clear(); + for (const callback of pending) callback(round * 16); + } + }); + it('re-renders only the streaming row when a draft token arrives', async () => { const container = document.createElement('div'); document.body.append(container); @@ -257,3 +352,144 @@ it('re-renders only the streaming row when a draft token arrives', async () => { await act(async () => root.unmount()); container.remove(); }); + +it('keeps a first DM visible through send, working, streaming and commit, then respects history browsing', () => { + const bot: RosterBot = { + slug: 'ada', + displayName: 'Ada', + state: 'idle', + description: '', + roles: [], + computerAccess: false, + browserAccess: false, + paused: false, + }; + state.host.roster.bots = [bot]; + stream.publish({ messages: [], drafts: [] }); + const container = document.createElement('div'); + document.body.append(container); + const root = createRoot(container); + const render = () => + act(() => + root.render(), + ); + const visible = () => expect(native.list?.style).toMatchObject({ opacity: 1 }); + const rows = () => + [...container.querySelectorAll('[data-testid="chat-list"] [data-testid]')].map((node) => + node.getAttribute('data-testid'), + ); + const scrollEvent = (offset: number, content: number): NativeSyntheticEvent => + ({ + nativeEvent: { + contentOffset: { x: 0, y: offset }, + contentSize: { width: 390, height: content }, + layoutMeasurement: { width: 390, height: 800 }, + velocity: { x: 0, y: 0 }, + contentInset: { top: 80, bottom: 0, left: 0, right: 0 }, + zoomScale: 1, + }, + }) as NativeSyntheticEvent; + try { + render(); + act(() => { + native.list?.onLayout?.({ nativeEvent: { layout: { height: 800 } } } as LayoutChangeEvent); + native.list?.onContentSizeChange?.(390, 720); + }); + flushFrames(); + visible(); + expect(native.scrollToOffset).toHaveBeenLastCalledWith({ offset: -80, animated: false }); + expect(native.list?.maintainVisibleContentPosition).toBeUndefined(); + + const press = (label: string) => + act(() => { + const button = [...container.querySelectorAll('button')].find( + (node) => node.textContent === label, + ); + expect(button).toBeDefined(); + button!.click(); + }); + press('Write question'); + press('Send question'); + expect(stream.conversation.send).toHaveBeenCalledOnce(); + expect(stream.conversation.send.mock.calls[0]?.[0]).toBe('What is six times seven?'); + const human = stream.history('first-human', 'What is six times seven?', 'human'); + act(() => stream.publish({ messages: [human] })); + visible(); + expect(rows()).toEqual(['first-human']); + + state.host.roster.bots = [{ ...bot, state: 'thinking' }]; + render(); + expect(container.querySelector('[data-testid="pending"]')).not.toBeNull(); + expect(container.querySelector('[data-testid="chat-list"] [data-testid="pending"]')).toBeNull(); + visible(); + act(() => stream.publish({ drafts: [{ draftId: 'first', botSlug: 'ada' }] })); + act(() => stream.append('draft:first', '42')); + expect(rows()).toEqual(['first-human', 'draft:first']); + expect(container.querySelector('[data-testid="draft:first"]')?.textContent).toBe('42'); + visible(); + expect(native.list?.maintainVisibleContentPosition).toBeUndefined(); + + const reply = stream.history('first-reply', '42', 'bot'); + act(() => stream.publish({ messages: [human, reply], drafts: [] })); + visible(); + expect(rows()).toEqual(['first-human', 'first-reply']); + expect(container.querySelector('[data-testid="pending"]')).not.toBeNull(); + state.host.roster.bots = [bot]; + render(); + expect(container.querySelector('[data-testid="pending"]')).toBeNull(); + visible(); + + act(() => native.list?.onContentSizeChange?.(390, 1100)); + flushFrames(); + expect(native.scrollToOffset).toHaveBeenLastCalledWith({ offset: 300, animated: false }); + native.scrollToOffset.mockClear(); + act(() => { + native.list?.onScrollBeginDrag?.(scrollEvent(300, 1100)); + native.list?.onScroll?.(scrollEvent(100, 1100)); + native.list?.onScrollEndDrag?.(scrollEvent(100, 1100)); + }); + expect(native.list?.maintainVisibleContentPosition).toEqual({ minIndexForVisible: 0 }); + act(() => + stream.publish({ messages: [human, reply, stream.history('later', 'Later reply', 'bot')] }), + ); + act(() => native.list?.onContentSizeChange?.(390, 1400)); + flushFrames(); + expect(native.scrollToOffset).not.toHaveBeenCalled(); + visible(); + + act(() => { + native.list?.onScrollBeginDrag?.(scrollEvent(100, 1400)); + native.list?.onScrollEndDrag?.(scrollEvent(600, 1400)); + }); + expect(native.list?.maintainVisibleContentPosition).toBeUndefined(); + act(() => native.list?.onContentSizeChange?.(390, 1500)); + flushFrames(); + expect(native.scrollToOffset).toHaveBeenLastCalledWith({ offset: 700, animated: false }); + } finally { + act(() => root.unmount()); + container.remove(); + } +}); + +it('keeps a known-empty DM visible when the first message arrives from another client without a size change', () => { + stream.publish({ messages: [], drafts: [] }); + const container = document.createElement('div'); + const root = createRoot(container); + try { + act(() => + root.render(), + ); + act(() => { + native.list?.onLayout?.({ nativeEvent: { layout: { height: 800 } } } as LayoutChangeEvent); + native.list?.onContentSizeChange?.(390, 720); + }); + flushFrames(); + act(() => stream.publish({ messages: [stream.history('remote-human', 'Hello', 'human')] })); + expect(native.list?.style).toMatchObject({ opacity: 1 }); + expect(container.querySelector('[data-testid="remote-human"]')?.textContent).toBe('Hello'); + expect(native.list?.maintainVisibleContentPosition).toBeUndefined(); + expect(stream.conversation.send).not.toHaveBeenCalled(); + } finally { + act(() => root.unmount()); + } +}); diff --git a/changes/2521-mobile-first-reply-verification.md b/changes/2521-mobile-first-reply-verification.md new file mode 100644 index 0000000000..3fa32ce030 --- /dev/null +++ b/changes/2521-mobile-first-reply-verification.md @@ -0,0 +1,11 @@ +--- +section: Documentation +--- + +## en + +- Documented how to distinguish first-DM visibility, reply scrolling and working-indicator regressions, with a non-Connect native verification journey and explicit source-test limits ([#2521](https://github.com/BotHarness/DeepSeekBot/issues/2521), [English](../docs/agents/mobile-first-reply.md), [中文](../docs/agents/mobile-first-reply.zh.md)). + +## zh + +- 补充首次私信可见性、回复滚动及工作状态行回归的区分方法,提供非 Connect 路由的原生验收流程,并明确源码测试的验证边界([#2521](https://github.com/BotHarness/DeepSeekBot/issues/2521)、[English](../docs/agents/mobile-first-reply.md)、[中文](../docs/agents/mobile-first-reply.zh.md))。 diff --git a/docs/agents/mobile-first-reply.md b/docs/agents/mobile-first-reply.md new file mode 100644 index 0000000000..2d51fa3daa --- /dev/null +++ b/docs/agents/mobile-first-reply.md @@ -0,0 +1,43 @@ +# Mobile first-reply regression checks + +[中文](mobile-first-reply.zh.md) + +Use this journey for [#2521](https://github.com/BotHarness/DeepSeekBot/issues/2521): a new Bot DM must stay visible, keep the working indicator below the Human's message and reveal the reply above the composer while following the bottom. Reading history must retain the Human's position. + +## Establish the baseline + +Record the exact app source SHA, native binary provenance, Host SHA, device/OS, appearance, system text size and route class. Start with loopback on a Simulator/emulator or Tailscale HTTPS on a phone. Keep addresses and credentials private. A successful Connect request or the absence of a reconnect banner does not establish native rendering correctness. + +These fixes are already on main; verify the tested build contains them before diagnosing another regression: + +| Symptom | Existing change | Still needs native observation | +| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| Working indicator above the Human's message in a short DM | [#2510](https://github.com/BotHarness/DeepSeekBot/pull/2510), `72794500f1ed`: clamps the overlay shift when the initial scroll offset is stale | Actual indicator bounds before the first native scroll event, with keyboard open | +| First message makes the DM blank; short reply moves under composer | [#2490](https://github.com/BotHarness/DeepSeekBot/pull/2490), `3d09057811ae`: latches empty-list visibility, reveals on send, and enables visible-position preservation only during history browsing | List opacity, native visible-position behavior and composer clearance | +| Opening history visibly chases the bottom or loads older pages | [#2514](https://github.com/BotHarness/DeepSeekBot/pull/2514), `50df2a3a9c81`: waits for stable layout and gates older-page loading on a drag | Native batch layout and initial scroll behavior | + +[#2484](https://github.com/BotHarness/DeepSeekBot/pull/2484) reverted iOS per-block Markdown from [#2463](https://github.com/BotHarness/DeepSeekBot/pull/2463). A blank Markdown body during a long stream is distinct from an entire list hidden after its first DM. [#2515](https://github.com/BotHarness/DeepSeekBot/issues/2515) describes missing DM content against a long-running Host; do not label missing timeline delivery an opacity bug. + +## Source regression loop + +```sh +pnpm exec vitest run apps/mobile/test/conversation-streaming-rows.test.tsx apps/mobile/test/follow-latest-gestures.test.tsx apps/mobile/test/follow-latest.test.tsx --maxWorkers=2 +``` + +The component test mounts the real `ConversationScreen` and `useFollowLatest`. Its injected timeline and native-list boundary cover empty → send → Human message → working → streaming → commit, including a working state that clears after the commit. A separate case receives the first message from another client without a local send or a size change. Assertions check chronological message rows, list visibility, the working indicator's separate overlay, scroll requests after growth, and history hold/resume. + +The test deliberately omits content-size events while a short chat retains its minimum height. It supplies measured growth only when content exceeds the viewport. The hook suite covers batched layout, drag/momentum ownership and settling; the pure anchor test covers the initial stale offset. These tests do **not** render native Markdown, execute Reanimated on the UI thread, measure keyboard clearance, test transport or prove an on-device fix. + +## Queued native journey + +Follow [shared device QA](device-qa.md) and [Windows Android QA](android-device-qa.md). Submit an exact-head request; only the assigned runner starts a device, build, Metro or QA Host. Coordinate with the [existing iOS reproduction owner](https://github.com/BotHarness/DeepSeekBot/issues/2521#issuecomment-6319419311) before adding a duplicate Mac run. An unconfirmed runner is not an abandoned claim. + +1. On the assigned isolated Host, create a neutral Bot with an empty DM. Confirm the non-Connect route and working model. Begin recording before opening the DM. +2. Focus `composer-input`, type a uniquely marked short question and activate `composer-send`. Capture Human first, working below, then a short reply such as `42` above the composer. Record through commit and the later idle state; the list must never blank or require reopening. +3. Repeat with a new Bot and a reply long enough to exceed the viewport. While at the bottom, verify streamed growth and the committed tail stay visible. With keyboard open, grow a multiline draft, dismiss/reopen the keyboard and verify the draft and reachable send action. +4. During another long reply, drag upward into history. Retain the reading position through growth and commit. Return deliberately to the bottom or use Jump to latest; the next growth must follow again. +5. Correlate the visible Human/reply with the Host's canonical Channel timeline. On failure, preserve the recording, accessibility snapshot, screen bounds and relevant redacted diagnostics **before** reopening or restarting. Record whether rows arrived, whether the list was hidden, whether only Markdown blanked, and whether the Human had left following mode. Investigate transport only when route comparison or delivery evidence warrants it. + +Full acceptance needs iOS Simulator **and physical iPhone**, plus Android, with recordings and light/dark captures. Follow [mobile system-text acceptance](../../apps/mobile/DESIGN.md#system-text-and-large-text-acceptance): default/intermediate/maximum size and live resizing for the affected chat/composer flow. Capture matched baseline/head states; disclose unavailable lanes, failed model requests and missing native compatibility separately. + +Report **passed / failed / blocked / unrun** per case, exact source/batch/binary identities, action, visible result, canonical Host fact and redacted evidence links. Source tests, native acceptance and Human QA are separate results. Green tests alone cannot close #2521. diff --git a/docs/agents/mobile-first-reply.zh.md b/docs/agents/mobile-first-reply.zh.md new file mode 100644 index 0000000000..4d020ae484 --- /dev/null +++ b/docs/agents/mobile-first-reply.zh.md @@ -0,0 +1,43 @@ +# 手机首次回复回归检查 + +[English](mobile-first-reply.md) + +本流程用于 [#2521](https://github.com/BotHarness/DeepSeekBot/issues/2521):新 Bot 私信应始终可见,工作状态行位于用户消息下方;跟随底部时,回复应显示在输入框上方。浏览历史时,应保留用户的阅读位置。 + +## 确认基线 + +记录应用源码 SHA、原生安装包来源、Host SHA、设备与系统、明暗主题、系统字号和路由类别。先用模拟器的 loopback 或手机的 Tailscale HTTPS,地址和凭据只留在本地。Connect 请求成功或没有重连提示,都不能证明原生渲染正常。 + +main 已包含以下修复;诊断新回归前,应确认被测安装包包含它们: + +| 症状 | 已有修复 | 仍需原生观察 | +| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| 短私信的工作状态行出现在用户消息上方 | [#2510](https://github.com/BotHarness/DeepSeekBot/pull/2510),`72794500f1ed`:限制初始滚动偏移尚未更新时的浮层位移 | 首次原生滚动事件前、键盘打开时的实际边界 | +| 首条消息后私信空白;短回复被输入框挡住 | [#2490](https://github.com/BotHarness/DeepSeekBot/pull/2490),`3d09057811ae`:保留空列表可见状态,发送时显示列表,仅浏览历史时保持可见行位置 | 列表透明度、原生位置保持行为及输入框遮挡 | +| 打开历史后一路追到底部或自动加载旧消息 | [#2514](https://github.com/BotHarness/DeepSeekBot/pull/2514),`50df2a3a9c81`:等待布局稳定,用户拖动后才允许加载旧消息 | 原生分批布局和初始滚动行为 | + +[#2484](https://github.com/BotHarness/DeepSeekBot/pull/2484) 回退了 [#2463](https://github.com/BotHarness/DeepSeekBot/pull/2463) 的 iOS 分块 Markdown。长回复中的 Markdown 短暂空白,与首次私信后整个列表隐藏是不同问题。[#2515](https://github.com/BotHarness/DeepSeekBot/issues/2515) 记录了长时间运行的 Host 下私信内容缺失;不要把未收到时间线误判为透明度问题。 + +## 源码回归检查 + +```sh +pnpm exec vitest run apps/mobile/test/conversation-streaming-rows.test.tsx apps/mobile/test/follow-latest-gestures.test.tsx apps/mobile/test/follow-latest.test.tsx --maxWorkers=2 +``` + +组件测试挂载真实的 `ConversationScreen` 和 `useFollowLatest`,在时间线和原生列表边界注入数据,覆盖空私信 → 发送 → 用户消息 → 工作状态 → 流式回复 → 提交,并让工作状态晚于提交结束。另一用例从其他客户端收到首条消息,不触发本地发送或尺寸变化。断言检查消息顺序、列表可见性、独立的工作状态浮层、内容增长后的滚动请求,以及浏览历史后的保持与恢复。 + +短对话维持最小高度时,测试故意不发送内容尺寸事件;超出视口后才提供增长尺寸。hook 测试覆盖分批布局、拖动与惯性滚动归属及稳定过程;纯函数测试覆盖初始偏移未更新的状态。这些测试**不能**验证原生 Markdown、UI 线程的 Reanimated、键盘遮挡、传输链路或设备上的修复效果。 + +## 排队执行原生验收 + +遵循[共享设备 QA](device-qa.md)和 [Windows Android QA](android-device-qa.md)。提交准确 head 的请求,只有指定 runner 才能启动设备、构建、Metro 或 QA Host。先与[已有 iOS 复现负责人](https://github.com/BotHarness/DeepSeekBot/issues/2521#issuecomment-6319419311)协调,避免重复 Mac 检查;无法确认 runner 不代表原任务已放弃。 + +1. 在分配的隔离 Host 中创建无历史消息的中性测试 Bot,确认非 Connect 路由和可用模型。打开私信前开始录屏。 +2. 聚焦 `composer-input`,输入带唯一标记的简短问题,点击 `composer-send`。记录用户消息在前、工作状态在下、短回复(如 `42`)在输入框上方。持续录到提交及恢复空闲;不得出现整页空白或需要重新打开。 +3. 换一个新 Bot,要求足够长的回复。停留底部时,流式增长及最终回复尾部应可见。打开键盘,输入多行草稿,关闭并重新打开键盘,确认草稿保留、发送按钮可达。 +4. 再次生成长回复时向上拖动浏览历史。增长和提交不能抢走阅读位置。主动回到底部或点击跳到最新消息后,后续增长应恢复跟随。 +5. 将屏幕上的用户消息及回复与 Host 的规范 Channel 时间线对应。失败时,**先**保存录屏、无障碍快照、边界和脱敏诊断,再重开或重启。区分消息是否到达、列表是否隐藏、是否仅 Markdown 空白、用户是否离开跟随状态。只有路由对比或投递证据支持时,才扩大到传输调查。 + +完整验收要求 iOS 模拟器、实体 iPhone 和 Android 的录屏及明暗截图。受影响的聊天和输入框还需遵循[系统字号验收](../../apps/mobile/DESIGN.md#system-text-and-large-text-acceptance):默认、中等放大、最大字号及实时缩放。基线与 head 的截图状态应一致;设备不可用、模型请求失败、原生依赖兼容性未确认要分别说明。 + +每个用例记录**通过/失败/阻塞/未运行**,附准确源码、batch、安装包身份、操作、可见结果、规范 Host 事实和脱敏证据链接。源码测试、原生验收和人工 QA 分别报告;测试通过不足以关闭 #2521。