Feat/use home university id from jwt - #575
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 33 minutes and 45 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
Walkthrough
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bcc96ac632
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
apps/web/src/app/university/application/ScorePageContent.tsx (1)
130-130: 🎯 Functional Correctness | 🔵 Trivial타입 불일치가 이론적으로는 존재하지만, 현재 빌드 설정에서는 문제가 되지 않습니다.
Tab컴포넌트의setChoiceprop은React.Dispatch<React.SetStateAction<string>>으로 선언되어 있고,handlePreferenceChange는(nextPreference: string) => void입니다. 하지만tsconfig.json에서"strict": false이고strictFunctionTypes가 명시적으로 활성화되지 않았기 때문에, 현재 환경에서는 TypeScript의 반공변(contravariant) 타입 검사가 적용되지 않습니다. 따라서 컴파일 에러가 발생하지 않으며, 런타임에서도Tab컴포넌트가 항상 문자열 값으로만 호출하므로 정상 동작합니다.다만 타입 안정성을 높이기 위해 다음 중 하나를 고려할 수 있습니다:
TabProps.setChoice타입을(choice: string) => void로 통일하기- 호출부에서 인라인 래퍼로 감싸기
호출부 수정 예시
- <Tab choices={preferenceChoices} choice={selectedPreference} setChoice={handlePreferenceChange} /> + <Tab + choices={preferenceChoices} + choice={selectedPreference} + setChoice={(next) => handlePreferenceChange(next)} + />🤖 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/web/src/app/university/application/ScorePageContent.tsx` at line 130, There is a type mismatch between the `Tab` component's `setChoice` prop which expects `React.Dispatch<React.SetStateAction<string>>` and the `handlePreferenceChange` function which is typed as `(nextPreference: string) => void`. To fix this type inconsistency and improve type safety, update the `Tab` component's prop type definition to accept `setChoice: (choice: string) => void` instead of the Dispatch type, which aligns with how it is actually being called at the call site in ScorePageContent.tsx line 130.apps/web/src/app/university/application/apply/ApplyPageContent.tsx (1)
88-98: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value진행률 계산의
+1오프셋이 의도된 표시인지 한 번만 확인해 주세요.
progressStep이step + 1로 계산되어 step 1에서도 막대가 2/5(40%)에서 시작하고, step 3에서 대학을 선택하면 같은 화면에 머문 채 5/5(100%)로 채워집니다. ProgressBar가 step 1~3에서만 렌더링되는 점을 고려하면 의도된 UX일 수 있지만, 사용자에게 보이는 진행 단계에 오프바이원 느낌이 없는지 확인하면 좋겠습니다.🤖 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/web/src/app/university/application/apply/ApplyPageContent.tsx` around lines 88 - 98, Review the progressStep calculation logic in ApplyPageContent to verify whether the `+ 1` offset in `step + 1` is intentional for the desired user experience. The current calculation causes the ProgressBar to display one step ahead (showing 2/5 at step 1, 3/5 at step 2) and then jump to 5/5 (100%) when step 3 is reached with a selected university. If this off-by-one behavior is not intentional, remove the `+ 1` offset so the displayed progress aligns with the actual current step value. Confirm the final behavior matches the intended UX for users progressing through steps 1, 2, and 3.
🤖 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/web/src/app/university/application/apply/UniversityStep.tsx`:
- Around line 69-73: The validation logic for ensuring the first choice (1st
mandate) is selected is incomplete. Currently it checks for a value equals 0,
but when users skip selecting the first choice and only select 2nd or 3rd
choices, the first index will be undefined instead of 0, causing the validation
to incorrectly pass. Update the validation condition that checks
curUniversityList[0] to properly handle both 0 and undefined values to ensure
the mandatory first choice is always selected before allowing progression to the
next step. The validation check referenced at lines 79-80 should verify that the
first element is neither 0 nor undefined.
---
Nitpick comments:
In `@apps/web/src/app/university/application/apply/ApplyPageContent.tsx`:
- Around line 88-98: Review the progressStep calculation logic in
ApplyPageContent to verify whether the `+ 1` offset in `step + 1` is intentional
for the desired user experience. The current calculation causes the ProgressBar
to display one step ahead (showing 2/5 at step 1, 3/5 at step 2) and then jump
to 5/5 (100%) when step 3 is reached with a selected university. If this
off-by-one behavior is not intentional, remove the `+ 1` offset so the displayed
progress aligns with the actual current step value. Confirm the final behavior
matches the intended UX for users progressing through steps 1, 2, and 3.
In `@apps/web/src/app/university/application/ScorePageContent.tsx`:
- Line 130: There is a type mismatch between the `Tab` component's `setChoice`
prop which expects `React.Dispatch<React.SetStateAction<string>>` and the
`handlePreferenceChange` function which is typed as `(nextPreference: string) =>
void`. To fix this type inconsistency and improve type safety, update the `Tab`
component's prop type definition to accept `setChoice: (choice: string) => void`
instead of the Dispatch type, which aligns with how it is actually being called
at the call site in ScorePageContent.tsx line 130.
🪄 Autofix (Beta)
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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f1e9d48e-8bd9-4f2a-a9d1-bbf60e7fca2f
📒 Files selected for processing (10)
apps/web/src/apis/applications/api.tsapps/web/src/app/university/application/ScorePageContent.tsxapps/web/src/app/university/application/_components/ApplicationBottomActionBar.tsxapps/web/src/app/university/application/apply/ApplyPageContent.tsxapps/web/src/app/university/application/apply/ConfirmStep.tsxapps/web/src/app/university/application/apply/UniversityStep.tsxapps/web/src/constants/university.tsapps/web/src/lib/zustand/useAuthStore.tsapps/web/src/types/application.tsapps/web/src/utils/jwtUtils.ts
작업 내용
jwt의 homeUniversityId를 가져오도록 하였습니다.
학교 지원 단계에서 homeUniversityId를 가지고 지원 대학 목록을 가져오고 지망 대학 개수를 보여줍니다.