Skip to content

fix: retain overlay windows during child navigation transitions - #264

Open
huhuanming wants to merge 1 commit into
mainfrom
codex/fix-ios-overlay-child-transition
Open

huhuanming wants to merge 1 commit into
mainfrom
codex/fix-ios-overlay-child-transition

Conversation

@huhuanming

@huhuanming huhuanming commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

背景

跟进已合并的 #263 中的 两条 P2 review 意见。原修复覆盖了 More 浮窗退出时,主窗口上账户选择器交互转场的窗口生命周期;后续审查指出 interactiveCoordinator(in:) 只查看根控制器及 presentedViewController 链。UIKit 文档说明,transitionCoordinator 会向父控制器回退,但根控制器不会因此自动看到其子控制器的交互转场。已挂载的子 UINavigationController 若正在交互式 pop,旧实现可能提前释放退出浮窗的 window context。

另一个意见涉及 NativeList 视频首帧测试:若中间的 XCTUnwrap 提前抛错,末尾的 recycle() 不会执行。现有容器移除和对象析构仍有取消路径;本 PR 将测试中的显式清理改为 defer,保证各退出路径一致,不将其描述为已证实的生产资源泄漏。

改动

  • 保留原有根控制器、presented 链的优先查找顺序,同时遍历视图已加载且挂载在同一 App window 的 contained children。使用栈与 identity 集合,避免重复遍历,也不会为了检查离屏子控制器而加载其 view。
  • 沿用 fix: retain iOS overlay window during interactive dismissal #263 的 retired window token、交互完成或取消回调、下一主线程轮次重查与 scene disconnect 清理;本次不改公开接口、Android/Web 或业务调用。
  • NativeList 测试对两个 preview slot 分别使用 defer recycle();保留测试缓存复用所需的中途 recycle() 以及全部原断言和等待期限。
  • 更新 NativeOverlay SPEC 的子控制器边界及测试范围。

验证

  • 在旧版 WindowManager 源码上运行真实 UIKit fixture:普通根控制器包含子 UINavigationController,启动百分比驱动的交互式 pop;确认交互仅出现在 child,旧版恰在“退出窗口应保留”的断言失败。
  • 同一 fixture 在本 PR 源码上通过:子导航交互期间保留旧窗口,取消后释放。另有负例确认未加载或未挂载的 child 不会触发保留,也不会加载 view。
  • 聚焦 iOS 27 模拟器原生 harness:13/13 通过。原有受控 transition coordinator 测试覆盖完成、取消、owner 重开与 scene 断开;新增真实 UIKit 用例只覆盖 contained navigation 的取消路径。
  • NativeList 测试文件通过 Swift 语法解析,git diff --check 通过。本 PR 的 hosted CI 已全部通过,包括 ios-native、ios-xctest 和 device-utils-store;视频首帧用例实际通过(3.445 秒),NativeList XCTest 套件为 95 项、1 项既有跳过、0 失败。此前 fix: retain iOS overlay window during interactive dismissal #263 的 hosted CI 和录屏不作为本 PR 新增 child 路径的验证证据。

#263 的修复前后录屏记录的是账户选择器主窗口交接,并非本 PR 新增的子导航路径。这里的真实 UIKit 验证仍限模拟器;真机和更广的应用场景尚未验证。本 PR 不发布 SDK,也不合并应用侧更改。

独立复核已核对本次源码、真实 UIKit 红/绿结果及线上差异。Devin 的检查状态为通过,但其完整审查因额度不足而跳过,不计作额外审查证据。

@sidmorizon

Copy link
Copy Markdown
Contributor

@codex review

@sidmorizon

Copy link
Copy Markdown
Contributor

@codex security review

@sidmorizon

Copy link
Copy Markdown
Contributor

Cursor review failed.

Remote error: cursor_permission_denied: HTTP 403 Forbidden: Cloud Agent is not available for free users. Please upgrade to Pro.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T09:08:07.857730Z 17268ef Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sidmorizon

Copy link
Copy Markdown
Contributor

Devin Cloud review ↗

@cursor

cursor Bot commented Nov 13, 2026

Copy link
Copy Markdown

Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 17268ef586

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 17268ef586

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sidmorizon

Copy link
Copy Markdown
Contributor

@huhuanming
huhuanming enabled auto-merge (squash) November 13, 2026 09:53

This branch has not been deployed

No deployments
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.

2 participants