Skip to content

feat: profile My Challenges section + fix community challenge history titles - #22

Merged
Jhong098 merged 1 commit into
mainfrom
feat/profile-my-challenges
May 4, 2026
Merged

feat: profile My Challenges section + fix community challenge history titles#22
Jhong098 merged 1 commit into
mainfrom
feat/profile-my-challenges

Conversation

@Jhong098

@Jhong098 Jhong098 commented May 4, 2026

Copy link
Copy Markdown
Owner

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/
    instead of displaying the raw "community:" 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

… 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
@vercel

vercel Bot commented May 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
poly-sd Ready Ready Preview, Comment May 4, 2026 0:11am

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.50%. Comparing base (653a9ea) to head (4df50fa).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Jhong098
Jhong098 merged commit ae4ed03 into main May 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: profile page — "My Challenges" section for authors + fix community challenge history display

3 participants