feat: allow custom school names in KHIX applications - #501
Conversation
Co-authored-by: Lenny <lenny@knighthacks.org>
Co-authored-by: DGoel1602 <rhygonfn@gmail.com> Co-authored-by: Lenny <lenny@knighthacks.org>
Co-authored-by: Lenny <lenny@knighthacks.org> Co-authored-by: Adrian Osorio Blanchard <osorioadrian04@gmail.com>
Co-authored-by: Carlos <carlos@catala.dev> Co-authored-by: Codex <codex@openai.com> Co-authored-by: Kai Sprunger <59074829+morallyearlgrey@users.noreply.github.com> Co-authored-by: jason sacerio <saceriojason@gmail.com> Co-authored-by: º • 🌱 kai 🌱 • º <kaisprunger@gmail.com>
Co-authored-by: Adrian Osorio Blanchard <osorioadrian04@gmail.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
|
Warning Review limit reached
Next review available in: 41 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe PR adds custom school support to hacker applications and profile editing. Forms offer an “Other” option and a text input. Validation accepts trimmed school names up to 255 characters. Database fields no longer use the predefined school enum. ChangesCustom school support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Applicant
participant HackerApplicationForm
participant ApplicationSchema
participant Database
Applicant->>HackerApplicationForm: Select Other and enter school name
HackerApplicationForm->>ApplicationSchema: Submit custom school value
ApplicationSchema->>Database: Persist validated school text
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 7 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (7 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@apps/khix/src/app/`(portal)/_components/application/hacker-application-form.tsx:
- Around line 1942-1956: Replace the non-associated “Enter your school name”
paragraph with a label and give each custom-school Input a matching unique id in
hacker-application-form.tsx (1942-1956) and khix-dashboard.tsx (2118-2133),
preserving the existing field bindings and displayed text.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8d5081f7-8109-475b-9cc1-41f5a5e09d20
📒 Files selected for processing (5)
apps/khix/src/app/(portal)/_components/application/hacker-application-form.tsxapps/khix/src/app/(portal)/_components/khix-dashboard.tsxpackages/db/src/schemas/knight-hacks.tspackages/hackathon/src/application-schema.tspackages/validators/src/hacker.ts
| {shouldShowCustomSchoolInput && ( | ||
| <div className="mt-4 space-y-2"> | ||
| <p className="text-sm font-medium text-white/70"> | ||
| Enter your school name | ||
| </p> | ||
| <Input | ||
| name={field.name} | ||
| onBlur={field.onBlur} | ||
| onChange={field.onChange} | ||
| placeholder="Lake-Sumter State College" | ||
| ref={field.ref} | ||
| value={field.value} | ||
| /> | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Add an accessible label to both custom-school inputs.
Both inputs use a <p> that is not associated with the input. Use a matching label and id.
apps/khix/src/app/(portal)/_components/application/hacker-application-form.tsx#L1942-L1956: associate “Enter your school name” with the custom-school input.apps/khix/src/app/(portal)/_components/khix-dashboard.tsx#L2118-L2133: associate “Enter your school name” with the custom-school input.
Proposed fix
- <p className="text-sm font-medium text-white/70">
+ <label
+ className="text-sm font-medium text-white/70"
+ htmlFor="custom-school"
+ >
Enter your school name
- </p>
+ </label>
<Input
+ id="custom-school"
name={field.name}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {shouldShowCustomSchoolInput && ( | |
| <div className="mt-4 space-y-2"> | |
| <p className="text-sm font-medium text-white/70"> | |
| Enter your school name | |
| </p> | |
| <Input | |
| name={field.name} | |
| onBlur={field.onBlur} | |
| onChange={field.onChange} | |
| placeholder="Lake-Sumter State College" | |
| ref={field.ref} | |
| value={field.value} | |
| /> | |
| </div> | |
| )} | |
| {shouldShowCustomSchoolInput && ( | |
| <div className="mt-4 space-y-2"> | |
| <label | |
| className="text-sm font-medium text-white/70" | |
| htmlFor="custom-school" | |
| > | |
| Enter your school name | |
| </label> | |
| <Input | |
| id="custom-school" | |
| name={field.name} | |
| onBlur={field.onBlur} | |
| onChange={field.onChange} | |
| placeholder="Lake-Sumter State College" | |
| ref={field.ref} | |
| value={field.value} | |
| /> | |
| </div> | |
| )} |
| {shouldShowCustomSchoolInput && ( | |
| <div className="mt-4 space-y-2"> | |
| <p className="text-sm font-medium text-white/70"> | |
| Enter your school name | |
| </p> | |
| <Input | |
| name={field.name} | |
| onBlur={field.onBlur} | |
| onChange={field.onChange} | |
| placeholder="Lake-Sumter State College" | |
| ref={field.ref} | |
| value={field.value} | |
| /> | |
| </div> | |
| )} | |
| {shouldShowCustomSchoolInput && ( | |
| <div className="mt-3 space-y-2"> | |
| <label | |
| className="text-sm font-medium text-white/70" | |
| htmlFor="custom-school" | |
| > | |
| Enter your school name | |
| </label> | |
| <Input | |
| className={styles.profileInput} | |
| id="custom-school" | |
| name={field.name} | |
| onBlur={field.onBlur} | |
| onChange={field.onChange} | |
| placeholder="Lake-Sumter State College" | |
| ref={field.ref} | |
| value={field.value} | |
| /> | |
| </div> | |
| )} |
📍 Affects 2 files
apps/khix/src/app/(portal)/_components/application/hacker-application-form.tsx#L1942-L1956(this comment)apps/khix/src/app/(portal)/_components/khix-dashboard.tsx#L2118-L2133
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@apps/khix/src/app/`(portal)/_components/application/hacker-application-form.tsx
around lines 1942 - 1956, Replace the non-associated “Enter your school name”
paragraph with a label and give each custom-school Input a matching unique id in
hacker-application-form.tsx (1942-1956) and khix-dashboard.tsx (2118-2133),
preserving the existing field bindings and displayed text.
3397f7b to
64ef6ed
Compare
64ef6ed to
f810b61
Compare
Summary
QA / Verification
corepack pnpm install --frozen-lockfilecorepack pnpm typecheckcorepack pnpm lint— passes; retains existing KHIXAboutGallery.tsxwarnings onlycorepack pnpm formatgit diff --checkBuild note
corepack pnpm --filter=@forge/khix buildcompiled successfully, then failed during page data collection because local required environment variables are missing (DATABASE_URL, Discord/Listmonk/Auth URLs/secrets). This is an environment configuration blocker, not a TypeScript or compile error from this change.