Skip to content

fix(schedule): respect voice and system safe areas - #293

Draft
LUPENGHAN wants to merge 6 commits into
1024XEngineer:mainfrom
LUPENGHAN:fix/schedule-safe-areas
Draft

fix(schedule): respect voice and system safe areas#293
LUPENGHAN wants to merge 6 commits into
1024XEngineer:mainfrom
LUPENGHAN:fix/schedule-safe-areas

Conversation

@LUPENGHAN

@LUPENGHAN LUPENGHAN commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Closes #291

概述

底部语音入口恢复为悬浮深色条后,固定底部间距会让它贴近 Android 手势导航;日历滚动区和详情抽屉也没有为浮动控件、系统手势区预留空间。连续通话页作为绝对全屏层,顶部收起按钮和底部操作区同样只使用固定间距。

本 PR 把悬浮语音入口、通话页、日历和详情抽屉统一按设备安全区布局,不改语音协议或日程业务行为。

改动

  • VoiceCallScreen:顶部收起区和底部“打断当前对话/结束对话”操作区按系统安全区布局
  • AssistantVoiceOverlay/PushToTalkBar:按住说话入口保持悬浮深色条,并随底部 inset 上移;点击回复外的空白处关闭回复的既有交互保留
  • floatingVoiceBarLayout.ts:集中定义悬浮条高度、底部偏移和日历所需的滚动留白,避免控件样式与页面留白脱节
  • ScheduleCalendarScreen:底部为悬浮语音条和系统导航区预留空间;Android 边到边模式避开顶部状态栏,iOS 保留原生自动安全区调整
  • ScheduleDetailSheet:详情末尾内容避开 Home Indicator/手势导航区

验证

  • npx jest --runInBand 定向覆盖语音入口、通话页、日历和详情抽屉:5 个套件、23 个用例全过
  • npm run typecheck 全绿

本次不含

  • 不改 Proposal:连续对话模式展示完整对话上下文 #284 的连续对话历史模型或展示逻辑
  • 不改 WS 协议、Realtime Agent、TTS 打断、日程写入和提醒业务语义
  • 不把日程/地点提醒列表改为 FlashList;列表虚拟化是独立的性能优化
  • 不新增日程详情编辑、删除或提醒配置能力

示例图

已使用小米 14 手机进行真机测试;
4b29a4e8994196712757de6b71c07a5c
42fee8616a2f2eadef031f87d3943793

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审阅了本 PR 的完整固定范围 diff(22debd352f833be8098f27df82b6529a8a4358c5...518abbf4ae5942e2c4f4158f08b6dde3c5b4b7c6),重点核对了悬浮语音条、通话页、日历滚动留白、详情抽屉安全区,以及回复关闭交互在各调用方之间的布局与行为契约。未发现满足审阅阈值的新增正确性、兼容性、安全性或性能问题。

验证:git diff --check 通过;定向 Jest 和 npm run typecheck 未能执行,因为当前工作区缺少可执行的本地依赖(jest/tsc 返回 Permission denied)。

@LUPENGHAN
LUPENGHAN marked this pull request as draft August 18, 2026 10:00
@LUPENGHAN LUPENGHAN closed this Aug 19, 2026
@LUPENGHAN LUPENGHAN reopened this Aug 19, 2026
@LUPENGHAN
LUPENGHAN force-pushed the fix/schedule-safe-areas branch from 518abbf to 5c39008 Compare August 19, 2026 10:26
@LUPENGHAN
LUPENGHAN marked this pull request as ready for review August 19, 2026 10:31

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review conclusion

Reviewed the complete fixed-range diff covering the floating voice bar, immersive call screen, calendar safe-area spacing, detail-sheet insets, shared layout constants, and associated tests. I found no actionable correctness, compatibility, or reliability regressions introduced by this change.

Verification: git diff --check passes. The five targeted Jest suites could not be executed because frontend/node_modules is absent and the repository-local jest binary is unavailable in this workspace.

@Wintercom

Copy link
Copy Markdown
Collaborator

