Skip to content

feat(admin): program results summary panel for completed hackathons#194

Merged
sacha-l merged 8 commits into
developfrom
feat/admin-results-summary-panel
Jun 25, 2026
Merged

feat(admin): program results summary panel for completed hackathons#194
sacha-l merged 8 commits into
developfrom
feat/admin-results-summary-panel

Conversation

@sacha-l

@sacha-l sacha-l commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds ProgramResultsSummarySection component that renders inside the wallet-admin view of /admin/programs/:slug when program.status === "completed" — stats strip, top-3 per scoring category (with judge attribution), prize winners, honorary mentions, Recharts feedback charts + auto-generated insight text, gallery preview link
  • ProgramFormModal gains Gallery URL and Honorary Mentions fields (per-row name + video + GitHub), plus an inline completeness warning when switching status to "completed" with missing data
  • New Supabase migration adds honorary_mentions JSONB and gallery_url TEXT to the programs table
  • New admin-gated GET /programs/:slug/submissions/feedback-aggregate endpoint aggregates categorical feedback counts + free-text samples from all submissions (no PII)
  • Feedback visualization uses Recharts (already in package.json) with horizontal bar charts per categorical question; a deterministic buildFeedbackInsights() function generates a 2-3 sentence summary

Test plan

  • Apply migration in Supabase: supabase/migrations/20260625000000_program_results_metadata.sql
  • Navigate to /admin/programs/<hackathon-slug>, unlock admin data — confirm ProgramResultsSummarySection does not appear while status is open or closed
  • Set program status to completed via EDIT — confirm completeness warnings appear for missing gallery URL / honorary mentions / event dates
  • Add gallery URL + 3 honorary mentions → save → reload — confirm they appear in the results panel
  • Confirm stats strip (checked-in, submissions, winners, hours) matches numbers in ProgramStatsHeader
  • Confirm top-3 category columns show judge email + individual scores
  • Confirm feedback charts appear if submissions have feedback data; section hidden when total === 0
  • Confirm gallery section hidden when galleryUrl is null
  • cd client && npm run build && npm run lint — both pass ✓
  • cd server && npm test — 439/439 pass ✓

stadium-tester report

Target: http://localhost:8080 (dev:harness — mock mode + Alice test wallet)
Scenarios: 9 total, 9 pass, 0 fail, 0 skipped

# Scenario Result Notes
- preflight: mock mode enabled PASS window.__STADIUM_MOCK__ = true
1 Results panel absent on open program (m2-incubator) PASS RESULTS SUMMARY not visible on open program
2 Completeness warnings when switching to completed PASS Gallery / mentions / dates warnings all appear
3 Results summary panel renders on completed program PASS RESULTS SUMMARY heading visible after admin unlock
4 Stats strip: checked-in, submissions, hours PASS CHECKED IN visible, hours = 11
5 Honorary mentions (qubitrefill, VoiceBuy, LootDrop) PASS All three appear in panel
6 Gallery section renders with VIEW PHOTOS link PASS EVENT GALLERY + VIEW PHOTOS visible
7 Gallery section absent when galleryUrl is null PASS EVENT GALLERY not present on symbiosis-2025
8 Public bitrefill-2026 page renders without crash PASS Heading visible, RESULTS SUMMARY absent on public page

Console errors: 0 app errors (audit log fetch expected in mock mode, filtered)

Bugs found and fixed during tester run:

  • Orphaned setError call crashed the component with "Something went wrong / setError is not defined" (removed)
  • Em-dashes in completeness warning text (replaced with colons per style rules)

🤖 Generated with Claude Code

When a program is marked "completed", the wallet-admin view gains a
ProgramResultsSummarySection showing: checked-in / submission / winner /
hours-of-hacking stats, top-3 per scoring category with judge attribution,
prize winners with video + GitHub links, honorary mentions, Recharts
feedback charts with auto-generated insight text, and a gallery preview.

ProgramFormModal gains gallery URL + honorary mentions fields (with per-row
video/GitHub inputs) and an inline completeness warning when status is
set to "completed" with missing data.

Backed by a new DB migration (honorary_mentions JSONB, gallery_url TEXT
on programs), a new aggregateFeedback() repository method, and a new
admin-gated GET /programs/:slug/submissions/feedback-aggregate endpoint.
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
stadium Ready Ready Preview, Comment Jun 25, 2026 4:47pm

@sacha-l sacha-l marked this pull request as ready for review June 25, 2026 16:57
@sacha-l sacha-l merged commit 305f88b into develop Jun 25, 2026
2 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.

1 participant