Skip to content

refactor(profile): centralize profile URL building with NIP-05-aware routing #353

@DSanich

Description

@DSanich

refactor(profile): centralize profile URL building with NIP-05-aware routing

Profile links are currently built ad-hoc in multiple places, and at least one path still uses an explicit “for now” fallback (npub-only URL construction in VideoCard).
This creates route inconsistency, makes future profile routing changes risky, and increases the chance of user-facing navigation drift.

Problem

  • Profile URL construction is not centralized.
  • Some call sites still rely on temporary npub-only link generation.
  • Route behavior can diverge between components over time.

Scope

  • Introduce a shared profile-link utility (or hook helper) in a single module.
  • Make the helper NIP-05-aware (when data is available) with a deterministic fallback to npub.
  • Replace direct profile URL string-building in affected components (starting with VideoCard and other high-traffic profile-entry points).
  • Keep existing navigation behavior backward-compatible (no breaking route changes in this issue).

Out of scope

  • Changing public profile route format across the whole app.
  • New profile discovery UX.
  • Backend identity resolution changes.

Definition of done

  • Profile links in targeted components are built through one shared helper.
  • No remaining “for now” profile-link comment in VideoCard.
  • Navigation remains stable for users with and without NIP-05 metadata.
  • No regressions in profile-link related tests (or add targeted tests if coverage is missing).

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