feat: profile My Challenges section + fix community challenge history titles - #22
Merged
Conversation
… titles Closes #21. lib/actions/community-challenges.ts: - getMyAuthoredChallenges() — returns all challenges authored by the current user (id, title, tier, attempt/pass/upvote counts, status, published_at), newest first - getCommunityChallengeTitles(uuids) — batch-fetches a UUID→title map for resolving community challenge IDs in the completions history app/profile/page.tsx: - "My Challenges" section for is_challenge_author users: lists published challenges with attempt count, pass rate, upvote count, and a View link - History rows: community challenge completions now show the challenge title (via getCommunityChallengeTitles) and link to /community/<uuid> instead of displaying the raw "community:<uuid>" ID string - Also tightens the XP bar transition from transition-all to transition-[width] tests/unit/lib/communityChallengess.test.ts: - 7 new unit tests covering auth guard, normal data, empty result, and DB error paths for both new server actions https://claude.ai/code/session_017P7S4SuivspHeeXfok7WzX
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
=======================================
Coverage 72.50% 72.50%
=======================================
Files 11 11
Lines 440 440
Branches 134 134
=======================================
Hits 319 319
Misses 72 72
Partials 49 49 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Closes #21.
lib/actions/community-challenges.ts:
current user (id, title, tier, attempt/pass/upvote counts, status,
published_at), newest first
for resolving community challenge IDs in the completions history
app/profile/page.tsx:
challenges with attempt count, pass rate, upvote count, and a View link
title (via getCommunityChallengeTitles) and link to /community/
instead of displaying the raw "community:" ID string
transition-[width]
tests/unit/lib/communityChallengess.test.ts:
and DB error paths for both new server actions
https://claude.ai/code/session_017P7S4SuivspHeeXfok7WzX