Replace `UserAction::getSearchResultList()` with an RPC endpoint and modernize the user search JS
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, php, typescript
- Domain
- api, backend-api-design, frontend
Research direction
Start by reading UserAction::getSearchResultList() and validateGetSearchResultList(), then trace the listed consumers in ts/WoltLabSuite/Core/Ui/User/Search/Input.ts, ts/WoltLabSuite/Core/Ui/ItemList/User.ts, and the ACL and user form templates. Compare the existing GetMentionSuggestions endpoint and its TypeScript wrapper for the proposed RPC shape. Done means consumers use the new endpoint, deprecated wrappers preserve the listed compatibility behavior, and the legacy WCF.Search.User code is removed while UserAction remains for BC.
Written by the indexing model from the issue text.
Description
UserAction is deprecated. The only part still actively used is getSearchResultList() / validateGetSearchResultList().
JS consumers
- ts/WoltLabSuite/Core/Ui/User/Search/Input.ts (UiUserSearchInput, a subclass of Ui/Search/Input)
- ts/WoltLabSuite/Core/Ui/Acl/Simple.ts (shared_aclSimple.tpl): users + groups, excluded values
- ts/WoltLabSuite/Core/Ui/Acl/List.ts (shared_aclPermissionJavaScript.tpl, Form/Builder/Field/Acl.ts): users ± groups
- ts/WoltLabSuite/Core/Ui/ItemList/User.ts (init()/getValues() on top of Ui/ItemList)
- shared_userFormField.tpl (UserFormField)
- search.tpl (author filter of the extended search)
- also used by third-party packages, e.g. to select conversation participants
- WCF.Search.User in wcfsetup/install/files/js/WCF.js (deprecated since 3.0, jQuery-based)
Already modernized
Mentions no longer use this action. The editor uses GET /core/messages/mention-suggestions (GetMentionSuggestions, Api/Messages/MentionSuggestions). That leaves the scope=mention branch in getSearchResultList() without a caller in core.
Proposal
- New RPC endpoint, e.g. GET /core/users/search (name TBD), with a typed parameter class:
- query (non-empty, prefix match)
- includeGroups: bool
- restrictGroupIDs: int[]
- excludedUsernames/excludedGroupIDs, or have the client filter the results instead (see open questions)
It returns structured data (type, userID/groupID, name, avatarTag for users), following GetMentionSuggestions, instead of a generic label + HTML icon. Add a matching ts/WoltLabSuite/Core/Api/Users/… wrapper.
- Modernize the JS:
- Build a replacement for Ui/User/Search/Input and Ui/ItemList/User on top of the new endpoint, possibly as a Component/User/… module.
- Migrate Ui/Acl/Simple, Ui/Acl/List, shared_userFormField.tpl and search.tpl.
- Keep Ui/ItemList/User and Ui/User/Search/Input as thin deprecated wrappers backed by the endpoint, so that third-party code keeps working, including getValues() and the csvPerType / …GroupIDs shadow input.
- Deprecate/remove legacy code:
- Remove WCF.Search.User (deprecated since 3.0).
- Leave UserAction::getSearchResultList() in place for BC for now and remove it together with UserAction. Drop ISearchAction from UserAction and the scope=mention handling.
- Dominant language
- PHP
- Stars
- 248
- Forks
- 147
- Avg merge
- 17m
- Merged PRs (30d)
- 21
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WoltLab/WCF
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
WoltLab/WCF#6771 · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
bug: juros do parcelamento travados em 1x no gateway Rede Débito e Crédito 3DS (woo-rede 5.6.0)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LinkNacional/woo-rede#367 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Translation is missing for sw-app.component.sw-app-shop-id-change-modal.error.shop-id-change-failedOpenneeds-triage Platform(Default)
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Configuration consistency enhancement
Difficulty 2/5 Under an hour Newbie friendliness 72/100
novalo-dev/Prestashop-MCP-Server#405 ·
Maintainers usually reply within 1 day
-
OpenRouter errors returned in a 200 body are thrown as a plain AiExceptionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 2 days