Skip to content

Feat/use home university id from jwt - #575

Merged
yoonc01 merged 7 commits into
mainfrom
feat/use-home-university-id-from-jwt
Jun 23, 2026
Merged

Feat/use home university id from jwt#575
yoonc01 merged 7 commits into
mainfrom
feat/use-home-university-id-from-jwt

Conversation

@yoonc01

@yoonc01 yoonc01 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

작업 내용

jwt의 homeUniversityId를 가져오도록 하였습니다.
학교 지원 단계에서 homeUniversityId를 가지고 지원 대학 목록을 가져오고 지망 대학 개수를 보여줍니다.

@yoonc01 yoonc01 self-assigned this Jun 23, 2026
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solid-connect-university-web Error Error Jun 23, 2026 5:58pm
solid-connect-web-admin Ready Ready Preview, Comment Jun 23, 2026 5:58pm
solid-connection-web Ready Ready Preview, Comment Jun 23, 2026 5:58pm

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yoonc01, we couldn't start this review because you've reached your PR review rate limit.

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 @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 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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6e57fe33-4160-43d6-99b0-f711bd8287d3

📥 Commits

Reviewing files that changed from the base of the PR and between bcc96ac and 8ca7205.

📒 Files selected for processing (7)
  • apps/university-web/src/apis/applications/api.ts
  • apps/university-web/src/components/ui/Tab/index.tsx
  • apps/university-web/src/types/application.ts
  • apps/web/src/app/university/application/apply/UniversityStep.tsx
  • apps/web/src/app/university/score/ScoreScreen.tsx
  • apps/web/src/components/ui/Tab/index.tsx
  • packages/api-schema/src/apiDefinitionRegistry.ts

Walkthrough

  1. 데이터 계약 일원화
    • JwtPayloadhome_university 필드 추가, HomeUniversityInfomaxChoiceCount 추가 및 getHomeUniversityById 유틸 신규 도입.
    • ApplicationUniversityRequest, ApplicationListResponse, SubmitApplicationRequest의 선택 구조를 고정 3필드(firstChoice…/secondChoice…/thirdChoice…)에서 choices 배열로 일원화.
  2. 인증 스토어 확장
    • useAuthStore가 JWT에서 homeUniversityId를 파싱해 상태로 저장하며, 토큰 설정·해제·리하이드레이션 시 일관되게 반영.
  3. 지원 플로우 동적화
    • ApplyPageContenthomeUniversityIdmaxChoiceCount를 도출해 UniversityStep에 전달하고, 제출 시 choices 배열로 패키징.
  4. UI 컴포넌트 재구성
    • UniversityStepchoiceIndexes.map() 기반 동적 렌더링으로 전환, ConfirmStepConfirmUniversityCard 내부 컴포넌트로 개편, ApplicationBottomActionBar 레이아웃 단순화.
  5. 점수 페이지 동적화
    • ScorePageContentchoices[][] 기반으로 sortedData, filteredAndSortedData, preferenceIndex 로직을 재구성하고 Tab을 동적 preferenceChoices로 교체.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • wibaek
  • enunsnv
  • khwww
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR 설명이 주요 작업 내용을 간략히 설명하고 있으나, 필수 섹션인 '관련 이슈', '특이 사항', '리뷰 요구사항' 이 누락되어 있습니다. 관련 이슈 번호, 주요 변경사항(API 구조 변경 등), 리뷰 중점 사항을 추가하여 템플릿을 완성해주세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 JWT에서 homeUniversityId를 가져오는 핵심 기능을 명확하게 설명하고 있으며, 실제 변경 사항과 직접 관련이 있습니다.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/use-home-university-id-from-jwt

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.

@github-actions github-actions Bot added the web label Jun 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread apps/web/src/app/university/application/apply/ApplyPageContent.tsx

@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

🧹 Nitpick comments (2)
apps/web/src/app/university/application/ScorePageContent.tsx (1)

130-130: 🎯 Functional Correctness | 🔵 Trivial

타입 불일치가 이론적으로는 존재하지만, 현재 빌드 설정에서는 문제가 되지 않습니다.

Tab 컴포넌트의 setChoice prop은 React.Dispatch<React.SetStateAction<string>>으로 선언되어 있고, handlePreferenceChange(nextPreference: string) => void입니다. 하지만 tsconfig.json에서 "strict": false이고 strictFunctionTypes가 명시적으로 활성화되지 않았기 때문에, 현재 환경에서는 TypeScript의 반공변(contravariant) 타입 검사가 적용되지 않습니다. 따라서 컴파일 에러가 발생하지 않으며, 런타임에서도 Tab 컴포넌트가 항상 문자열 값으로만 호출하므로 정상 동작합니다.

다만 타입 안정성을 높이기 위해 다음 중 하나를 고려할 수 있습니다:

  1. TabProps.setChoice 타입을 (choice: string) => void로 통일하기
  2. 호출부에서 인라인 래퍼로 감싸기
호출부 수정 예시
-            <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 오프셋이 의도된 표시인지 한 번만 확인해 주세요.

progressStepstep + 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4910d3f and bcc96ac.

📒 Files selected for processing (10)
  • apps/web/src/apis/applications/api.ts
  • apps/web/src/app/university/application/ScorePageContent.tsx
  • apps/web/src/app/university/application/_components/ApplicationBottomActionBar.tsx
  • apps/web/src/app/university/application/apply/ApplyPageContent.tsx
  • apps/web/src/app/university/application/apply/ConfirmStep.tsx
  • apps/web/src/app/university/application/apply/UniversityStep.tsx
  • apps/web/src/constants/university.ts
  • apps/web/src/lib/zustand/useAuthStore.ts
  • apps/web/src/types/application.ts
  • apps/web/src/utils/jwtUtils.ts

Comment thread apps/web/src/app/university/application/apply/UniversityStep.tsx
@yoonc01
yoonc01 merged commit 8ee2a03 into main Jun 23, 2026
9 of 13 checks passed
@yoonc01
yoonc01 deleted the feat/use-home-university-id-from-jwt branch June 27, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant