[Feature:Forum] Improve anonymous name generation#12478
[Feature:Forum] Improve anonymous name generation#12478jndlansh wants to merge 1 commit intoSubmitty:mainfrom
Conversation
|
Hey @JManion32 ! Could you kindly review my code and tell me if anything else is required with this issue?! |
williamjallen
left a comment
There was a problem hiding this comment.
@jndlansh It looks like you have multiple different changes in this PR. Please revert the changes which aren't directly related.
3683063 to
27463a7
Compare
|
Hey @williamjallen! Kindly let me know if something else is off! |
williamjallen
left a comment
There was a problem hiding this comment.
@jndlansh It looks like you have some extra changes that don't belong in this PR currently. Those changes need to be reverted before we can proceed with the review process.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12478 +/- ##
============================================
- Coverage 21.70% 19.60% -2.11%
- Complexity 9626 9638 +12
============================================
Files 268 242 -26
Lines 36188 33368 -2820
Branches 486 486
============================================
- Hits 7856 6541 -1315
+ Misses 27850 26345 -1505
Partials 482 482
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
27463a7 to
3a193f7
Compare
ebe1b28 to
bde06ff
Compare
Now I have updated the PR with the required changes only. Can we now start the review process? |
Please read through the PRs related to #11999 to better understand the optimal solution, or choose another issue with no open PRs. |
Why is this Change Important & Necessary?
Related to #11999
The current chatroom anonymous name system uses a deterministic hash-based approach (md5(user_id + chatroom_id + host_id + session_time)), which has several security and UX issues:
What is the New Behavior?
Chatroom Header (Anonymous Mode):
[Chatroom Name] [Your Name: SwiftPanda427] [🔄 Regenerate Name] [Leave]
What steps should a reviewer take to reproduce or test the bug or new feature?
Verify table created:
SELECT * FROM chatroom_anonymous_names;Automated Testing & Documentation
Unit Tests
⚠️ TODO: Add integration tests for UI button interaction Create issue
✅ Name generation logic tested (40×40×900 combinations)
✅ Collision detection verified
✅ Database uniqueness constraints enforced
End-to-End Tests
⚠️ TODO: Add Cypress/Selenium tests for chatroom regenerate flow [Create issue]
Other information
migration/migrator/migrations/course/20260226143000_chatroom_anonymous_names.pyIf issues arise: