Add project claims and personal hacker judging itineraries - #560
Conversation
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
|
@coderabbitai review |
Co-authored-by: Codex <codex@openai.com>
|
Warning Review limit reachedNext included review available in 8 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (26)
📝 WalkthroughWalkthroughAdds a complete project-claims workflow for checked-in hackers. The change adds claim links, invitations, roster limits, organizer recovery, emergency lookup, personal judging itineraries, feedback visibility, SDK procedures, portal UI, database migration, email delivery, audit coverage, and tests across API, SDK, Blade, and KHIX. Priority: ➖ Normal Merge Risk: 🟠 High · up to The current implementation can hide claimed teams and feedback, leave claim state inconsistent after project deletion, expose participant status through invitations, and make claim delivery unreliable. These issues should be resolved before merge. 🚥 Pre-merge checks | ✅ 5 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation Issue Full details: Docstring CoverageExplanation Docstring coverage is 4.88% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 33 files. (7 skipped: 7 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 12
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/api/src/routers/projects.ts (2)
730-730: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winReject
dropAllwhen any project has claim state.Before
tx.delete(Project), check forProjectClaimorProjectClaimLinkrows in the hackathon and raise a conflict.ProjectClaimusesonDelete("restrict"), so claims currently make the hard delete fail at the foreign key. Claim links cascade throughProjectMemberand are otherwise erased bydropAll.
993-999: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winReject deletion when claim state exists. Before updating
Project.deletedAt, check forProjectClaimrows andProjectClaimLinkrows throughProjectMember.assertNoProjectReservationschecks onlyJudgingAppointment, so deletion can leave claim state whileclaimLinkRecordandhackerJudgingexclude the deleted project.
🟡 Other comments (2)
apps/blade/src/app/_components/judging/project-claims-panel.tsx-144-144 (1)
144-144: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep table columns usable on narrow screens.
Add a minimum width to the table so the existing scroll container scrolls it. The current four-column table compresses contact and action columns on mobile.
packages/api/src/tests/integration/project-claims.test.ts-133-133 (1)
133-133: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winIsolate the project-claims fixtures per test.
The root
testscript runs the API Vitest suite whencanRunDatabaseTests()allows it.TC-007/015/016expectsusers[0]to ownproject, andTC-011expectsprojectClaimsStartedAt; both states are created only whenTC-001/010/014callsselectProjectMember. These tests fail when run alone or before that test. Create fresh fixtures per test, and seed claimed state only for tests that require it. Keep first-claim tests on an unclaimed fixture.
🧹 Nitpick comments (2)
packages/api/src/routers/project-claims.ts (1)
206-209: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winRecord why a delivery failed.
Rejected results are discarded.
failedreaches the officer as a bare count, andprojectClaimDeliverycan reject for distinct reasons: a missing claim URL, an event that already ended, a consumed link, or a provider error. None of these are distinguishable afterwards.Log
result.reasonfor each rejection.♻️ Proposed change
for (const result of results) { if (result.status === "fulfilled") sent++; - else failed++; + else { + failed++; + console.error("project claim delivery failed", result.reason); + } }.forge/features/project-claims/test-cases.md (1)
11-11: 🎯 Functional Correctness | 🔵 Trivial | 🏗️ Heavy liftAdd separate executable regressions for the remaining SRD invariants.
Cover provider failures that preserve the reserved slot and unused credential, read errors that hide stale itinerary content, guest completion that updates status without exposing guest content, and existing oversized projects that reject claims and invitations. Keep duplicate invitation retries and incoming oversized imports out of this addition because existing tests already cover them.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: QUIET
Plan: Advanced
Run ID: 0ec41dda-c4e4-43aa-83fa-2ef2b6fc600a
⛔ Files ignored due to path filters (1)
packages/api/src/tests/root/__snapshots__/api-surface.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (41)
.forge/features/project-claims/spec.md.forge/features/project-claims/srd.md.forge/features/project-claims/status.md.forge/features/project-claims/test-cases.mdapps/2026/src/app/(portal)/_components/hacker-judging.module.cssapps/2026/src/app/(portal)/_components/hacker-judging.tsxapps/2026/src/app/(portal)/_components/khix-dashboard.tsxapps/2026/src/app/(portal)/dashboard/judging/page.tsxapps/2026/src/lib/hacker-portal.tsxapps/blade/src/app/_components/judging/appointment-move-dialog.tsxapps/blade/src/app/_components/judging/project-claims-panel.tsxapps/blade/src/app/_components/judging/project-command-center.tsxapps/blade/src/app/admin/judging/page.tsxpackages/api/src/hacker-portal/router.tspackages/api/src/projects-import.server.tspackages/api/src/routers/judging.tspackages/api/src/routers/project-claims.tspackages/api/src/routers/projects.tspackages/api/src/tests/integration/project-claims.test.tspackages/api/src/tests/projects/devpost-import.test.tspackages/api/src/utils/audit/coverage.tspackages/api/src/utils/judging-schedule/appointments.tspackages/api/src/utils/project-claims/claims.tspackages/api/src/utils/project-claims/itinerary.tspackages/api/src/utils/projects/devpost-import.tspackages/db/drizzle/0054_worried_reptil.sqlpackages/db/drizzle/meta/0054_snapshot.jsonpackages/db/drizzle/meta/_journal.jsonpackages/db/src/schemas/knight-hacks.tspackages/email/src/index.tspackages/email/src/project-claim.tspackages/email/src/tests/project-claim.test.tspackages/hacker-sdk/src/contracts.tspackages/hacker-sdk/src/react.tsxpackages/hacker-sdk/src/tests/contracts.test.tspackages/validators/src/audit.tspackages/validators/src/hacker-portal.tspackages/validators/src/index.tspackages/validators/src/project-claims.tspackages/validators/src/projects.tspackages/validators/src/tests/hacker-portal.test.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
|
Co-authored-by: Codex <codex@openai.com>
|
Updated visual pass after the requested refinements. These 23 captures replace the earlier UI examples. The generic email was delivered and visually inspected in Zoho. |
|
Addressed the review in f0d52a0. CodeRabbit has acknowledged the fixes and scope decisions and resolved all 12 inline threads. The grouped findings are covered too:
The MR now includes 23 updated screenshots. The generic claim email was sent to the authorized preview address and visually inspected in Zoho. Local static checks and the affected package suites passed; final CI is running. |
Co-authored-by: Codex <codex@openai.com>
|
Final verification passed on b9d78ec. CI is green for tests, build, typecheck, lint, formatting, database tests, and fresh/upgrade migration checks. Production migration was skipped as expected for an MR. CodeRabbit acknowledged the fixes and scope decisions and resolved all 12 review threads. Its subsequent full-review attempt was rate-limited. The 23 updated screenshots and the Zoho-verified generic email cover the requested visual refinements. No merge or deployment performed. |
























Why
Hackers need judging directions for their own project without exposing room assignments for other teams. Devpost emails differ from hacker profile emails, so ownership starts with an emailed claim link.
What
Closes: #559
Migration 0054 is additive. Apply it before deploying consumers; retain claim records and the first-claim import lock on rollback. No environment-variable or dependency additions. No automatic disqualification, rescheduling promises, token rotation/revocation, or claim-correction workflow.
Test Plan
pnpm verify:precommit: passed (React analysis, formatting, lint, monorepo typecheck).Visual evidence
23 updated screenshots with synthetic data. Screenshot discussion.
Blade claims and publication state
Blade publication dialog
Blade emergency search dialog
Blade email confirmation
Blade linked profiles and recipient delivery
Blade recipient table on mobile
KHIX project member selection
KHIX claimed project before publication
KHIX invitation dialog
KHIX invitation dialog on mobile
KHIX invitation dialog at 320px
KHIX project itinerary
KHIX mobile itinerary and unscheduled card
KHIX completed judging feedback
KHIX feedback dialog on mobile
KHIX missed appointment dialog
KHIX missed dialog on mobile
KHIX emergency project search
KHIX emergency search on mobile
KHIX locked before check-in
KHIX locked before initial email delivery
Knight Hacks project-claim email
Knight Hacks email on mobile