Repository navigation
fix: preserve iOS 26 pager glass across scrolling and theme changes - #262
huhuanming wants to merge 2 commits into
Conversation
|
@codex review |
|
@codex security review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Cursor review failed. Remote error: |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
| for (UIScrollView *scrollView in _scrollEdgeBackgroundStates.keyEnumerator.allObjects) { | ||
| [self applyScrollEdgeBackgroundToScrollView:scrollView]; |
There was a problem hiding this comment.
🟡 P2: Ancestor theme changes leave stale backing
Severity: non-severe
When only an ancestor's background changes, syncScrollEdgeAppearance does not run and the active list keeps its old color. The page and its Hard edge then display different theme colors until another pager update.
| UIColor *candidate = [view.backgroundColor resolvedColorWithTraitCollection:_topOverlayHostView.traitCollection]; | ||
| if (candidate != nil && CGColorGetAlpha(candidate.CGColor) >= 1) { |
There was a problem hiding this comment.
🟡 P2: Dynamic ancestor backing uses wrong appearance
Severity: non-severe
When an ancestor and overlay use different appearances, resolvedColorWithTraitCollection: resolves the ancestor's dynamic color using the overlay's style. The iOS 26 list then paints a different background from its ancestor.
| if (scrollView == nil || scrollView == _topEdgeScrollView || | ||
| [_programmaticScrollEdges objectForKey:scrollView] != nil || | ||
| (_pendingTopOverlayAppearanceCommit && scrollView == _observedScrollView && | ||
| [self canPreserveHorizontalScrollEdgesAllowExternalOverlay:NO])) return; |
There was a problem hiding this comment.
🟠 P1 释放旧滚动 owner 时恢复待提交的背景
Problem
iOS 26 本地 smooth Hard pager 切换主题后,此处会因 pending commit 保留列表 A 的背景,但 _topEdgeScrollView 已被清空。若回调执行前调用 setPageWithoutAnimation 切到 B,detachScrollObserver 只清除 observed 指针;后续 commit 仅重绑 B,且没有 transition owner 触发 A 的背景恢复。另一次 mount 在该窗口释放 A 也有同样问题。
Impact
A 失去最后一个 owner 后仍保留 Pager 写入的不透明背景;移出或复用 A 时无法恢复原来的 nil/clear,后续 syncScrollEdgeAppearance 还会继续改写 A,造成新位置的背景被旧 Pager 覆盖。
Recommendation
在 observer/managed-scroll 释放并清除旧 observed 指针后,重新检查 A 的剩余 owner 并恢复其背景租约;增加 pending theme commit 期间无动画切页及列表替换的回归用例。
On iOS 26, Wallet Home can lose its pinned scroll effect or leave the search/menu Glass capsules pale after scrolling, cancelling a horizontal swipe, or changing theme while Home remains mounted. This change keeps the local Pager’s native Hard effect and its scroll owner consistent across those transitions.
The iOS 26/27 distinction is documented in source comments and the package SPEC. A minimal UIKit app reproduced pale capsules with transparent scroll backing on iOS 26 and normal dark capsules with the same setup on iOS 27. On iOS 26, changing only the backing and then advancing the actual scroll offset produced a reversible pale → dark → pale result. This establishes the observed trigger; it does not attribute the failure to an undocumented UIKit internal mechanism. A controlled pattern with the public native edge effect shown/hidden confirmed that the full fixed + sticky regions still blur their underlying content.
Validation:
7df9bd7e…); Xcode logs confirm compilation of this file, successful native builds, and the installed App binary receipts.git diff --check, repository test-integrity checks (78 files; 3 non-gated advisories), and npm dist-tag validation (45 workspaces) passed. Final source, SPEC and native tests received independent review.Physical-device and Release builds remain unverified. Hosted CI for the new head is pending; local Debug behavior and focused native XCTest do not establish hosted CI success.
Recordings — iOS 26 Simulator Debug
Before: the original theme-only candidate, naturally scrolling Home into the pinned state, turns both capsules pale.
scroll-ios26-a3637640-before-natural.mp4
After: final locally rebuilt source, natural scrolling → pinned header → half-swipe cancellation → page switching/return, without pale capsules.
scroll-ios26-7df9bd7e-natural-dark.mp4
After: the same final build, pinned dark → light → dark, followed by a cancelled horizontal swipe.
scroll-ios26-7df9bd7e-pinned-theme.mp4
Earlier recordings of the original theme-only repair
Before that repair:
ios26-system-theme-valid.mp4
After that repair (historical candidate; the final scrolling/theme acceptance is recorded above):
ios26-pager-theme-after-fix.mp4