Skip to content

Max bounds for profile/contact fields #910

@piotr-iohk

Description

@piotr-iohk

Problem or use case

Profile/contact editable fields are mostly unbounded today, which can cause:

  • heavy profile payloads
  • broken/truncated layouts for very long strings
  • inconsistent behavior between iOS and Android

Current mismatch: Android limits bio in shared edit form (BIO_MAX_LENGTH = 160), while iOS does not apply this cap.

Proposed solution

Define and enforce shared bounds for profile/contact fields on both apps:

  • name
  • notes/bio
  • tag
  • link label
  • link URL

Optionally also define max counts:

  • number of tags
  • number of links

Implementation requirements:

  1. apply bounds at input level (good UX)
  2. re-validate on save in viewmodel/manager layer (safety)
  3. keep behavior identical on iOS and Android

Initial proposed bounds (sensible defaults):

  • name: max 50-100 chars
  • notes/bio: max 160-300 chars
  • tag: max 24 chars
  • link label: max 32 chars
  • link URL: max 512 chars
  • max links: 10
  • max tags: 10

Alternatives considered

  1. Keep only Android bio cap and leave the rest unbounded (reject: inconsistent, fragile).
  2. Limit only in UI, not in save layer (reject: can be bypassed, weaker safety).
  3. Add total payload-size guard only, no per-field bounds (reject: weak UX; users get late errors).

Additional context

  • Candidate fields: create profile, edit profile, edit contact, add-link sheet, add-tag sheet.
  • Product decisions required:
    • confirm proposed numeric limits above
    • UX at limit (truncate vs block typing vs validation error + blocked save)
  • Suggested acceptance criteria:
    • same limits on iOS and Android
    • max value accepted, max+1 handled as specified
    • existing profile/contact E2E flows remain stable
    • boundary tests added for critical fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions