Skip to content

Comments

Add @mentions autocomplete in group chat compose#125

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-mentions-auto-completion
Draft

Add @mentions autocomplete in group chat compose#125
Copilot wants to merge 3 commits intomainfrom
copilot/add-mentions-auto-completion

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

When drafting a message in a group chat, typing @ now shows an inline autocomplete list of group members filtered in real-time as you continue typing. Selecting a suggestion inserts @DisplayName at the cursor position.

Changes

  • conversation_activity.xml — Added a RecyclerView (mention_suggestions) above the input panel, hidden by default
  • mention_list_item.xml (new) — List item layout showing a circular contact avatar, member display name, and email address
  • MentionAdapter.java (new) — RecyclerView adapter backing the suggestion list; loads contact avatars via AvatarImageView and Glide; exposes OnMentionClickListener for selection callbacks
  • ConversationActivity.java:
    • updateMentionSuggestions() — runs on every afterTextChanged, detects @<query> before the cursor, filters chat members by display name or address, shows/hides the list
    • insertMention(DcContact) — replaces the @<query> span with @DisplayName and advances the cursor
    • Only active in multi-user chats (dcChat.isMultiUser()); list hides when a space/newline follows @ or no members match

Example flow

User types: "Hey @ali"
→ suggestion list shows contacts (with avatars) whose name/address contains "ali"
User taps "Alice Smith"
→ text becomes: "Hey @Alice Smith "
Original prompt

This section details on the original issue you should resolve

<issue_title>add @mentions support/auto-completion when drafting a message</issue_title>
<issue_description>similar to Telegram app, when user is writing a message they should be able to get mention auto-completion with the memberlist of the current group chat when typing @ </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
Copilot AI changed the title [WIP] Add @mentions support for message drafting Add @mentions autocomplete in group chat compose Feb 21, 2026
Copilot AI requested a review from adbenitez February 21, 2026 18:04
@adbenitez
Copy link
Collaborator

@copilot in the completion list the avatar of the contacts should also be displayed at the start in front of the name

Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

@copilot in the completion list the avatar of the contacts should also be displayed at the start in front of the name

Done in d8ba265. Each suggestion row now shows a circular avatar (32dp) before the contact name, loaded via AvatarImageView with Glide — including fallback generated avatars when no photo is set.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx4608m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.13-bin/5xuhj0ry160q40clulazy9h7d/gradle-8.13/lib/gradle-daemon-main-8.13.jar (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

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.

add @mentions support/auto-completion when drafting a message

2 participants