Repository navigation
fix(mobile): Android 会话编辑框保留横向拖动 - #5536
DoodleBears wants to merge 1 commit into
Conversation
Issue: #5511 Agent-Task: codex/local/01a21920-ec15-73a2-bea4-e4a0b53eb44f
Pre-merge checks:
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Product Terms Follow The Glossary | Checked the PR description (in scope per the check) and the PR commit d266d74, which changes .agents/skills/verify-deepseekbot/features/phone-sessions-navigation.md, SessionDrawerContentGate.kt… |
Edit the PR description (the check covers it; the diff's doc and code changes need no edit): - Replace "消息列表" with "会话时间线" (Conversation Timeline). Example: "Android Session 的编辑框浮在会话时间线上方" or, with the English term, "Android Session 的 Compo… |

Passed checks: 3 passed
-
Check name Status Explanation Fix Targets The Root Cause The check applies because the PR title starts with "fix(mobile):". Root cause is changed in the owning module. Commit d266d74 changes SessionDrawerContentGate.kt, the module that owns the lea…Consistent With Adrs And Existing Features The PR is a single commit (d266d74) on top of abbd9dd. Its diff touches SessionDrawerContentGate.kt and its Robolectric test, plus one verify-skill feature note. It changes nothing under docs/decisi… Touched Features Are Verified Summary: The PR touches one mapped feature, phone-sessions-navigation, and its verification notes name a run of that feature's journey. The check passes. Scope. The PR headd266d740e1sits…Full details: Fix Targets The Root Cause
-
Explanation
The check applies because the PR title starts with "fix(mobile):". Root cause is changed in the owning module. Commit d266d74 changes
SessionDrawerContentGate.kt, the module that owns the leading-edge drawer gesture decision. The oldhorizontalScrollerAtwalked children in tree order and returned the first horizontal scroller it found. It did not account for a composerEditTextdrawn on top of a wide code block or table. The new code replaces it withtopmostViewAt, which resolves the hit view by z-order andPointerEvents.horizontalScrollerAtthen returnsnullwhen the topmost hit is anEditText. It also checksisShownand the scroll offset again when the touch slop is crossed. This corrects the hit-test logic. It does not special-case a caller. No symptom masking. The diff adds no retry, timeout, catch-and-ignore, or hiding flag. It does not duplicate the logic beside the faulty module. Regression test named. The PR description namescomposerRetainsHorizontalDragOverLeadingEdgeScroller. That test exists inSessionDrawerContentGateTest.kt(line 103). It drives anACTION_DOWNandACTION_MOVEover a composer overlay and asserts the drawer receives no events. The description says the test receivesACTION_CANCELon the#5526implementation andACTION_MOVEafter this fix. The description also includes a "No regression test" note for the Vitest-only gate. That note does not reduce the result, because the Android test is named and present. Every condition for the check is met.
Full details: Consistent With Adrs And Existing Features
-
Explanation
The PR is a single commit (d266d74) on top of abbd9dd. Its diff touches SessionDrawerContentGate.kt and its Robolectric test, plus one verify-skill feature note. It changes nothing under docs/decisions/. The check applies because the PR changes gesture behaviour. ADR consistency: the only ADR text on this behaviour is docs/decisions/mobile-ui.md §43 (Amended by
#5255). It says "a rightward swipe anywhere on a Drawer-style Session root opens it" and that Android hands the gesture to Compose ModalNavigationDrawer. The repository uses a custom SessionDrawerContentGate view for this gesture instead; that mismatch predates this PR. The PR narrows "anywhere" in one case: a rightward drag over an editor on a leading-edge scroller no longer opens the drawer. The parent code already excluded EditText from drawer-opening targets, so the PR extends an existing exclusion. The ADR records no decision that composer overlays must open the drawer. §5 of the same ADR says native components own gestures where delegated; the PR keeps gesture ownership in the existing native gate. Duplication: the PR modifies the existing dismissible-drawer module and adds topmostViewAt, a z-ordered hit test, inside the same gate file. It does not add a second implementation of a capability another module provides. EndSheetView.kt has its own horizontalTarget for the profile sheet, but that predates this PR. No shared hit-test utility exists in the mobile modules. Residual risk: the "anywhere" wording in mobile-ui.md §43 no longer matches the composer-over-scroller case. A maintainer may want to amend that sentence. The failure condition is not met.
Full details: Touched Features Are Verified
-
Explanation
Summary: The PR touches one mapped feature,
phone-sessions-navigation, and its verification notes name a run of that feature's journey. The check passes. Scope. The PR headd266d740e1sits on top of the mergeabbd9dd0a3(PR#5526). The branch is 253 commits ahead oforigin/main. I used the changes this fix carries: thed266commit (3 files) and the#5526content it builds on. These are in the diff fromabbd9dd0a3tod266d740e1, plus the#5526merge diff. Older commits on the branch that touch other features, such asphone-composer(composer.tsx, from216123089d), are not part of this fix. They are outside the scope I assessed. Feature mapping. Matching the## Sourcesglobs of every feature file against the changed files: -phone-sessions-navigation.mdSources includeapps/mobile/modules/dismissible-drawer/.../SessionDrawer{View,ContentGate}.ktandapps/mobile/src/features/sessions/session-drawer.android.tsx. -SessionDrawerContentGate.kt(runtime) changed ind266andsession-drawer.android.tsxchanged in#5526. TheSessionDrawerContentGateTest.ktandapps/mobile/test/session-drawer-android.test.tsxchanges are test-only. - No other feature's Sources match the PR's own changed files. Verification notes. The PR description names a run of the feature's journey. Journey step 7 inphone-sessions-navigation.mdcovers a wide block behind the Composer with a horizontal drag. The PR's Pixel 7 API 36 run covers: - Dragging the text selection handle over a wide code block under the Composer. The selection grew, and the drawer stayed closed. - Dragging from the leading edge of a code block or table. The drawer opened, and Back closed it. - Dragging a scrolled block back to the leading edge within one gesture. The drawer stayed closed until the finger lifted, then reopened. The notes also list Robolectric tests for the same cases and passing Android, Vitest, lint, and build results. Conclusion. The mapped feature's runtime code changed, and the verification notes name a run of its journey. The check does not fail.
-
Full details: Product Terms Follow The Glossary
-
Explanation
Checked the PR description (in scope per the check) and the PR commit d266d74, which changes
.agents/skills/verify-deepseekbot/features/phone-sessions-navigation.md,SessionDrawerContentGate.ktand its test. The diff itself adds no user-visible UI copy. The PR description fails on two product nouns, using the Chinese words that GLOSSARY.zh.md lists under 避免使用 (avoid): 1. Conversation Timeline (GLOSSARY.zh.md line 1330:_避免使用_:聊天列表、消息列表(单独使用)、FlatList、Recycler). The description says "Android 会话的编辑框浮在消息列表上方" ("the Android session editor floats above the 消息列表"). Here "消息列表" means the ordered list of one conversation's messages, which is the Conversation Timeline sense, and it is used alone. The preferred term is Conversation Timeline (会话时间线). 2. Session / Session drawer (GLOSSARY.zh.md line 211 lists the avoid wordconversation; the Session drawer entry is "Session 抽屉"). The description uses 会话 for the product noun, in "Android 会话的编辑框" and in the verification table ("打开会话抽屉", "会话抽屉"). The English Session entry avoids "conversation", and the zh glossary uses 会话 as the Chinese rendering of conversation (会话页 is the Conversation screen). The preferred terms are Session and Session drawer (Session 抽屉). Checked and passed: - "编辑框" and "editor" for the Composer. Its avoid list is "input box, text field" (输入框, 文本框), and neither term appears in the added text. - "New Session page". The New Session screen avoid list is "create Session form, blank Session". "page" is not listed. - "drawer" in "抽屉保持关闭". The only entry with "drawer (alone)" in its avoid list is the Component term entry, not a product noun. - "Harness: codex" in the description. This is the coding tool name, not the BotHarness product noun. The check's wording counts an avoid word used in the glossary's sense of a product noun. Both instances in the description are that sense.Resolution
Edit the PR description (the check covers it; the diff's doc and code changes need no edit): - Replace "消息列表" with "会话时间线" (Conversation Timeline). Example: "Android Session 的编辑框浮在会话时间线上方" or, with the English term, "Android Session 的 Composer 浮在 Conversation Timeline 上方". - Replace "会话" used for the product noun with "Session". Replace "会话抽屉" with "Session 抽屉" (Session drawer). Example: "打开 Session 抽屉。系统返回关闭抽屉。" - Keep "编辑框" only if the reader needs the Chinese word. The glossary's preferred term for the input area is Composer.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Why the change
Android 会话的编辑框浮在消息列表上方,旧的触摸查找可能命中被编辑框盖住的代码块或表格,从编辑框抢走光标拖动。
Refs #5511
原 PR #5526 · 任务认领 ·
codex/local/01a21920-ec15-73a2-bea4-e4a0b53eb44fHarness / Model
Harness: codex
Model: gpt-6.2-sol
Special things to note
composerRetainsHorizontalDragOverLeadingEdgeScroller在 fix(mobile): Android 会话抽屉支持从代码块和表格边缘滑开 #5526 的实现上收到ACTION_CANCEL(Gradle 退出码 1),修复后收到ACTION_MOVE。Android 模块的 29 项测试、移动端 Vitest 的 86 项测试、移动端类型检查、oxfmt、oxlint、check-source-policy、pnpm lint、Host 构建和:app:assembleDebug均通过。补充用例覆盖编辑框位于滚动容器内、浮层层级、多指、未溢出的代码块、UP和CANCEL后的下一次滑动、Android 布局方向,以及越过触摸阈值前横向偏移发生变化的情况。Pixel 7 API 36 的手势实测见下方。No regression test: 本 PR 的回归测试使用 Android Robolectric。
regression-proof门禁只识别 Vitest 文件,Android native CI 运行上述回归用例。Change outline
初次按下时已经滚动过的内容会保留整次拖动。若容器在按下后、越过阈值前离开起始边缘,也交由容器处理。本次点测没有再出现 Neon 观察到的偶发开启,Robolectric 覆盖了偏移在两个事件之间变化的情况。
Pixel 7 API 36 手势点测
Android 16 模拟器,英文与浅色,使用提交
d266d740e1cdfc4fa460c9e265d4018aac103fff的 Debug APK 和隔离的 OpenCode Go Host。Alpha扩大到Alpha bravo charlie。输入QA后剩下QA delta,抽屉保持关闭QA delta编辑框拖动前 · 代码块位于编辑框后,最初仅选择
Alpha。编辑框拖动后 · 选区扩大,抽屉保持关闭。
代码块边缘右拖 · 起始边缘的开抽屉手势仍然有效。
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.