Feat: 외부 포트폴리오 조회 응답에 status 및 originalFileName 추가#380
Conversation
- 기업정보분석 조회에 대해 409 응답 명세 누락 수정 - 외부 포트폴리오 조회 응답에 PdfExtractionStatus 추가
- portfolio_correction에 파일이름 저장용 nullable 칼럼 추가 - 한글 파일명에 대한 인코딩/정규화 처리를 NFC로 통일
There was a problem hiding this comment.
Pull request overview
Updates the portfolio-correction module’s external portfolio retrieval API to return extraction status and originalFileName, and persists the original filename on extract requests. Also aligns parts of the portfolio-correction API documentation/spec with recent response changes.
Changes:
- Add
original_file_namecolumn toportfolio_correctionand persistoriginalFileNameduring external portfolio extraction. - Change
GET /external-portfoliosresponse to a wrapper DTO including{ status, originalFileName, portfolios }(and update Swagger/docs). - Add
statustoGET /portfolio-corrections/{correctionId}response DTO and adjust company-insight Swagger error responses.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| supabase/migrations/20260419153000_add_original_file_name_to_portfolio_correction.sql | Adds original_file_name column for persistence. |
| src/modules/portfolio-correction/presentation/services/external-portfolio-extract-request-parser.service.ts | Normalizes uploaded filename when parsing multipart extract requests. |
| src/modules/portfolio-correction/presentation/services/external-portfolio-extract-request-parser.service.spec.ts | Adds tests for Korean filename normalization (latin1 mojibake, NFD→NFC). |
| src/modules/portfolio-correction/presentation/portfolio-correction.controller.ts | Updates Swagger error response list for company-insight endpoint. |
| src/modules/portfolio-correction/presentation/external-portfolio.controller.ts | Changes external portfolios GET to return wrapper DTO; updates Swagger decorator usage. |
| src/modules/portfolio-correction/presentation/decorators/portfolio-correction-swagger.decorator.ts | Adds ApiCorrectionIdResponse decorator for non-array responses. |
| src/modules/portfolio-correction/domain/portfolio-correction.entity.ts | Adds originalFileName column mapping. |
| src/modules/portfolio-correction/application/services/portfolio-correction.service.ts | Adds updateOriginalFileName service method. |
| src/modules/portfolio-correction/application/facades/external-portfolio.facade.ts | Saves originalFileName on extract; returns wrapper DTO including status + filename. |
| src/modules/portfolio-correction/application/facades/external-portfolio.facade.spec.ts | Updates/extends tests for new behavior (status wrapper, filename normalization). |
| src/modules/portfolio-correction/application/dtos/external-portfolio.dto.ts | Introduces ExternalPortfolioListResDTO and response filename normalization. |
| src/modules/portfolio-correction/application/dtos/correction-result.dto.ts | Adds status field to correction detail response DTO. |
| docs/API.md | Documents updated response shapes for affected endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이번 변경은 외부 포트폴리오 조회 API의 응답 구조를 개선하여 사용자 경험을 향상시키는 데 목적이 있습니다. 특히 파일 업로드 시 발생할 수 있는 인코딩 문제를 해결하기 위한 정규화 로직을 도입하고, 관련 데이터베이스 스키마와 API 명세를 최신화하여 시스템의 안정성과 데이터 일관성을 확보했습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the originalFileName and status fields to the PortfolioCorrection entity and its associated DTOs, supported by a database migration and updates to the facade and controller layers. It also implements complex normalization logic to handle filename encoding issues (mojibake) and Unicode normalization (NFC/NFD). The review feedback identifies that this normalization logic is duplicated across the DTO and the request parser service, suggesting it be refactored into a common utility to improve maintainability and ensure consistency.
- 코파일럿 코드리뷰 반영
* fix: 외부 포트폴리오 조회 응답에 status 추가 및 스웨거 명세 정합화 - 기업정보분석 조회에 대해 409 응답 명세 누락 수정 - 외부 포트폴리오 조회 응답에 PdfExtractionStatus 추가 * feat: external-portfolio 파일명 저장/조회 로직 추가 - portfolio_correction에 파일이름 저장용 nullable 칼럼 추가 - 한글 파일명에 대한 인코딩/정규화 처리를 NFC로 통일 * refactor: 파일명 정규화 로직 유틸로 분리 및 정제 로직 추가 - 코파일럿 코드리뷰 반영
* Fix: 활동 블록 삭제 시 첨삭 연관 데이터를 정리하고 삭제하도록 로직 변경 (#377) * refactor: 활동 블록 삭제 시 첨삭 연관 데이터를 정리하고 삭제하도록 로직 변경 - 활동 블록 삭제를 막는 기존 검증 로직을 수정함. * refactor: 외부 포트폴리오 삭제 플로우 선검증/병렬삭제로 개선 - 제미나이 코드리뷰 반영 * Fix: 포트폴리오 조회 오류 해결 (#378) * fix: 포트폴리오 목록 조회에서 external 항목 제외 * refactor: 내부 portfolio compat API 경로 및 변환 계층 제거 - 더이상 사용하지 않는 레거시 경로를 정리함 * fix: internal 포트폴리오 단건 조회에서 external 포트폴리오 응답 지원 * refactor: 메서드 네이밍 명확화 - 제미나이 코드리뷰 반영 * refactor: internal 첨삭 조회 조율을 파사드로 이관해 서비스 의존성 분리 - 제미나이 코드리뷰 반영 - 포폴 첨삭 서비스가 포트폴리오서비스를 직접 의존하던 구조 수정 * Feat: 외부 포트폴리오 조회 응답에 status 및 originalFileName 추가 (#380) * fix: 외부 포트폴리오 조회 응답에 status 추가 및 스웨거 명세 정합화 - 기업정보분석 조회에 대해 409 응답 명세 누락 수정 - 외부 포트폴리오 조회 응답에 PdfExtractionStatus 추가 * feat: external-portfolio 파일명 저장/조회 로직 추가 - portfolio_correction에 파일이름 저장용 nullable 칼럼 추가 - 한글 파일명에 대한 인코딩/정규화 처리를 NFC로 통일 * refactor: 파일명 정규화 로직 유틸로 분리 및 정제 로직 추가 - 코파일럿 코드리뷰 반영 * Refactor: 기업분석정보 조회 응답 수정 (#382) - 기업분석정보 진행중일 때 에러를 내리는 대신 status로 분기처리할 수 있도록 응답을 수정
Summary
외부 포트폴리오 조회 응답에 status 및 originalFileName 추가
Changes
Type of Change
해당하는 항목에 체크해주세요:
Target Environment
배포 대상 브랜치를 선택해주세요:
dev)main)Related Issues
관련 이슈를 연결해주세요:
Testing
테스트 방법을 작성해주세요:
Checklist
PR 생성 전 확인사항:
docs/development/CODE_STYLE.md)docs/development/GIT_CONVENTIONS.md)docs/development/NAMING_CONVENTIONS.md)pnpm run build)pnpm run lint)Screenshots (Optional)
UI 변경이 있다면 스크린샷을 첨부해주세요.
Additional Notes
리뷰어에게 전달할 추가 정보가 있다면 작성해주세요.