Smart search for tagging: prioritize relevant users in @ mentions#4327
Smart search for tagging: prioritize relevant users in @ mentions#4327SylvainChevalier wants to merge 5 commits intomainfrom
Conversation
When a user types @ to mention someone in a comment, the search results now prioritize users who are relevant to the post being commented on: 1. Users who have commented on the post (highest priority) 2. The post author and coauthors 3. Users with explicit project permissions (e.g., tournament members) Backend: Added optional `post_id` parameter to the `/users/` search endpoint. When provided without a search query, returns only relevant users. When combined with a search query, all matching users are returned but relevant ones are sorted to the top. Frontend: Threads `postId` from the comment feed through the mentions context to the API call, preserving the backend's relevance-based ordering. Closes #4280 Co-authored-by: Sylvain <SylvainChevalier@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@claude keep the requirement of 3 characters before suggestions. |
|
Claude finished @SylvainChevalier's task in 54s —— View job Verifying 3-character minimum for @ mention suggestions
ResultNo changes needed — the 3-character minimum requirement is already preserved in this PR at both layers:
The smart search changes (passing --- | |
🚀 Preview EnvironmentYour preview environment is ready!
Details
ℹ️ Preview Environment InfoIsolation:
Limitations:
Cleanup:
|
|
@claude what does the @ member tag do? |
|
Claude finished @SylvainChevalier's task in 35s —— View job What does the @ member tag do?
The Here's how it works step-by-step:
What this PR adds — the "smart search" enhancement: Previously, the search just matched usernames alphabetically. This PR adds a
This is implemented in View job | |
|
@claude I know that, I'm asking who receives notifications when @ members is used. |
|
Claude finished @SylvainChevalier's task in 1m 36s —— View job Who receives notifications for
|
|
@claude ok thanks. Two more refinements then:
|
|
Claude finished @SylvainChevalier's task in 3m 51s —— View job Implementing refinements to smart search
SummaryBoth refinements have been implemented in commit 1. Removed
2. Filtered non-priority users to recently active only (
3. Updated tests — added 3 new test cases:
Existing tests updated to give "other" users a recent comment via |
|
@claude functionality looks good, now fix the issues from the unit tests. |
|
Claude finished @SylvainChevalier's task in 22m 52s —— View job Fixing unit test issues
ResultAll CI checks are now passing. Fixed in 2 commits:
|
Closes #4280
Summary
post_idparam to/users/search endpoint to prioritize relevant users (commenters, authors, project members) in @ mention suggestionspostIdthrough frontend mentions context to API callTest plan
python -m pytest tests/unit/test_users/test_search.py -vGenerated with Claude Code