【验收标准未完成 / 阻塞合并】PR 使用 Closes #291,但 Issue #291 的六项验收中仍有四项未勾选:日历末尾可点击、Android 顶部安全区、连续通话页安全区、详情抽屉末尾内容。git_rules.txt 第 20–25 行要求 PR 与 Issue 范围一致、必要验证通过后才能关闭。请在真实 Android/iOS 或可交互预览中逐项验收并更新 Issue;在四项未确认前不应 Closes #291

@Wintercom

Copy link
Copy Markdown
Collaborator

【安全区验证不足 / 阻塞合并】新增测试大多只把 useSafeAreaInsets mock 成 top=0、bottom=34,并断言计算后的 style 数字;VoiceCallScreen 测试甚至固定所有 inset 为 0,未验证本 PR 核心的顶部刘海和底部 Home Indicator 行为。请补 top/bottom 非零的组件测试,覆盖 Android/iOS 分支、通话页 navigation/actions、详情抽屉和日历最后一项实际可滚动/可点击;并提供至少一个 Android edge-to-edge 与一个 iOS safe-area 的截图或交互验证。

@Wintercom

Copy link
Copy Markdown
Collaborator

【Verification 说明需补齐】PR 只列定向 Jest 5 个套件和 typecheck,没有列出 lint、Prettier、完整 frontend test、Android/iOS 构建或 Appetize/真机结果;而本次改动涉及平台分支和系统安全区,单纯 JS 单测不足以证明设备行为。git_rules.txt 第 24–26 行要求必要验证和人工 Review。请同步当前 head 的完整 CI 结果,并记录设备/预览的型号、系统、导航模式和逐项结果。

@Wintercom Wintercom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按照 git_rules.txt 的合并标准,本轮需要先处理以下过程与验证项:

  1. PR 使用 Closes #291,但 Issue 中四项核心安全区验收仍未勾选,当前不满足关闭条件。
  2. 测试主要断言 style 数字,通话页仍只测零 inset;缺少 top/bottom 非零、Android/iOS 分支和真实可滚动/可点击验证。
  3. Verification 未包含完整前端门禁、平台构建和真实 Android/iOS 安全区验收信息。

代码层面未发现额外高置信逻辑缺陷;具体过程问题已使用 gh 逐条评论。

@LUPENGHAN
LUPENGHAN force-pushed the fix/schedule-safe-areas branch from 53a4939 to b7a8d08 Compare August 20, 2026 01:42
…ability

Code review (Wintercom): new tests mostly mocked useSafeAreaInsets as
top=0/bottom=34 and only asserted the computed style numbers;
VoiceCallScreen's test fixed every inset at 0, never exercising the
PR's core notch/Home-Indicator behavior. Neither Platform.OS nor
insets.top were ever varied anywhere, so ScheduleCalendarScreen's
Android edge-to-edge branch (topSafeAreaPadding = Platform.OS ===
'android' ? insets.top : 0) was never actually executed by any test.

- VoiceCallScreen.test.tsx: added testID hooks on the nav/actions
  containers and it.each cases for both a small (clamped-to-fallback)
  and a large (real) top/bottom inset.
- ScheduleCalendarScreen.test.tsx: added Android-applies-insets.top and
  iOS-stays-at-0 (native handles it) cases.
- ScheduleCalendarScreen.test.tsx: strengthened the existing bottom-space
  test to also render a real occurrence and prove it's actually
  reachable and pressable (opens the detail sheet), not just that a
  padding number matches -- a padding number alone can't prove the last
  item isn't hidden behind the floating voice bar.

Every new assertion was mutation-tested: broke the corresponding
production line, confirmed the test failed, reverted.

ScheduleDetailSheet's existing bottom-inset test (fixed field set, not
a dynamic list) was left as-is -- its non-zero, non-clamped padding
assertion already exercises the real computation, and there's no
per-item occlusion risk to prove the way there is for the calendar's
dynamic list.
@LUPENGHAN
LUPENGHAN marked this pull request as draft August 20, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ui): 悬浮语音入口与系统安全区遮挡日历内容

2 participants