Skip to content

Conversation

@cybernova2
Copy link

This PR updates the @-mention autocomplete behavior to match the web app.

When a user backspaces inside a formatted mention (e.g. @**Chris Bobbe**),
the autocomplete is now reopened by stripping the formatting and re-evaluating
the mention query, instead of suppressing autocomplete entirely.

As part of this change:

  • Mention autocomplete logic was updated to normalize formatted mentions
    before matching.
  • Model tests were updated to reflect the new behavior when backspacing
    inside formatted mentions.
  • Widget tests were updated to assert the correct lifecycle of the
    autocomplete UI, which is now unmounted when no valid intent exists
    instead of remaining visible with empty results.
  • Async widget tests were fully settled after choosing an option to avoid
    pending timers at teardown.

Screenshots attached show the behavior before and after this change.

Before: Backspacing inside a formatted mention does not reopen autocomplete.
WhatsApp Image 2025-12-14 at 18 44 11_3d0d395c

After: Autocomplete reopens correctly, matching web behavior.
Screenshot_20251214_183837

Fixes #1967

…ted mentions

Match web behavior by reopening mention autocomplete when backspacing
inside formatted mentions like @**Name**. Update model and widget tests
to reflect the new autocomplete lifecycle.
@chrisbobbe
Copy link
Collaborator

This implementation doesn't look how I would expect it to. #1967 points to the implementation of a "similar behavior" in another kind of autocomplete—could you please read that carefully and use it to inform your work here?

@gnprice
Copy link
Member

gnprice commented Dec 16, 2025

Closing because I don't expect this PR to become something that's a good use of our time to review.

@cybernova2 Please take the time to read our contributing guide, which is linked to in our README. This issue isn't marked with "help wanted", because we don't expect it to be accessible to a new contributor. As the contributing guide says:

Can I work on an issue that’s not marked as “help wanted”? The entire purpose of the “help wanted” label is to indicate which issues are open for contribution, so the answer is generally “no”. Please feel free to ask if you have a merged PR in a closely related part of the codebase, and the issue has a clear product spec, and no obvious blockers. Otherwise, asking to claim an issue without a “help wanted” label clutters up comment threads, and wastes maintainer time.

Moreover you have an active PR already — in fact two of them, #2019 and #2025. As the contributing guide says, please stick to one issue at a time until you have a first PR merged in Zulip. There's plenty for you to fix in those PRs before you ask the core team to spend more time again reviewing another PR.

@gnprice gnprice closed this Dec 16, 2025
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.

After choosing an @-mention option, backspacing should reopen autocomplete

3 participants