Page MenuHomePhabricator

Make username autocomplete proposals order more context aware
Closed, ResolvedPublicFeature

Description

Upstreamed as https://we.phorge.it/T16126

In an ideal world, typing @ and a letter in a Phab task would not start listing non-disabled user accounts alphabetically, but take context in account (task author, task subscribers, task assignee) and show these usernames as the first proposals if they match the letter(s) entered by the user, followed by the current results.

However, src/applications/people/query/PhabricatorPeopleQuery.php ::getOrderableColumns() only takes 'username' into account, and src/applications/people/typeahead/PhabricatorPeopleDatasource.php ::loadResults() is completely context independent (we have no way to find out which current object our given src/view/form/control/PhabricatorRemarkupControl.php is located in).

PhabricatorCursorPagedPolicyAwareQuery has some options to influence the Vectors but nothing that seems useful for this use case.

That might involve some non-existing query for "anyone involved with an object (task), covering PhabricatorObjectHasSubscriberEdgeType::EDGECONST, ManiphestTask::getOwnerPHID(), ManiphestTask::getAuthorPHID().
And some additional code to inject that before other search results if the entered character(s) match for some of those accounts.

Filing this ticket as having this tracked here is better than getting lost on my local harddisk.

Event Timeline

Aklapper triaged this task as Low priority.
Aklapper edited projects, added Phabricator (Upstream), Upstream; removed Phabricator.
Aklapper updated the task description. (Show Details)
Aklapper moved this task from Backlog to Upstreamed on the Phabricator (Upstream) board.
Aklapper moved this task from Backlog to Reported Upstream on the Upstream board.

(The upstream task is closed as resolved, and the (main) patch linked to it was deployed downstream in T409947: Merge and deploy upstream master from Phorge as of 2025-11-12. To confirm, is there anything left to do here? xref. the comments in T409640: "@" suggestions should come from participants user list first)

Uh, thanks. I somehow forgot about this ticket.

Aklapper moved this task from Patch proposed upstream to Patch merged upstream on the Upstream board.
Aklapper added subscribers: Jidanni, Johannnes89.

This ticket got resolved as part of the Phabricator upgrade in T409947. See J322 for a full list of changes.