Skip to content

feat: home screen redesign#442

Open
pwltr wants to merge 6 commits intomasterfrom
feat/home-redesign
Open

feat: home screen redesign#442
pwltr wants to merge 6 commits intomasterfrom
feat/home-redesign

Conversation

@pwltr
Copy link
Contributor

@pwltr pwltr commented Feb 13, 2026

Description

  • Home: Wallet (balance, activity) and Widgets (suggestions + widgets) with snap scrolling
  • Draggable list: reorder via long-press on handle only to allow scroll, fixed bugs
  • Suggestions: convert to widget and add hardware wallet card (commented out)
  • WidgetOnboardingHint: add setting and add to backup (backwards compatible)
  • Bump minimum iOS target to 17.0
  • Cleanup: removed some dead code around widgets and draggable list

Screenshots

Simulator.Screen.Recording.-.iPhone.17.-.2026-02-13.at.19.11.46.mov

@pwltr pwltr force-pushed the feat/home-redesign branch from f6764d6 to 58c2109 Compare February 13, 2026 18:36
@pwltr pwltr marked this pull request as draft February 17, 2026 10:50
@pwltr
Copy link
Contributor Author

pwltr commented Feb 17, 2026

Drafted to wait for Android counterpart

@pwltr pwltr self-assigned this Mar 4, 2026
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code review

Found 3 bugs in the changed code.

context.coordinator.itemHeight = itemHeight
context.coordinator.originalIndex = originalIndex
context.coordinator.itemCount = itemCount
}
Copy link

Choose a reason for hiding this comment

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

Bug: updateUIView never refreshes the drag callbacks — stale closures

In UIViewRepresentable, makeCoordinator() is called exactly once per view lifetime. The three closure properties on Coordinator (onDragBegan, onDragChanged, onDragEnded) are set there but never reassigned in updateUIView. Every time SwiftUI re-renders DraggableItem (which happens as soon as a drag starts, because @State vars like dragHandleFrames and overlayFrameDuringDrag change), updateUIView is called but the coordinator keeps the closures from the very first render.

In practice the @State captures are stable, so simple drags may work fine. The real exposure is that originalIndex and itemHeight captured by the stale onDragChanged closure can diverge from the coordinator's freshly-updated values if the row's position changes mid-session — causing incorrect clamping vs. what handleLongPress computes.

func updateUIView(_ uiView: UIView, context: Context) {
context.coordinator.itemHeight = itemHeight
context.coordinator.originalIndex = originalIndex
context.coordinator.itemCount = itemCount
}

Suggested fix:

Suggested change
}
func updateUIView(_ uiView: UIView, context: Context) {
context.coordinator.itemHeight = itemHeight
context.coordinator.originalIndex = originalIndex
context.coordinator.itemCount = itemCount
context.coordinator.onDragBegan = onDragBegan
context.coordinator.onDragChanged = onDragChanged
context.coordinator.onDragEnded = onDragEnded
}

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