Repository navigation
feat(app-09): comprehensive test suite, session tracker, and doc-gardening - #176
Merged
Merged
Conversation
- POST /api/roles/invite — invite coach/admin by GitHub username - GET /api/roles — paginated role list (hackathon-scoped) - DELETE /api/roles/:id — remove role (primary admin protected) - GET /api/audit/:hackathonId — paginated audit trail with action filter - GET /api/config — list all app-wide config values - PATCH /api/config/:key — update config (read-only keys protected) Added isGlobalAdmin() for app-wide admin checks (config endpoints). 3 Zod schemas: role invite, audit list, config update. 24 tests covering auth, RBAC, primary admin protection, config read-only keys, pagination, and happy paths. 131/131 tests pass, tsc + eslint clean, business rules 28/28 pass.
…/award badges - API route: GET /api/leaderboard/[hackathonId] with score aggregation, tiebreaker (earliest last-approval), grade badges (A/B/C/D), award badges (Fastest, Highest per Challenge, Perfect Score) - SSR page: /leaderboard/[id] with generateMetadata, server-rendered initial HTML for fast first paint and shareable URLs - Client component: auto-refresh polling every 30s with countdown, expandable rows for per-challenge score breakdown - Shared lib: buildLeaderboard() used by both API and SSR page - Components: GradeBadge (color-coded A/B/C/D), AwardBadge - Gate: npm run build succeeds, tsc clean, 131/131 tests pass
- Reformat page route, Award badge, and Leaderboard table for consistency - Adjust line breaks in TypeScript and JSX for readability - Add new sync-issues.prompt.md for reconciling tracker with GitHub - Update session log formatting in execution tracker
app-08-dashboard: Build all frontend pages from ui-pages.md spec. Pages (10 routes): - / (landing with auth redirect) - /join (4-digit event code onboarding) - /dashboard (role-scoped: admin/coach/hacker views) - /admin/hackathons (CRUD, launch, archive, assign teams) - /admin/teams (view teams, reassign hackers) - /admin/rubrics (create rubric, dynamic categories, activate) - /admin/audit (paginated, filterable audit trail) - /admin/roles (invite users, remove roles, primary admin protection) - /admin/config (inline edit, read-only key protection) - /leaderboard/:id (existing, unchanged) Layouts: - Admin layout with sidebar, role guard, loading state - Shell layout via Navbar component Shared components (14): navbar, admin-sidebar, status-badge, empty-state, loading-skeleton, hackathon-picker, confirm-dialog, pagination-bar, progress-bar, challenge-card, submission-form, review-card, rubric-form Infrastructure: - /api/me endpoint (auth principal + roles) - useAuth and useFetch hooks for client components - Extended lucide-react type declarations Gate: npm run build succeeds, tsc clean, 131/131 tests pass, 28/28 business rules pass
- Add leaderboard.test.ts (17 tests): ranking, tiebreaker, grade badges, award badges (Fastest to Complete, Highest Score, Perfect Score), challenge breakdown, edge cases - Add audit.test.ts (2 tests): audit record creation with all fields - Add utils.test.ts (4 tests): cn() Tailwind merge utility - Add challenge-gate.test.ts (9 tests): gate checking, progression advancement with ETag, edge cases - Add health.test.ts (1 test): health endpoint - Add me.test.ts (7 tests): auth, role derivation, dev bypass, error handling - Add leaderboard-api.test.ts (3 tests): route handler with cache headers - Extend roles.test.ts with isGlobalAdmin tests (4 tests) - Configure @vitest/coverage-v8 with 80% thresholds - Exclude hooks from coverage (client-side React, no business logic) Coverage: lines 93.01%, branches 86.05%, functions 88.88% Gate: 178/178 tests pass, tsc clean, business rules 28/28
- Application grade A-→A: 178 tests, 93% coverage, 24 routes, 10 pages - Fix instruction count 21→28 in docs/README.md (debt #21) - All validators pass: freshness, instructions, skills, agent frontmatter - No new active debt items discovered
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.
Summary
Completes Phase E Step 9 (app-09-tests) and runs doc-gardening health checks.
Changes
1. Test Suite (app-09) — Commit 1a92ad3
2. Session Tracker Update — Commit 278d69b
3. Doc Gardening — Commit 420262b
Gates
Testing
Run locally to verify:
Related Issues
Closes #6 (app-08 complete), #9 (app-dev skills), #10 (app-dev instructions)