Skip to content

✨ 지원자 현황을 소속 대학 기준으로 필터링 - #627

Merged
manNomi merged 1 commit into
mainfrom
feat/scope-applicants-by-home-university
Aug 3, 2026
Merged

✨ 지원자 현황을 소속 대학 기준으로 필터링#627
manNomi merged 1 commit into
mainfrom
feat/scope-applicants-by-home-university

Conversation

@manNomi

@manNomi manNomi commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

요약

GET /applications(지원자 현황)는 전체를 그대로 내려주고 소속 대학을 구분해주지 않습니다. 서버는 건드리지 않고, 전체를 받아온 뒤 access token의 소속 대학 기준으로 클라이언트에서 걸러내도록 했습니다.

동작

  1. 기존과 동일하게 /applications 전체 조회
  2. token에서 파싱된 useAuthStore.homeUniversityId로 파견학교 목록(/univ-apply-infos/search/text) 조회
  3. 그 목록에 속한 항목만 남겨서 반환

훅(useGetApplicationsList) 내부에서 처리하므로 호출부(ApplicationUniversityDetailContent, ApprovedApplicationStatusPage) 수정은 없습니다. 소속 대학을 모르는 경우(비인증·학교 미인증)에는 필터를 걸지 않아 기존 동작 그대로입니다.

매칭 키를 이름만 쓰지 않은 이유

/applications 응답(ApplicantsResponse)에는 홈 대학 식별자도, 지원 정보 id도 없습니다.

public record ApplicantsResponse(
        String koreanName, Integer studentCapacity,
        String region, String country, List<ApplicantResponse> applicants) {}

파견학교명만으로 매칭하면 틀립니다. 실제 운영 데이터를 확인한 결과, 경희대와 중앙대가 같은 이름의 파견학교를 4곳 공유합니다.

파견학교명 경희대 (국가/정원) 중앙대 (국가/정원)
국립대만사범대학교 대만 / 3 대만 / 2
국립정치대학교 대만 / 5 대만 / 1
링난대학교 홍콩 / 4 슬로베니아 / 2
홍콩이공대학교 홍콩 / 2 스페인 / 1

이름만 쓰면 이 4곳은 다른 학교 항목까지 함께 남습니다. 그래서 두 응답에 공통으로 있는 필드를 합쳐 파견학교명 + 국가 + 모집인원 을 키로 사용했고, 위 4건이 모두 구분되는 것을 확인했습니다.

검증

실제 운영 API 데이터(경희대 170건 + 중앙대 186건)를 섞어 필터를 돌렸습니다.

전체(섞인) 항목 수: 356
중앙대 기준 필터 후: 186 (기대: 186)
  국립대만사범대학교 -> 1 건 대만/2
  국립정치대학교 -> 1 건 대만/1
  링난대학교 -> 1 건 슬로베니아/2
  홍콩이공대학교 -> 1 건 스페인/1
  • pnpm --filter @solid-connect/web run typecheck — 통과
  • pnpm --filter @solid-connect/web run lint:check — 480 files 통과

한계 (알고 넘어가야 할 부분)

이 방식은 응답에 식별자가 없어서 값으로 추론하는 우회책입니다.

  • 서로 다른 홈 대학이 이름 + 국가 + 정원까지 완전히 같은 파견학교를 갖게 되면 구분되지 않습니다. 지금 데이터에서는 그런 경우가 없지만, 구조적으로 보장되지는 않습니다.
  • 전체 데이터를 받아 클라이언트에서 버리므로 전송량이 줄지 않습니다.

근본 해결은 서버가 /applications 응답에 홈 대학 식별자(또는 지원 정보 id)를 포함하거나, 요청자의 소속 대학으로 서버에서 필터링하는 것입니다. 여유가 될 때 정리하시는 걸 권합니다.

관련 PR

#626(프론트에서 homeUniversityId 쿼리 파라미터 전송)은 이 방식으로 대체되므로 닫으셔도 됩니다.

🤖 Generated with Claude Code

@manNomi
manNomi requested a review from wibaek as a code owner August 3, 2026 17:05
@vercel

vercel Bot commented Aug 3, 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 Building Building Preview Aug 3, 2026 5:06pm
solid-connection-web Building Building Preview Aug 3, 2026 5:06pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
solid-connect-web-admin Skipped Skipped Aug 3, 2026 5:06pm

@github-actions github-actions Bot added the web label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 32 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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 40b83de6-d187-4bdd-b0a4-4c760acaab4e

📥 Commits

Reviewing files that changed from the base of the PR and between 71f088b and 005a0a9.

📒 Files selected for processing (2)
  • apps/web/src/apis/applications/getApplicants.ts
  • apps/web/src/apis/applications/homeUniversityScope.ts

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.

@manNomi
manNomi merged commit 08cbe59 into main Aug 3, 2026
11 of 13 checks passed

@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: 005a0a9074

ℹ️ 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 on lines +29 to +30
if (!scopedUniversities || scopedUniversities.length === 0) {
return applications;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fail closed when the university scope is unavailable

When an authenticated user's scope request is still loading, fails, or legitimately returns zero universities, this branch returns the complete /applications response. Because useGetApplicationsList exposes only the applications query's loading/error state, both ApprovedApplicationStatusPage and the university-detail page can then render applicants from other home universities—briefly during ordinary request races and indefinitely after a scope-query failure. Keep the result loading/erroring until the scope resolves, and treat a successful empty scope as an empty filtered result rather than returning all applications.

Useful? React with 👍 / 👎.

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