Conversation
* Replace simple Q&A with threaded message system for contest questions Contest questions now support multi-message threads between contestants and management instead of a single question/response pair. Each thread has its own dedicated page with message history and reply form. Backend: new contest_chat_messages table, GET/POST message endpoints, author name resolution on responses, last_message_member_id for status tracking. Existing questions migrated to chat messages in migration 53. Frontend: member-side thread list with dedicated thread page, management-side table with status/member columns and thread detail page. Messages color-coded by role (contestant vs management). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address PR review feedback - Fix "waiting" indicator to use last_message_member_id instead of last_message_at (which is always set after migration) - Copy arrays before sorting to avoid mutating react-query cache - Use BigInt comparison for message sorting instead of Number() cast - Batch member lookup with eqIn instead of N+1 selectOneFrom queries - Derive contest from thread.contest_id instead of route param to prevent wrong contest name in notifications - Use getSnowflakeTime() in migration instead of hardcoded epoch - Remove legacy PATCH endpoint (no old clients to support) - Remove unused selfMemberId prop from ContestChatSection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address second round of PR review feedback - Remove hardcoded snowflake bit-shift fallback in frontend sorting, use BigInt comparison instead - Use generateSnowflake() for response message IDs in migration instead of question.id + 1n which risks primary key collision - Allow admins (VIEW_CONTEST) to access GET messages endpoint without being a contest member, mirroring the list endpoint behavior - Allow admins (EDIT_CONTEST) to send messages via POST endpoint without contest membership - Add minLength: 1 to MessageSchema to prevent empty messages - Convert users array to Map for O(1) lookups in name resolution Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Address third round of PR review feedback - Remove admin-without-membership path in POST messages — admins must be contest members to send messages (management UI already requires VIEW_PRIVATE membership). This avoids storing user.id as author_member_id which breaks name resolution. - Add fallback in name resolution: if author_member_id not found in contest_members, try looking it up directly in users table. - Drop showAllUsers: true from useAllContestMembers calls in management pages to avoid query key cache collisions with other pages using the same hook with default options. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * thing --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Antonio F. Trstenjak <antoniostignjedec@gmail.com>
✅ Deploy Preview for steady-gumdrop-d7550d ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for astonishing-pasca-ac7b9b ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Antony1060
approved these changes
Mar 26, 2026
* Add temporary users locked to specific contests Admins can bulk-create temporary users from a list of names with a configurable username prefix (e.g. nap2026_vpavlica). These users get auto-generated credentials, are locked to their assigned contests, and see a stripped-down frontend with no dashboard, org picker, or admin access. - New "temporary" auth source with username/password login - temporary_users DB table + migration 0054 - Bulk-create endpoint with name-based username generation and diacritics stripping - Restricted frontend route tree for temporary users - Temp login page at /temp-login - CSV download for generated credentials Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Remove unused returnedContests variable Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Apply suggestion Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Antonio F. T. <antoniostignjedec@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.