Skip to content

refactor: 호스트 대학교 표시명 영문명 기반 자동 생성#589

Merged
whqtker merged 2 commits into
mainfrom
feat/auto-generate-format-name
Jun 27, 2026
Merged

refactor: 호스트 대학교 표시명 영문명 기반 자동 생성#589
whqtker merged 2 commits into
mainfrom
feat/auto-generate-format-name

Conversation

@whqtker

@whqtker whqtker commented Jun 27, 2026

Copy link
Copy Markdown
Member

변경 사항

✨ 호스트 대학교 표시명 자동 생성

  • 어드민 호스트 대학교 생성/수정 폼에서 표시명(formatName) 입력 필드 제거
  • englishName을 snake_case로 변환하는 toFormatName 함수 추가
  • 폼 제출 시 formatNameenglishName으로부터 자동 생성

변환 규칙: 소문자 변환 → 영문자·숫자 외 문자를 _로 치환 → 연속 _ 병합 → 선두·말미 _ 제거
예: "University of Tokyo""university_of_tokyo"

♻️ 어드민 대학 네이밍 통일 (UI 레이블 한정)

변경 전 변경 후
협정 대학 국내 대학
호스트 대학교 해외 대학

코드 식별자(TypeScript 타입명, API 함수명)는 유지, UI에 노출되는 한국어 레이블만 변경.

변경 파일: AdminSidebar, HomeUniversitiesPageContent, UnivApplyInfosPageContent, HostUniversityTab, UnivApplyInfoManageTab, UnivApplyInfoImportTab, HostUniversityTab.test

테스트

  • 해외 대학 생성 시 formatName 입력 없이 정상 저장되는지 확인
  • 수정 시 기존 formatNameenglishName 기반으로 덮어써지는지 확인
  • 사이드바 메뉴 레이블 확인: 국내 대학 관리
  • 지원 대학 관리 탭 레이블 확인: 해외 대학 / 지원 대학 가져오기 / 지원 대학 관리

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 27, 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 Ready Ready Preview, Comment Jun 27, 2026 8:50am
solid-connect-web-admin Ready Ready Preview, Comment Jun 27, 2026 8:50am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
solid-connection-web Skipped Skipped Jun 27, 2026 8:50am

@github-actions github-actions Bot added the admin label Jun 27, 2026
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

    1. formatName 폼 보관 제거
      HostUniversityFormState에서 formatName을 제외하고, 필수 필드와 라벨 목록에서도 제거했습니다.
    1. 초기값과 상세 매핑 정리
      EMPTY_FORMdetailToForm()에서 formatName 값을 더 이상 채우지 않습니다.
    1. 전송 시 표시명 생성
      toPayload()에서 englishNametoFormatName()으로 변환해 formatName을 구성합니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description check ✅ Passed 변경 사항과 테스트 항목이 명확해 템플릿의 핵심 내용은 충족하지만, 관련 이슈·특이 사항·리뷰 요구사항은 비어 있습니다.
Title check ✅ Passed 호스트 대학교의 표시명을 영문명 기반으로 자동 생성하도록 바꾸는 핵심 변경을 정확히 요약합니다.
✨ 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/auto-generate-format-name

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/admin/src/components/features/univ-apply-infos/tabs/HostUniversityTab.tsx`:
- Around line 27-33: `toFormatName` can return an empty string when
`englishName` is blank or fully stripped by normalization, so add validation in
the `toFormatName` helper and the submit flow in `HostUniversityTab` to reject
or disable submission when `formatName` is empty. Ensure the logic that
builds/sends the API payload checks the normalized result before use and
prevents `""` from being sent for the required `formatName` field.
🪄 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: 79cf9aab-1b7f-4410-b9ed-1432bcc97aff

📥 Commits

Reviewing files that changed from the base of the PR and between 315ce52 and 9624494.

📒 Files selected for processing (1)
  • apps/admin/src/components/features/univ-apply-infos/tabs/HostUniversityTab.tsx

Comment on lines +27 to +33
function toFormatName(englishName: string): string {
return englishName
.trim()
.toLowerCase()
.replace(/[^a-z0-9]+/g, "_")
.replace(/^_+|_+$/g, "");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

1. 정규화 결과가 빈 formatName이 될 수 있습니다.

englishName이 공백뿐이거나 정규화 과정에서 전부 제거되는 값이면 여기서 formatName""가 됩니다. 지금은 제출 전에 이 케이스를 막지 않아서 필수 API 필드에 빈 값이 실려 나갈 수 있습니다.

Also applies to: 77-81

🤖 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/admin/src/components/features/univ-apply-infos/tabs/HostUniversityTab.tsx`
around lines 27 - 33, `toFormatName` can return an empty string when
`englishName` is blank or fully stripped by normalization, so add validation in
the `toFormatName` helper and the submit flow in `HostUniversityTab` to reject
or disable submission when `formatName` is empty. Ensure the logic that
builds/sends the API payload checks the normalized result before use and
prevents `""` from being sent for the required `formatName` field.

@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: 9624494fa0

ℹ️ 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".

.replace(/^_+|_+$/g, "");
}

const REQUIRED_FIELDS = ["koreanName", "englishName", "countryCode", "regionCode"] as const;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update tests for the removed formatName input

When the admin Vitest tests are run, removing formatName from REQUIRED_FIELDS means the modal no longer renders the 표시명 * control, but HostUniversityTab.test.tsx still calls screen.getByLabelText("표시명 *") in both create-submit tests. Those tests now throw before reaching their assertions, so the change should update the tests to assert the generated formatName instead of filling the removed input.

Useful? React with 👍 / 👎.

@vercel vercel Bot temporarily deployed to Preview – solid-connection-web June 27, 2026 08:49 Inactive
@whqtker whqtker changed the title ✨ 호스트 대학교 표시명 영문명 기반 자동 생성 refactor: 호스트 대학교 표시명 영문명 기반 자동 생성 Jun 27, 2026
@whqtker whqtker self-assigned this Jun 27, 2026
@whqtker whqtker merged commit 5da0d6d into main Jun 27, 2026
13 checks passed
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