Add mobile profile editing - #6583
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ad98e3f7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
jedwards27
left a comment
There was a problem hiding this comment.
:bot: Jude’s code review agent — requesting changes on exact head 0ad98e3f7d88b90740ca86c6cbc0271b869c9de7 (base 4baccd5394d6166bb68ff03b24e376e322281a59).
Merge blockers
-
[P1] An edit before profile hydration can destructively replace the user’s profile with one field.
mobile/lib/features/profile/profile_edit_page.dart:37-38,271-307renders loading/error as an editable null profile, whilemobile/lib/features/profile/profile_provider.dart:16,25-42,70-88merges edits into an initially empty_metadatamap and publishes immediately. Kind 0 is absolute state; the relay clears missing fields atcrates/buzz-relay/src/handlers/side_effects.rs:1262-1277,1303-1316. A fast display-name edit, or any edit after fetch failure, can clear avatar, about, NIP-05, and custom metadata. A temporary pending-fetch regression proved the notifier published instead of refusing. Disable editing until successful hydration and make the notifier fail closed for pending/error state; distinguish “no prior profile” from failure and retain pending/error/empty-profile tests. -
[P1] The photo editor overflows at a supported compact/large-text boundary. Fixed geometry in
mobile/lib/features/profile/profile_avatar_editor.dart:210-234can leave only 41dp for mode content; the non-scrollable picker atmobile/lib/features/profile/profile_avatar_editor/emoji_avatar_picker.dart:54-70cannot fit. A temporary widget probe at 320×568 logical pixels withTextScaler.linear(2)deterministically producedRenderFlex overflowed by 29 pixelsand timed out. Make preview/control sizing responsive or provide a scrollable compact layout, and retain boundary coverage across Image, Emoji/background, and Animated modes. This is within the repository’s WCAG 2.1 AA product contract (VISION.md). -
[P2] Cancel uploads a selected private photo and leaves it orphaned.
mobile/lib/features/profile/profile_avatar_editor.dart:118-143uploads immediately after crop, before Save; Back only discards the URL atmobile/lib/features/profile/profile_edit_page.dart:130-144. No deletion operation was found in the searchedmobile/lib,crates/buzz-media, orcrates/buzz-relaypaths. A user can select sensitive media, cancel believing nothing was committed, yet leave it in relay storage. Keep cropped bytes local until Save, or add a real ownership/deletion contract; test that Cancel performs zero uploads and Save performs one upload followed by profile publish. -
[P2] Animated-avatar failures leak remote blobs and local camera frames.
mobile/lib/features/profile/animated_avatar_capture.dart:149-170concurrently uploads animation and poster without compensating cleanup if either upload or the later kind-0 publish fails. At:554-587, a segmentation frame is deleted only afterprocessImage; an exception leavesbuzz-avatar-frame-<index>.pngin temp storage. Add transactional/GC cleanup for partial remote success, move each local deletion intofinally, and inject failures at animation upload, poster upload, profile publish, and segmentation. -
[P2] Reduce Motion does not suppress avatar playback.
mobile/lib/features/profile/profile_edit_page.dart:37-50applies the preference only to transitions;mobile/lib/shared/widgets/playing_avatar_image.dart:22-46still createsProgressiveAnimatedAvatar, which swaps to moving media atmobile/lib/shared/widgets/progressive_animated_avatar.dart:24-75. Animated review also advances every 125ms atmobile/lib/features/profile/animated_avatar_capture.dart:96-104, while reduced motion is consulted only for positional transitions at:287-301. Keep a poster/still frame and stop preview advancement underMediaQuery.disableAnimations; add regression coverage. -
[P2] Avatar profile-publish failure is silent.
mobile/lib/features/profile/profile_edit_page.dart:146-161has onlyfinally; a failedupdateAvatarUrlescapes an unawaited future. Image/emoji users receive no accessible error and cannot distinguish rejection from success. Catch the failure, keep the draft/editor, surface an accessible retryable error, and test retry. (Also identified by the existing exact-head Codex review.) -
[P2] Same-second profile replacements are not guaranteed to persist.
SignedEventRelay.submitsupports an explicit timestamp (mobile/lib/shared/relay/signed_event_relay.dart:29-57), butprofile_provider.dart:70-88does not retain the fetched timestamp or ensure a strictly newer one. The database resolves same-second replacements by lowest event ID and returns a non-current result atcrates/buzz-db/src/lib.rs:4910-4923; the client can then update local state as though its edit won. Preserve the current profile timestamp and publish monotonically, then verify consecutive same-second edits survive refresh. (Also identified by the existing exact-head Codex review.) -
[P2] Animated capture does not recover its camera across app lifecycle transitions. Its one-shot initialization/cleanup at
mobile/lib/features/profile/animated_avatar_capture.dart:106-147has no inactive/resume handling, unlike the establishedAppLifecycleListenerpattern inmobile/lib/features/channels/compose_bar/camera_preview.dart:82-97. Backgrounding can leave preview/capture unusable on return. Dispose on inactive, reinitialize on resume, and test lifecycle recovery. (Also identified by the existing exact-head Codex review.)
Validation
just mobile-check: pass; 471 files checked, no format/analyze issues.- Full
just mobile-test: pass; 1,685 tests. git diff --check 4baccd5..0ad98e3: pass; reviewed scope is 59 files, +6,651/−152.- Temporary causal tests reproduced the pending-hydration destructive publish and compact/2×-text overflow; probes were removed and clean state re-confirmed.
- GitHub Mobile and DCO checks are green at this head. They do not exercise these boundaries.
- The Settings → profile transition also introduces the prohibited sibling-feature import at
mobile/lib/features/settings/settings_page.dart:16despiteAGENTS.md:594-595; move/inject that route helper rather than preserving the dependency.
Missing exact-artifact evidence / residual risk
No exact-head iOS integration journey or simulator artifact was provided for this native-heavy feature. Unit/widget success does not prove native text/segmented/skin-tone presentation, VoiceOver semantics, camera permission denial/recovery, interruption/background behavior, crop/retake, cancellation, upload/publish failure, or real-device animation behavior. Provide isolated exact-head iOS receipts for the changed workflows, including Reduce Motion and narrow/large text. Until the destructive persistence path and failure/cancel/accessibility defects above are fixed and covered, this is not safe to merge.
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
0ad98e3 to
f2fd8e1
Compare
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 Addressed the requested changes on exact head
Validation: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d922679f18
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 Exact-head device follow-up for |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d63fb80c79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4730c9b1da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 25a46109db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 42ef3c2dd5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64bb760a37
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c05d8b6f30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7ec5d77b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28ad1ecdcc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ee3610525
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f13ebd4053
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84739691a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7fda24ac28
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9aff5d44be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 47da32e18e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b5b4078ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Signed-off-by: kenny lopez <klopez4212@gmail.com>
|
🤖 @codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Signed-off-by: kenny lopez <klopez4212@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 838fd27a17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| final upload = Future.wait( | ||
| [_uploadPoster(service), _uploadAnimation(service)], |
There was a problem hiding this comment.
Upload animated-avatar parts within the configured limit
When the relay is validly configured with BUZZ_MEDIA_MAX_CONCURRENT_UPLOADS=1 or BUZZ_MEDIA_MAX_CONCURRENT_UPLOADS_PER_PUBKEY=1 (crates/buzz-relay/src/config.rs:781-793), this starts the poster and animation uploads concurrently, so the relay rejects one request and every animated-avatar save fails on its first attempt. Upload these parts sequentially, or otherwise serialize them when the relay reports its concurrency limit, so this supported deployment configuration does not require users to press Save twice.
Useful? React with 👍 / 👎.
Summary
Testing
just mobile-checkjust mobile-test(1,685 tests)