fix: keep iOS wallet group reorder row heights in sync OK-62492 - #105
Merged
Merged
Conversation
Replay the wallet sidebar from the OK-62492 QA recording in the example app: 20 wallets in recorded order, the QR badge, and two hidden-wallet groups, built with the same row models as app-monorepo's AccountSelectorWalletListSideBarV2. Dragging "abandon" above "然 1s" reproduces the iOS group drag layout bug. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
UIKit's flow layout requests item sizes in the in-flight order during an interactive move, while the diffable snapshot and cell index paths keep the pre-drag order until the move commits. Resolving sizes through the snapshot swapped heights between displaced rows: dragging a compact wallet group past another group stretched the neighboring row and squeezed the other group, clipping its name. Track the in-flight key order from targetIndexPathForMove and use it only for layout size lookups. Clear it before cancelling and after ending the move. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
zhaono1
approved these changes
Sep 15, 2026
ByteZhang1024
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sizeForItemAtresolved index paths through the diffable snapshot, which keeps the pre-drag order until the move commits. Heights were swapped between displaced rows: passing another group stretched the neighboring row (name separated from its avatar) and squeezed the other group (name clipped).targetIndexPathForMove…and use it only for layout size lookups. Cell index paths still report the pre-drag order during the move, soitem(at:)is unchanged. The order is cleared before cancelling and after ending the move; identity drags in grouped lists keep using atomic targeting.AccountSelectorWalletListSideBarV2.nextdist-tag.Root cause evidence
Temporary logging during the same drag on origin/main: after
abandonmoved from index 17 to 13, the flow layout sized index 16 ashw-ran-1s(150 pt) and index 17 ashw-abandon(68 pt). The visibleqr-onekey-procell measured 150 pt (expected 68) andhw-ran-1smeasured 68 pt (expected 150).Videos
iPhone 17 Pro Simulator (iOS 26.5), Release build, example page "Native List Wallet Sidebar Reorder". Both recordings run the same scripted long-press drag:
abandonmoves slowly up past然 1sand the QR wallet, holds, moves back down, and drops belowPrivate key. Recordings are downscaled to 804 px wide.Before (origin/main 3154f8a), drag at about 1:36–1:53:
ok62492-before-fix.mp4
After (this PR), drag at about 1:13–1:31:
ok62492-after-fix.mp4
Validation
然 1sexpanded and the QR wallet name under its avatar for the whole move.abandonabove然 1scommitstoIndex: 15, and both groups expand normally afterwards.tsc -p example/react-nativereports no errors in the new example files (existing errors elsewhere are unchanged); ESLint passes on the new files androute.tsx.package-publishrun 34936522829 succeeded on 5bd245d; all 40 packages resolve to 3.0.135 on npm withnext, andlateststays at 3.0.131.Notes
react-native-pager-viewcompile error introduced in fix: stabilize native list interactions and iOS view recycling #103 (RNCPruneReleasedPageStates); it is not part of this PR.common.bundle; that local step is not part of this PR either.Jira: https://onekeyhq.atlassian.net/browse/OK-62492
🤖 Generated with Claude Code