Skip to content

feat(mobile): add profile editing - #3852

Open
alebairos wants to merge 4 commits into
block:mainfrom
alebairos:fix/mobile-profile-editing
Open

feat(mobile): add profile editing#3852
alebairos wants to merge 4 commits into
block:mainfrom
alebairos:fix/mobile-profile-editing

Conversation

@alebairos

Copy link
Copy Markdown

Summary

Allow the active Mobile identity to create and update its Nostr kind-0 profile
from Settings.

The editor supports display name, avatar, and bio while preserving unexposed
profile fields and event tags. Saves are signed by the active identity,
published to its current community, and reflected locally only after relay
acceptance. If the active identity or relay changes during the edit, the save
aborts instead of publishing with stale configuration.

Profile avatars are selected at a bounded 512 by 512 resolution, converted to
JPEG, and uploaded through the authenticated media path. This avoids reverse
proxy rejection of multi-megabyte device photos without changing the
full-resolution message-attachment path.

Related issue

N/A. This follows the post-invite profile-less identity gap discovered while
testing #3835 and the ID-search improvement in #3843.

Testing

  • Full repository just ci
    • workspace formatting and strict Clippy
    • repository unit suites
    • Desktop checks, full tests, production build, and Tauri checks
    • web checks and production build
    • Mobile analysis and full tests (1,032 passed, 1 skipped)
  • Desktop native suite: 2,003 passed, 14 ignored
  • Desktop mixer diagnostics: 3 passed
  • Regression tests cover:
    • profile-less kind-0 creation and signed publishing;
    • existing JSON field and event-tag preservation;
    • relay rejection without optimistic saved state;
    • identity/relay changes during an edit;
    • bounded avatar selection and JPEG conversion.
  • Physical HITL test on a Moto G56 against the VPS community:
    • invite-created identity saved display name and bio;
    • Desktop discovered the identity by its saved name;
    • replacement edits preserved existing profile data;
    • the original failing large photo and a second photo uploaded and persisted;
    • avatar rendered in Desktop and Mobile's home-screen header.
  • VPS nginx independently recorded HTTP 200 for both revised avatar uploads;
    the immediately preceding full-resolution request reproduced HTTP 413.

Buzz originating channel: c26bd1cd-860c-4f0e-8b8c-54f5ac3a6a56

Let mobile identities publish display name, avatar, and bio metadata while preserving existing kind-0 fields and tags.

Co-authored-by: alebairos <alexandre.bairos@gmail.com>
Signed-off-by: alebairos <alexandre.bairos@gmail.com>
Co-authored-by: alebairos <alexandre.bairos@gmail.com>
Signed-off-by: alebairos <alexandre.bairos@gmail.com>
@Chessing234

Copy link
Copy Markdown
Contributor

same note as on #3859 — you two are solving the same thing; worth picking one pr or splitting name/avatar vs bio

Co-authored-by: alebairos <alexandre.bairos@gmail.com>
Signed-off-by: alebairos <alexandre.bairos@gmail.com>
@alebairos

Copy link
Copy Markdown
Author

Thanks; we compared #3859. This PR keeps display name, avatar, and bio together because they publish one kind-0 metadata snapshot. It additionally bounds JPEG uploads to avoid the reproduced production HTTP 413 and has physical-device/VPS acceptance. We’ll defer to maintainers on consolidation.

Adapt the inline emoji avatar concept from block#3859 onto the complete profile editor while preserving photo upload, removal, and bio editing.

Co-authored-by: Blue Pink Neon <bluepinkneon@mycl.one>
Co-authored-by: alebairos <alexandre.bairos@gmail.com>
Signed-off-by: alebairos <alexandre.bairos@gmail.com>
@alebairos

Copy link
Copy Markdown
Author

Following the overlap note, I consolidated the unique #3859 capability here rather than opening a third competing profile-editor PR.

Commit b0ad671 adapts the inline emoji-avatar concept onto this editor while retaining its bio editing, bounded photo upload, avatar removal, malformed-profile recovery, and save/race protections. The added flow provides Use emoji, standard-emoji-only selection, five colors, restore-on-reopen, and coherent photo/emoji/remove transitions. Blue Pink Neon is credited with a Co-authored-by trailer for the adapted concept.

Verification at exact head b0ad671a273e4f97d184211a1416580ccab0b813:

  • focused profile/emoji/avatar tests: 32 passed;
  • full Mobile suite on Flutter 3.44.8: 1,034 passed, 1 skipped, with the same 5 unrelated pre-existing channel/compose framework-assertion failures;
  • physical iPhone and Moto G56 acceptance: emoji/color save, reopen restoration, emoji-to-photo and photo-to-emoji replacement, and persistence passed.

The invited-iPhone acceptance build also included #3835 because that identity stores a wss:// community URL and needs its HTTP transport projection. No iOS-specific profile code was required.

Happy to follow maintainer direction on final consolidation.

@alebairos

alebairos commented Jul 31, 2026

Copy link
Copy Markdown
Author

same note as on #3859 — you two are solving the same thing; worth picking one pr or splitting name/avatar vs bio

@Chessing234 See the last comment. We adapted the emoji part from #3859 into this PR. I tested in android and iOS and liked the results.

@alebairos

alebairos commented Jul 31, 2026

Copy link
Copy Markdown
Author

@wpfleger96 please take a look when you have some time. I'm using this code in my phones and liked the results. Buzz rocks, I've deployed a VPS relay for friends and family. I forgot to mention I'm using Buzz to fix buzz. cool.

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