Skip to content

Feat: 외부 포트폴리오 조회 응답에 status 및 originalFileName 추가#380

Merged
hyoinkang merged 3 commits intodevfrom
feat/add-status-#379
Apr 19, 2026
Merged

Feat: 외부 포트폴리오 조회 응답에 status 및 originalFileName 추가#380
hyoinkang merged 3 commits intodevfrom
feat/add-status-#379

Conversation

@hyoinkang
Copy link
Copy Markdown
Contributor

@hyoinkang hyoinkang commented Apr 19, 2026

Summary

외부 포트폴리오 조회 응답에 status 및 originalFileName 추가

Changes

  • 외부 포트폴리오 조회 응답 구조 변경
  • originalFileName 저장 로직 추가
  • 기업분석정보 조회 명세 정합화

Type of Change

해당하는 항목에 체크해주세요:

  • Bug fix (기존 기능을 수정하는 변경)
  • New feature (새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 변경)
  • Refactoring (기능 변경 없이 코드 개선)
  • Documentation (문서 변경)
  • Chore (빌드, 설정 등)

Target Environment

배포 대상 브랜치를 선택해주세요:

  • Dev (dev)
  • Prod (main)

Related Issues

관련 이슈를 연결해주세요:

Testing

테스트 방법을 작성해주세요:

  • Postman/Swagger로 API 호출 확인
  • 단위 테스트 통과
  • E2E 테스트 통과

Checklist

PR 생성 전 확인사항:

  • 코드 컨벤션을 준수했습니다 (docs/development/CODE_STYLE.md)
  • Git 컨벤션을 준수했습니다 (docs/development/GIT_CONVENTIONS.md)
  • 네이밍 컨벤션을 준수했습니다 (docs/development/NAMING_CONVENTIONS.md)
  • 로컬에서 빌드가 성공합니다 (pnpm run build)
  • 로컬에서 린트가 통과합니다 (pnpm run lint)
  • (API 변경 시) Swagger 문서가 업데이트되었습니다
  • (필요 시) 테스트 코드를 작성했습니다

Screenshots (Optional)

UI 변경이 있다면 스크린샷을 첨부해주세요.

Additional Notes

리뷰어에게 전달할 추가 정보가 있다면 작성해주세요.

- 기업정보분석 조회에 대해 409 응답 명세 누락 수정
- 외부 포트폴리오 조회 응답에 PdfExtractionStatus 추가
- portfolio_correction에 파일이름 저장용 nullable 칼럼 추가
- 한글 파일명에 대한 인코딩/정규화 처리를 NFC로 통일
@hyoinkang hyoinkang self-assigned this Apr 19, 2026
Copilot AI review requested due to automatic review settings April 19, 2026 13:40
@hyoinkang hyoinkang added the ✨ feature New feature or request label Apr 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_name column to portfolio_correction and persist originalFileName during external portfolio extraction.
  • Change GET /external-portfolios response to a wrapper DTO including { status, originalFileName, portfolios } (and update Swagger/docs).
  • Add status to GET /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.

Comment thread src/modules/portfolio-correction/application/dtos/external-portfolio.dto.ts Outdated
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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

  • 응답 구조 개선: 외부 포트폴리오 조회 응답에 statusoriginalFileName 필드를 추가하여 클라이언트가 포트폴리오 처리 상태와 원본 파일명을 명확히 확인할 수 있도록 변경했습니다.
  • 파일 이름 정규화 로직 추가: 다양한 인코딩 환경(Latin1 깨짐, NFD 등)에서 업로드된 파일명이 올바르게 표시되도록 정규화 로직을 구현하여 한글 파일명 처리의 안정성을 높였습니다.
  • 데이터베이스 및 API 명세 업데이트: 데이터베이스에 original_file_name 컬럼을 추가하고, 관련 API 응답 DTO와 Swagger 문서를 업데이트하여 정합성을 맞췄습니다.

🧠 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
  • Ignored by pattern: *.md (1)
    • docs/API.md
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread src/modules/portfolio-correction/application/dtos/external-portfolio.dto.ts Outdated
@hyoinkang hyoinkang merged commit 71606b4 into dev Apr 19, 2026
2 checks passed
@hyoinkang hyoinkang deleted the feat/add-status-#379 branch April 19, 2026 14:47
hyoinkang added a commit that referenced this pull request Apr 22, 2026
* fix: 외부 포트폴리오 조회 응답에 status 추가 및 스웨거 명세 정합화

- 기업정보분석 조회에 대해 409 응답 명세 누락 수정
- 외부 포트폴리오 조회 응답에 PdfExtractionStatus 추가

* feat: external-portfolio 파일명 저장/조회 로직 추가

- portfolio_correction에 파일이름 저장용 nullable 칼럼 추가
- 한글 파일명에 대한 인코딩/정규화 처리를 NFC로 통일

* refactor: 파일명 정규화 로직 유틸로 분리 및 정제 로직 추가

- 코파일럿 코드리뷰 반영
hyoinkang added a commit that referenced this pull request Apr 24, 2026
* 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로 분기처리할 수 있도록 응답을 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 기업분석정보 및 포트폴리오 pdf 추출 조회 응답에 status 추가

2 participants