Page MenuHomePhabricator

DiscussionTools Reply-tool mention user should populate the user you are replying to
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Have the reply-tool enabled
  • Go to a threaded discussion that contains multiple users
  • Use reply-tool to reply to someone other than the original poster
  • Click on the Mention a user control

What happens?:
The reply tool starts and has the greet text of "Reply to USERNAME" (see image)
When clicking on the Mention a user control the username from the first user in the section is populated, no other names are in the populated box (see image)

What should have happened instead?:
The username that is in the greet text (the person you are actually replying to) should be available in the mention a user control selection box here (likely as the default, at the least as a populated selection).

Software version (skip for WMF-hosted wikis like Wikipedia):
WMF production

Other information (browser name/version, screenshots, etc.):
Users wanting to reply-to someone specific now have to manually lookup that user from the project entire account list to get the mention added. If they wanted to reply-to the original poster, they should be clicking the reply-to link on the original post.

image.png (236×393 px, 13 KB)

image.png (284×322 px, 14 KB)

Event Timeline

Shouldn't be related to that task -- that was a specific bug related to how we were triggering the display of the popup. If any completions at all are showing, it'd be something different. It could perhaps be related to something like T251446 though.

The popup should be containing (at least) everyone who's in the thread.

e.g.

image.png (754×1 px, 206 KB)

Could you link to the page you're using as an example so I can take a look and see why it's only picking up one user?

See larger image from that page as well:

image.png (721×1 px, 115 KB)

Hm, it's happening to me as well now on the page I used as an example. I think this is a bug that's restricting the number of local usernames to 1 regardless of the page content.

Okay, I think it's a side-effect of https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/811388 rewriting some of the thread summary logic. It switched a bunch of methods to build a cache of metadata when it's first requested... but the first-request turns out to happen before the reply tree is actually build, so it's all based solely on the very first comment in the thread.

Specifically, ThreadItemSet.static.newFromAnnotatedNodes does parser.computeName(item) as it's adding replies to the tree, which for a heading then does mainComment = threadItem.getOldestReply().

Change 833087 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/DiscussionTools@master] ThreadItemSet.newFromAnnotatedNodes needs to wait to compute names

https://gerrit.wikimedia.org/r/833087

Change 833087 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] ThreadItemSet.newFromAnnotatedNodes needs to wait to compute names

https://gerrit.wikimedia.org/r/833087

✅ The username that is in the greet text (the person you are actually replying to) should be available in the mention a user control selection box here (likely as the default, at the least as a populated selection).

Screenshot 2022-09-21 at 09.41.20.png (848×1 px, 141 KB)

💔 The username that is in the greet text (the person you are actually replying to) is not available in the mention a user control selection box when it's an ip address(a user that wasn't logged in maybe). @DLynch, is this expected?

Screenshot 2022-09-21 at 09.27.06.png (846×1 px, 174 KB)

@EAkinloose Yes - that is expected because IP users don't receive pings.

EAkinloose edited projects, added Verified; removed Editing QA.

@EAkinloose Yes - that is expected because IP users don't receive pings.

Thanks for clarifying.