Skip to content

feat: improve compose mention search and display#239

Merged
barrydeen merged 1 commit intomainfrom
feat/compose-mentions
Mar 13, 2026
Merged

feat: improve compose mention search and display#239
barrydeen merged 1 commit intomainfrom
feat/compose-mentions

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Display @name instead of raw nostr:nprofile1... in compose text field using OutputTransformation
  • Search mentions from ObjectBox (persisted kind 0 events) instead of in-memory LruCache — contacts are searched first via ProfileRepository, remaining slots filled from DB
  • Filter mention results by name/displayName only, cap at 5 results
  • Remove duplicate media previews below text field (already visible in live preview)

Test plan

  • Type @ followed by a name of someone you follow — should appear at top of results
  • Select a mention — should display as @name in the text field, publish as nostr:nprofile1...
  • Backspace into a mention — should delete the entire mention
  • Upload media — no duplicate preview below text field, visible in live preview only
  • Search for a name you don't follow — should show results from ObjectBox after contact results

- Use OutputTransformation to display @name instead of raw nostr:nprofile1... in compose text field
- Search mentions from ObjectBox (kind 0 events) instead of in-memory LruCache
- Prioritize followed contacts in mention results, fall back to DB for remaining slots
- Filter mention results by name/displayName only, not full profile JSON
- Remove duplicate media previews (already visible in live preview)
- Cap mention results at 5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@barrydeen barrydeen merged commit 51e2d3e into main Mar 13, 2026
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.

1 participant