[codex] Separate active private competitions on home#228
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11c969bd01
ℹ️ 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".
| jsonb_build_object( | ||
| 'id', l.id, | ||
| 'name', l.name, | ||
| 'visibility', l.visibility, |
There was a problem hiding this comment.
Add migration before selecting leaderboard visibility
This query now selects l.visibility, but the repo’s canonical DB schema (tests/data.sql, leaderboard.leaderboard definition) does not include a visibility column, and that schema is loaded by tests/conftest.py and mounted in docker-compose.dev.yml. In those environments /api/leaderboard-summaries will error with column l.visibility does not exist, so this change breaks the default test/dev path unless a schema migration (and fixture update) is added alongside the API change.
Useful? React with 👍 / 👎.
Summary
This changes the home page leaderboard grouping so active private competitions do not appear in the main active/public section.
visibilityfrom the leaderboard summaries APIvisibility === "closed"on the frontend to render active invite-only competitions in a separatePrivate CompetitionssectionClosed CompetitionssectionWhy
Closed/private competitions should still use their normal leaderboard URLs, but they should not be mixed into the main public competition list on the home page. Active private competitions now get their own section before closed/expired leaderboards, while expired private competitions still sink to the bottom with the rest of the expired items.
Validation
npm test -- --run src/pages/home/Home.test.tsxNotes