Skip to content

Profile System #444

Description

@salmad3

WIP:

Context:

This epic delivers on-chain profile primitives (names, avatars, bios) that users own completely.

The system leverages the session wallet flow for fee-sponsored updates: users establish an AuthZ delegation on first profile edit, which grants the treasury wallet authority to post profile memos on their behalf with FeeGrant coverage. Subsequent updates require only a session signer confirmation (no gas costs, no wallet popups beyond the initial setup).

End-to-End Flow (v1):

  1. User navigates to profile settings
  2. Enters desired name, builds avatar, writes bio
  3. Clicks "Save": if no session active, AuthZ dialog appears explaining fee delegation (one-time)
  4. User approves AuthZ grant (primary wallet signs, treasury authorized for time set)
  5. UI shows "Saving..." with optimistic profile display
  6. Session signer (or direct wallet if no grant) submits bank sends with RegisterName/RegisterPicture/RegisterBio memos
  7. Transactions broadcast (delegated send path uses FeeGrant, so no user gas cost after initial grant)
  8. Reader receives transactions → parses memos → posts to API
  9. API stores profile data (name, avatar, bio indexed by address)
  10. Propagates updates to all UI surfaces
  11. User sees final confirmed state; profile now visible to all community

Acceptance Criteria:

General:

  • First profile edit checks useAuthzGrants/useSessionWallet state and walks user through grant setup if not active
  • Display names (up to 40 chars) saved via dither.RegisterName memo and displayed throughout UI instead of truncated addresses
  • Custom pixel art avatars (8x8 or 16x16) created in-app builder, stored on-chain via dither.RegisterPicture memo
  • Profile bios (up to 280 chars) saved via dither.RegisterBio memo and rendered on profile pages
  • Profile updates trigger optimistic UI updates immediately, reconcile once reader confirms on-chain state
  • All profile data lives in API database after reader processes memos, endpoint returns complete profile objects efficiently
  • Rate limiting prevents spam (e.g., max 1 name change per day, 3 avatar changes per day)
  • Address-based identicons render as fallback when profile data unavailable
  • Moderation tools available for admins to reset inappropriate profile content

Validation:

  • First-time user completes profile (name + avatar + bio) in under 90 seconds
  • Session wallet established on first profile save, subsequent updates require only session signer approval (no extra dialogs)
  • Profile changes appear in feed, replies, hover cards, and follower lists within one block
  • Concurrent profile updates queue correctly and apply in order
  • Rate limits enforced; users cannot bypass limits by rapid clicks
  • Mobile and desktop both render profiles consistently

Notes:

  • Profile memos fit within 512-byte memo limit (avatars compressed as hex-encoded pixel data)
  • Names are not unique; multiple users can share "Alice Bob"
  • UI should reuse existing AuthZ tooling (useAuthzGrant, useAuthzGrants, useAuthzRevoke, TMAAuthzView.vue)
  • Prefer session wallet over direct wallet signing to hide complexity
  • Reader must have RegisterName/RegisterPicture/RegisterBio handlers registered (not yet implemented; mirror packages/reader-main/src/messages/* pattern)
  • API /profile endpoint should cache frequently accessed profiles
  • Consider future namespacing/verification system separately

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions