Skip to content

fix: keep iOS wallet group reorder row heights in sync OK-62492 - #105

Merged
huhuanming merged 3 commits into
mainfrom
fix/ok-62492-ios-wallet-sidebar-reorder
Sep 15, 2026
Merged

huhuanming merged 3 commits into
mainfrom
fix/ok-62492-ios-wallet-sidebar-reorder

Conversation

@huhuanming

@huhuanming huhuanming commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix the iOS wallet sidebar layout while a wallet group is being dragged (OK-62492). Dragging compacts the group to 68 pt and hands movement to UIKit interactive movement. The flow layout requests item sizes in the in-flight order, but sizeForItemAt resolved 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).
  • Track the in-flight key order from targetIndexPathForMove… and use it only for layout size lookups. Cell index paths still report the pre-drag order during the move, so item(at:) is unchanged. The order is cleared before cancelling and after ending the move; identity drags in grouped lists keep using atomic targeting.
  • Add an example page, "Native List Wallet Sidebar Reorder", that replays the wallet sidebar from the QA recording (20 wallets in recorded order, QR badge, two hidden-wallet groups) with the same row models as app-monorepo's AccountSelectorWalletListSideBarV2.
  • Bump all 40 publishable packages to 3.0.135 with a CHANGELOG entry, and publish them to npm with the next dist-tag.

Root cause evidence

Temporary logging during the same drag on origin/main: after abandon moved from index 17 to 13, the flow layout sized index 16 as hw-ran-1s (150 pt) and index 17 as hw-abandon (68 pt). The visible qr-onekey-pro cell measured 150 pt (expected 68) and hw-ran-1s measured 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: abandon moves slowly up past 然 1s and the QR wallet, holds, moves back down, and drops below Private 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

  • Reproduced OK-62492 with the example fixture on unmodified origin/main (native-list 3.0.134); the simulator frame matches the QA recording at 00:20.
  • With the fix, the same drag keeps 然 1s expanded and the QR wallet name under its avatar for the whole move.
  • Dropping abandon above 然 1s commits toIndex: 15, and both groups expand normally afterwards.
  • iOS Simulator Release build of the example app on Xcode 26.6.
  • tsc -p example/react-native reports no errors in the new example files (existing errors elsewhere are unchanged); ESLint passes on the new files and route.tsx.
  • package-publish run 34936522829 succeeded on 5bd245d; all 40 packages resolve to 3.0.135 on npm with next, and latest stays at 3.0.131.

Notes

  • NativeList has no iOS unit test target, so the fix is covered by the simulator reproduction above. Android is untouched and was not re-run.
  • Building the example on Xcode 26.6 needed an uncommitted local cast for a react-native-pager-view compile error introduced in fix: stabilize native list interactions and iOS view recycling #103 (RNCPruneReleasedPageStates); it is not part of this PR.
  • The Release example app launches without Metro only after embedding the background runtime bundle as common.bundle; that local step is not part of this PR either.
  • Not yet verified in app-monorepo; that needs a bump to 3.0.135 there.

Jira: https://onekeyhq.atlassian.net/browse/OK-62492

🤖 Generated with Claude Code

huhuanming and others added 3 commits September 15, 2026 13:31
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>
@huhuanming
huhuanming merged commit db4363f into main Sep 15, 2026
4 checks passed
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.

3 participants