Android: an identifier-only leaf paints its sibling layer over the whole screen, marking everything covered
維護者通常 1 天內回覆
已經有一個關聯 PR 被合併了。
- #4266 來自 @pcbeingused333 —— 已合併
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 79/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- android, react-native, typescript
研究方向
從 packages/capture-kit/src/snapshot/android-replacement-surface-occlusion.ts 開始,追蹤 semanticPaintRect 和 semanticShowRect 如何處理只有識別碼的葉節點。Issue 中包含一個建議條件,並說明為什麼識別碼應繼續可作為目標使用,同時不計為已繪製區域。檢查 Android 快照或遮擋測試(如果有),並確認兄弟按鈕不再被標記為遭到覆蓋,而識別碼檢視仍可被標記為遭到覆蓋。
由索引模型根據 Issue 內容生成。
描述
Version: 0.21.36 (the same code is on main at packages/capture-kit/src/snapshot/android-replacement-surface-occlusion.ts)
Platform: Android (emulator, android-36), React Native app
What happens
On Android every element on our chat screen comes back interactionBlocked: "covered", so locator taps refuse with "Ref @e88 is covered by another visible element and cannot be tapped safely". The screen itself is fine: a coordinate click on the same button opens it.
Why
The screen is a React Native stack of full-screen sibling layers under one parent: background, message list, header buttons, composer. The composer layer is
#117 ViewGroup (0,0,1080,2150) not hittable
#119 ViewGroup id=coach-container (0,0,1080,2150) leaf, not hittable, no label/value
#120 ... composer buttons (hittable)
coach-container is a <View testID pointerEvents="box-none" style={absoluteFill}>: transparent, no handlers, and it has only an identifier. In semanticPaintRect the clause childCount === 0 && hasSemanticContent(node) counts it as painting its whole rect, because hasSemanticContent accepts identifier. Its layer has an action (the composer buttons), so the layer's paint footprint covers 100% of every earlier sibling, and the header buttons and every message bubble get marked covered.
Suggested fix
Don't let an identifier-only leaf paint. An identifier is a test hook, not something drawn, and a non-hittable leaf with no label or value carries no evidence that it's opaque or catches touches:
function semanticPaintRect(node: RawSnapshotNode, childCount: number): Rect | undefined {
if (!isPositiveFiniteRect(node.rect)) return undefined;
return node.hittable === true ||
isScrollableType(node.type) ||
(childCount === 0 && Boolean(node.label?.trim() || node.value?.trim()))
? node.rect
: undefined;
}
semanticShowRect keeps hasSemanticContent, so such a view can still be the target that gets covered. We're carrying this as a pnpm patch on 0.21.36 for now. I'll comment here with the result once our Android coach flows have run with it.
- 主要語言
- TypeScript
- 星號
- 5.3k
- 分支
- 377
- 平均合併
- 14 小時 24 分鐘
- 30 天內合併 PR
- 675
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
callstack/agent-device 的其他 Issue
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed read可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉bug ready-for-agent
難度 2/5 1-3 小時 新手友好度 77/100
callstack/agent-device#4018 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
callstack/agent-device#1869 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 52/100
callstack/agent-device#4343 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
callstack/agent-device#4342 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 42/100
callstack/agent-device#4341 ·
維護者通常 1 天內回覆
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
status: needs triage
難度 1/5 1 小時以內 新手友好度 68/100
mastra-ai/mastra#29706 · 1 則留言 ·
維護者通常 1 天內回覆
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難度 1/5 1 小時以內 新手友好度 85/100
lingdojo/kana-dojo#33802 · 1 則留言 · 5 個 reaction ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
cloudflare/workerd#8290 ·
維護者通常 1 天內回覆
-
area: build-and-ci possible-duplicate S3: minor
難度 2/5 1-3 小時 新手友好度 67/100
manaflow-ai/cmux#38889 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
ValentinH/react-easy-crop#670 ·