Skip to content

refactor(home): single string-based avatar path; profile delegate goes parameterless - #857

Closed
QuantumExplorer wants to merge 1 commit into
developfrom
refactor/home-avatar-off-dsblockchainidentity
Closed

refactor(home): single string-based avatar path; profile delegate goes parameterless#857
QuantumExplorer wants to merge 1 commit into
developfrom
refactor/home-avatar-off-dsblockchainidentity

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

What

Shrinks the Home surface's DSBlockchainIdentity footprint to just the deliberate DashSync-vs-SDK discriminators, ahead of the invitations SDK rebuild:

  • DWDPAvatarView: setBlockchainIdentity: and configureAsCurrentUser were copy-paste twins. Both now delegate to a single configureWithUsername:avatarURLString: core (percent-encoding applied inside, identical letter-fallback and SDWebImage behavior). The typed blockchainIdentity property is kept only for the DashSync-backed invitation screens — marked TODO(invitations-sdk-rebuild) so it's deleted with that rebuild; no invitation files are touched.
  • HomeViewDelegate: homeView(_:didUpdateProfile: DSBlockchainIdentity?, unreadNotifications:) became parameterless homeViewDidUpdateProfile(). The old callback duplicated the visibility + notification-bell logic refreshIdentityAvatar() already owns; it now just funnels there. HomeView.setIdentity() collapses from 17 lines to 2, and HomeView.swift no longer references DSBlockchainIdentity at all.
  • Stale "Row New price sourcing #17 stage A" comment blocks in the touched regions updated to describe current behavior.

Net −42 lines. Deliberately left alone: updateAvatarContent(identity:) and the profileAction() editor branch (real DashSync-vs-SDK path discriminators), and everything under Invites/.

Behavior notes

  • One gating nuance: the old setIdentity() skipped pushing profile data unless registration was .done/completed; refreshIdentityAvatar() reads the central state unconditionally but visibility still gates on hasIdentity, so the only observable difference is on the deprecated DashSync invitation arm mid-registration (dev-only).

Verification

⚠️ Not build-verified: ../platform is mid-transition (checked out on v4.1-dev, which is missing 4 of the 5 APIs the app's pin branch carries), so no dashwallet build compiles right now — failure is entirely in the SwiftDashSDK package, upstream of the app target. Once the pin branch is reconciled and DashSDKFFI.xcframework rebuilt, this needs one dashpay arm64-sim build + a smoke of the home avatar (letter + profile image for an SDK-registered identity) before merge.

🤖 Generated with Claude Code

…s parameterless

DWDPAvatarView's typed setter and configureAsCurrentUser were copy-paste
twins; both now delegate to one configureWithUsername:avatarURLString:
core (percent-encoding applied inside, same letter fallback). The typed
blockchainIdentity property survives only for the DashSync-backed
invitation screens, marked TODO(invitations-sdk-rebuild).

HomeViewDelegate's homeView(_:didUpdateProfile:unreadNotifications:)
carried a DSBlockchainIdentity into HomeView and duplicated the
visibility + notification-bell logic that refreshIdentityAvatar()
already owns. The delegate is now a parameterless
homeViewDidUpdateProfile() funneling into refreshIdentityAvatar(),
removing the last DSBlockchainIdentity reference from HomeView.swift.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 66476511-4fdd-4bed-92c3-876ea64ae295

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/home-avatar-off-dsblockchainidentity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@QuantumExplorer

Copy link
Copy Markdown
Member Author

Closing as superseded: the DashSync unlink has since completed on develop — none of the files this PR touches reference DSBlockchainIdentity anymore, and DWDPAvatarView.h/.m (where most of this diff lives) have been deleted entirely. The HomeView delegate was also reshaped independently (homeView(_:didUpdateProfileWithUnreadNotifications:)). Nothing left to rebase.

@QuantumExplorer
QuantumExplorer deleted the refactor/home-avatar-off-dsblockchainidentity branch August 10, 2026 09:11
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.

1 participant