Skip to content

feat: allow custom school names in KHIX applications - #501

Open
DVidal1205 wants to merge 27 commits into
mainfrom
feat/custom-school-option
Open

feat: allow custom school names in KHIX applications#501
DVidal1205 wants to merge 27 commits into
mainfrom
feat/custom-school-option

Conversation

@DVidal1205

@DVidal1205 DVidal1205 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds an “Other / my school isn’t listed” option to the KHIX application school picker.
  • Shows a textbox so applicants can enter a custom school name, e.g. Lake-Sumter State College.
  • Allows custom school strings through the KHIX application/profile validators, API filters, database typing, and Blade charts so submissions are not rejected after the UI accepts them.
  • Keeps custom school values editable from the KHIX dashboard profile form.

QA / Verification

  • corepack pnpm install --frozen-lockfile
  • corepack pnpm typecheck
  • corepack pnpm lint — passes; retains existing KHIX AboutGallery.tsx warnings only
  • corepack pnpm format
  • git diff --check
  • Static added-line security scan: no findings

Build note

  • corepack pnpm --filter=@forge/khix build compiled 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.

DVidal1205 and others added 26 commits June 26, 2026 01:16
Co-authored-by: Lenny <lenny@knighthacks.org>
Co-authored-by: DGoel1602 <rhygonfn@gmail.com>
Co-authored-by: Lenny <lenny@knighthacks.org>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Lenny <lenny@knighthacks.org>
Co-authored-by: Adrian Osorio Blanchard <osorioadrian04@gmail.com>
Co-authored-by: Madu <madudiop1122@gmail.com>
Co-authored-by: Adrian Osorio Blanchard <osorioadrian04@gmail.com>
Co-authored-by: Daniel Efres <da947619@ucf.edu>
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>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@DVidal1205, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 96bbbcf5-512c-441b-aba3-4233cec0e8e7

📥 Commits

Reviewing files that changed from the base of the PR and between 3397f7b and f810b61.

📒 Files selected for processing (6)
  • apps/blade/src/app/_components/admin/charts/SchoolBarChart.tsx
  • apps/blade/src/app/_components/admin/club/data/member-data/SchoolBarChart.tsx
  • apps/khix/src/app/(portal)/_components/application/hacker-application-form.tsx
  • apps/khix/src/app/(portal)/_components/khix-dashboard.tsx
  • packages/api/src/routers/hackers/pagination.ts
  • packages/api/src/routers/member.ts
📝 Walkthrough

Walkthrough

The 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.

Changes

Custom school support

Layer / File(s) Summary
School validation and storage
packages/hackathon/src/application-schema.ts, packages/validators/src/hacker.ts, packages/db/src/schemas/knight-hacks.ts
Application and database school fields now accept non-empty trimmed text up to 255 characters instead of only predefined school values.
Application school entry
apps/khix/src/app/(portal)/_components/application/hacker-application-form.tsx
The application form adds an “Other” option, clears the selected school when it is chosen, and displays a controlled input for empty or unlisted school values.
Profile school entry
apps/khix/src/app/(portal)/_components/khix-dashboard.tsx
The profile form adds an “Other / my school isn't listed” option and displays a controlled custom school input for empty or unlisted values.

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
Loading

Possibly related PRs

Suggested labels: Feature, Database, Major

Suggested reviewers: adr1an04

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title clearly describes the custom school name changes but does not start with the required bracketed issue number. Prefix the title with the issue number in brackets, such as "[#123] feat: allow custom school names in KHIX applications".
✅ Passed checks (7 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Hardcoded Secrets ✅ Passed The complete PR patch adds only school UI/schema code; scans found no hardcoded credential formats or secret-like literals in added or changed lines.
Validated Env Access ✅ Passed The PR adds no process.env access. None of the five changed files contains process.env, and the parent-to-HEAD diff adds no such reference.
No Typescript Escape Hatches ✅ Passed The HEAD^..HEAD diff and all five changed TypeScript files contain no any, @ts-ignore, @ts-expect-error, or !. matches.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/custom-school-option

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0aa390a and 3397f7b.

📒 Files selected for processing (5)
  • apps/khix/src/app/(portal)/_components/application/hacker-application-form.tsx
  • apps/khix/src/app/(portal)/_components/khix-dashboard.tsx
  • packages/db/src/schemas/knight-hacks.ts
  • packages/hackathon/src/application-schema.ts
  • packages/validators/src/hacker.ts

Comment on lines +1942 to +1956
{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>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Suggested change
{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>
)}
Suggested change
{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.

@DVidal1205
DVidal1205 force-pushed the feat/custom-school-option branch from 3397f7b to 64ef6ed Compare August 7, 2026 19:39
@DVidal1205
DVidal1205 force-pushed the feat/custom-school-option branch from 64ef6ed to f810b61 Compare August 7, 2026 19:48
@DVidal1205
DVidal1205 requested a review from a team as a code owner August 8, 2026 00:03
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.

6 participants