ReviewOS

stacks/wildloop

User search / discovery + @mentions

#971
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Problem

No user search endpoint, no discover page, no @mention support in comments — so users can't find or reference each other.

Acceptance

  • /api/users/search?q= endpoint; a discover/find-athletes view.
  • @mention autocomplete in comments (links to profiles).
9 days ago

Done in 978757f.

  • GET /api/users/search?q= (public): 2+ characters → case-insensitive LIKE on name; no/short query → a discover list of the most active athletes. Registered before /users/{id} so 'search' isn't swallowed as a route param. Results carry activity/follower/territory stats.
  • /athletes discover page (in the nav): debounced search, stat-rich athlete cards, optimistic follow/unfollow with rollback (same pattern as the feed).
  • @mention autocomplete in comments: typing @… shows ranked candidate chips (full names with spaces supported — @Rival Runner); picking one completes the text. Comment bodies linkify known @Name tokens to /athlete/{id} at render time via pure parseMentions (longest-name-first disambiguation, emails like a@b.com ignored). Mentions stay plain text on the wire — no schema change.

Verified by scripts/verify-user-search.ts (16 checks). All 13 suites green.

Sign in to comment on this issue.