Add initial Mini Vibeathon competition domain#25
Conversation
Co-authored-by: faizntfd <faizintfd@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 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 |
Co-authored-by: faizntfd <faizintfd@gmail.com>
|
@julianromli I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd838879ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const projectMap = new Map<string, string>( | ||
| (projectsResult.data || []).map((p: { id: string; title: string }) => [p.id, p.title]), | ||
| ) |
There was a problem hiding this comment.
Preserve numeric project IDs in report title lookup
Project reports can now render as Unknown Project because this map stores raw projects.id values (typically numbers from Supabase for integer columns) but later lookups use entityInfo.entityId as a string. In JavaScript Map, numeric key 1 and string key '1' are different, so project titles are missed whenever a reported comment belongs to a project.
Useful? React with 👍 / 👎.
| .eq('status', 'active') | ||
| .order('starts_at', { ascending: false }) | ||
| .limit(1) |
There was a problem hiding this comment.
Constrain active competition selection to the live date window
This query picks the most recent row with status = 'active' but does not enforce starts_at <= now < ends_at. If multiple competitions are marked active (or one is left active after ending), pages that rely on getActiveCompetition() can bind to the wrong competition, causing submission/vote flows to point at a closed or not-yet-open event.
Useful? React with 👍 / 👎.
Co-authored-by: faizntfd <faizintfd@gmail.com>
Summary
Verification
npx @biomejs/biome checkon the changed competition/comment filesnpx --package typescript tsc --noEmitbut the cloud image does not have the workspace dependencies installed, so the run is blocked by repo-wide missing-module errors before it can validate this slice