Skip to content

[FIX] PDF 페이지 수 누락 버그 수정 및 Home 진입점 정리 - #132

Merged
i-meant-to-be merged 6 commits into
developfrom
feat/#130
Aug 8, 2026
Merged

[FIX] PDF 페이지 수 누락 버그 수정 및 Home 진입점 정리#132
i-meant-to-be merged 6 commits into
developfrom
feat/#130

Conversation

@i-meant-to-be

@i-meant-to-be i-meant-to-be commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

🚩 연관 이슈

closed #130

📝 작업 내용

마이 페이지(#126) 작업 중 함께 처리한 간접적인 변경 사항.

  • PDF 검증 시 이미 계산하고 있던 페이지 수(PdfRenderer.pageCount)를 PdfValidationResult.Valid가 담아 반환하지 않아, 포트폴리오 업로드 API 호출 시 pageCount가 항상 null로 전송되어 서버 업로드가 실패하던 버그 수정
  • feature:mypage 개발·검증을 위해 Home 화면에 마이 페이지 진입 버튼을 추가하고, 이를 위해 HomeNavigationModulefeature:home:impl에서 app 모듈로 이동
  • 포트폴리오 업로드 멀티파트 파트명을 서버 규격에 맞춰 pdffile로 수정하고, 업로드 요청 디버깅을 위해 로깅 레벨을 BODY로 조정
  • ApiErrorCode에 대한 카테고리별 KDoc 주석 정리

🏞️ 스크린샷 (선택)

🗣️ 리뷰 요구사항 (선택)

  • Home 화면의 "Open MyPage" 버튼은 feature:mypage 연동 검증을 위한 임시 진입점임.

Summary by CodeRabbit

  • 새 기능

    • 홈 화면에 마이페이지로 이동하는 버튼을 추가했습니다.
    • 홈 화면에서 마이페이지로의 이동이 정상적으로 연결됩니다.
    • PDF 검증 결과에 페이지 수 정보가 포함됩니다.
  • 버그 수정

    • PDF 업로드 검증 시 파일 크기 오류와 메타데이터 오류를 보다 정확하게 구분합니다.
    • PDF 업로드 요청 형식과 오류 코드 처리를 최신 기준에 맞게 개선했습니다.

PdfValidationResult.Valid가 페이지 수를 갖고 있지 않아 포트폴리오 업로드 시
pageCount가 항상 null로 전송되어 서버 업로드가 실패하던 문제를 해결함.
feature:mypage 검증을 위해 Home 화면에 마이 페이지 진입 버튼을 추가하고,
Navigator에 접근할 수 있도록 HomeNavigationModule을 feature:home:impl에서
app 모듈로 이동함.
멀티파트 파트명을 pdf에서 file로 바꾸고, 업로드 요청 디버깅을 위해 로깅
레벨을 BODY로 올림. 에러 코드 매퍼의 카테고리별 KDoc 주석도 함께 정리함.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

PDF 검증 결과에 페이지 수를 포함했습니다. Home 화면에 MyPage 이동 버튼과 Navigator 연결을 추가했습니다. 포트폴리오 업로드 multipart 이름과 HTTP 로깅 설정을 변경하고 API 오류 코드 import를 확장했습니다.

Changes

PDF 검증 및 페이지 수 전달

Layer / File(s) Summary
PDF 검증 결과 및 페이지 수 전달
core/common/src/main/kotlin/com/dminus14/app/core/common/pdf/*, core/common/src/test/..., core/common/src/androidTest/...
PdfValidationResult.ValidpageCount를 저장합니다. 파일 크기 검증은 nullable PdfInvalidReason을 반환합니다. 검증 테스트는 페이지 수를 확인합니다.

Home MyPage 이동

Layer / File(s) Summary
Home에서 MyPage로 이동
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/*, feature/home/impl/src/main/kotlin/.../navigation/*, app/src/main/java/.../navigation/di/*, feature/home/impl/build.gradle.kts
Home에 OpenMyPage 인텐트와 버튼을 추가했습니다. ViewModel 효과를 통해 Navigator.goTo(MyPage)를 호출합니다.

포트폴리오 업로드 네트워크 설정

Layer / File(s) Summary
포트폴리오 업로드 네트워크 설정
data/build.gradle.kts, data/src/main/kotlin/com/dminus14/app/data/remote/config/*, data/src/main/kotlin/com/dminus14/app/data/remote/interceptor/*, data/src/main/kotlin/com/dminus14/app/data/remote/mapper/*
multipart 파트 이름을 file로 변경했습니다. 디버그 빌드는 HTTP_LOGGING_BODY 설정에 따라 BODY 또는 HEADERS를 사용합니다. API 오류 코드 import를 추가했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HomeScreen
  participant HomeViewModel
  participant HomeEntryBuilder
  participant Navigator
  HomeScreen->>HomeViewModel: OpenMyPage 인텐트 전달
  HomeViewModel-->>HomeScreen: GoToMyPageRequested 효과 전달
  HomeScreen->>HomeEntryBuilder: onOpenMyPage 콜백 호출
  HomeEntryBuilder->>Navigator: goTo(MyPage) 호출
Loading

Possibly related PRs

Suggested reviewers: lyh5427

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 PDF 페이지 수 수정과 Home 진입점 정리라는 주요 변경 사항을 정확하게 요약합니다.
Linked Issues check ✅ Passed [#130] PDF 페이지 수 전달, MyPage 진입, 네비게이션 연결, 멀티파트 이름, 로깅 설정 변경이 모두 반영되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 PDF 업로드 수정, Home 진입점 추가, 관련 설정 및 오류 코드 정리 범위에 포함됩니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#130

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
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt (1)

18-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

MyPage 이동 효과의 이름을 통일하십시오.

공유 원인은 MyPage 이동 효과를 GoToHomeRequested로 명명한 것입니다. 이 이름은 MVI 흐름의 실제 목적지와 다릅니다.

  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt#L18-L20: GoToHomeRequestedGoToMyPageRequested로 변경하십시오.
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeViewModel.kt#L14-L18: 변경한 MyPage 효과를 emit하십시오.
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeScreen.kt#L31-L39: 변경한 MyPage 효과를 수집하고 onOpenMyPage()를 호출하십시오.
🤖 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
`@feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt`
around lines 18 - 20, MyPage 이동 효과의 이름과 사용처를 실제 목적지에 맞게 통일하십시오.
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt
18-20의 HomeEffect에서 GoToHomeRequested를 GoToMyPageRequested로 변경하고,
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeViewModel.kt
14-18에서는 새 효과를 emit하십시오.
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeScreen.kt
31-39에서는 새 효과를 수집해 onOpenMyPage()를 호출하십시오.
🤖 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
`@core/common/src/main/kotlin/com/dminus14/app/core/common/pdf/PdfValidationResult.kt`:
- Around line 4-6: Update the upload flow to propagate
PdfValidationResult.Valid.pageCount from validatePdf(...) through
UploadPortfolioUseCase and PortfolioRemoteDataSource into the
uploadPortfolio(...) request, ensuring the server receives the validated page
count.

In
`@data/src/main/kotlin/com/dminus14/app/data/remote/interceptor/OkHttpLoggingInterceptorFactory.kt`:
- Line 14: Update OkHttpLoggingInterceptorFactory.createForUpload() to use
HttpLoggingInterceptor.Level.HEADERS instead of BODY, preventing PDF request and
response bodies from being logged while preserving header logging.

In
`@feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/navigation/HomeEntryBuilder.kt`:
- Around line 6-12: Move MyPage destination mapping from Home to app: in
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/navigation/HomeEntryBuilder.kt:6-12,
remove the MyPage import and goTo parameter, and expose HomeScreen’s
onOpenMyPage callback directly; in feature/home/impl/build.gradle.kts:11, remove
the api(project(":feature:mypage:api")) dependency; in
app/src/main/java/com/dminus14/app/navigation/di/HomeNavigationModule.kt:17-19,
import MyPage and pass homeEntryBuilder’s callback as navigator.goTo(MyPage).

---

Nitpick comments:
In
`@feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt`:
- Around line 18-20: MyPage 이동 효과의 이름과 사용처를 실제 목적지에 맞게 통일하십시오.
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt
18-20의 HomeEffect에서 GoToHomeRequested를 GoToMyPageRequested로 변경하고,
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeViewModel.kt
14-18에서는 새 효과를 emit하십시오.
feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeScreen.kt
31-39에서는 새 효과를 수집해 onOpenMyPage()를 호출하십시오.
🪄 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.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8efec229-6cce-47ab-a254-e115cc42db07

📥 Commits

Reviewing files that changed from the base of the PR and between ffe039d and 7194166.

📒 Files selected for processing (13)
  • app/src/main/java/com/dminus14/app/navigation/di/HomeNavigationModule.kt
  • core/common/src/androidTest/kotlin/com/dminus14/app/core/common/pdf/PdfValidationInstrumentedTest.kt
  • core/common/src/main/kotlin/com/dminus14/app/core/common/pdf/PdfValidation.kt
  • core/common/src/main/kotlin/com/dminus14/app/core/common/pdf/PdfValidationResult.kt
  • core/common/src/test/kotlin/com/dminus14/app/core/common/pdf/PdfValidationRulesTest.kt
  • data/src/main/kotlin/com/dminus14/app/data/remote/config/PortfolioNetworkConfig.kt
  • data/src/main/kotlin/com/dminus14/app/data/remote/interceptor/OkHttpLoggingInterceptorFactory.kt
  • data/src/main/kotlin/com/dminus14/app/data/remote/mapper/ApiErrorCode.kt
  • feature/home/impl/build.gradle.kts
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeScreen.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeViewModel.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/navigation/HomeEntryBuilder.kt

github-actions Bot added a commit that referenced this pull request Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Catalog Preview

상태: 🗑️ Preview 제거됨

대상: PR #132

실행: GitHub Actions

@i-meant-to-be i-meant-to-be self-assigned this Aug 7, 2026
@i-meant-to-be
i-meant-to-be requested a review from lyh5427 August 7, 2026 16:44
@i-meant-to-be i-meant-to-be added the fix 오류 또는 이슈 해결 label Aug 7, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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
`@data/src/main/kotlin/com/dminus14/app/data/remote/interceptor/OkHttpLoggingInterceptorFactory.kt`:
- Around line 10-26: Update createForUpload() so it no longer delegates to
createInterceptor(logger) and always uses HEADERS logging, preventing BODY logs
for authentication requests even when HTTP_LOGGING_BODY is enabled. Preserve
createInterceptor()’s existing behavior for other clients, and update
OkHttpLoggingInterceptorFactoryTest.kt to enforce the separate logging-level
contract.
🪄 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.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ff9eb36e-7319-47f2-b761-93dbda598155

📥 Commits

Reviewing files that changed from the base of the PR and between 7194166 and d0521ac.

📒 Files selected for processing (7)
  • app/src/main/java/com/dminus14/app/navigation/di/HomeNavigationModule.kt
  • data/build.gradle.kts
  • data/src/main/kotlin/com/dminus14/app/data/remote/interceptor/OkHttpLoggingInterceptorFactory.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeContract.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeScreen.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeViewModel.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/navigation/HomeEntryBuilder.kt
🚧 Files skipped from review as they are similar to previous changes (3)
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/navigation/HomeEntryBuilder.kt
  • app/src/main/java/com/dminus14/app/navigation/di/HomeNavigationModule.kt
  • feature/home/impl/src/main/kotlin/com/dminus14/app/feature/home/HomeScreen.kt

github-actions Bot added a commit that referenced this pull request Aug 8, 2026
@i-meant-to-be
i-meant-to-be merged commit f9355de into develop Aug 8, 2026
3 checks passed
@i-meant-to-be
i-meant-to-be deleted the feat/#130 branch August 8, 2026 07:57
github-actions Bot added a commit that referenced this pull request Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 오류 또는 이슈 해결

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] PDF 페이지 수 누락 버그 수정 및 Home 진입점 정리

1 participant