feat(myaccount): show Change Username only once a handle is claimed - #1343
Merged
Conversation
The row was unconditional, so an account with no handle got "Change Username" — a change of nothing. Claiming a first handle already has its own entrance in the You tab's progress card, which carries the minimum-balance gate and disappears once the handle exists; the My Account row now appears at exactly that point. MyAccountScreenViewModel reads userProfile.username off UserManager and folds it into the same buildItemList filter that already hides the biometrics and staff rows. It starts hidden, so the row doesn't flash in before the profile loads. Matches iOS SettingsMyAccountScreen, which wraps its row in `if let username = session.profile?.username`.
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.
The My Account row was unconditional, so an account with no handle got "Change Username" — a change of nothing. Tapping it landed on the username step with an empty field, which is the claim flow reached through a row that says it isn't.
Claiming a first handle already has its own entrance: the You tab's progress card, which carries the minimum-balance gate and disappears the moment
usernameGatereadsClaimed. This row now appears at exactly that point, so the two are complementary rather than overlapping.MyAccountScreenViewModelreadsuserProfile.usernameoffUserManagerand folds it into the samebuildItemListfilter that already hides the biometrics and staff rows. It starts hidden, so the row doesn't flash in before the profile loads — the same reason staff rows start hidden.No balance gate on this row. The minimum exists to stop squatting at claim time; an account holding a handle has already cleared it, and re-gating a change would hold someone's handle hostage to a balance that has since moved.
Parity
Matches iOS
SettingsMyAccountScreen, which wraps its row inif let username = session.profile?.usernamefor the same reason.Base
Branched off
2e571e2d4—build: release Flipcash 2026.8.5 (4377), the build currently on the production and internal tracks — so this can go out as an internal build updating the one approved for release. It does not include #1340, which landed after 4377.Tests
MyAccountScreenViewModelStateTestgains five cases: the row's absence when unclaimed, its appearance on claim, its removal if the handle goes away, and that claiming interacts correctly with the beta-unlock and biometrics filters.