Skip to content

받은 첨부파일 목록과 저장 - #66

Merged
littlebit0 merged 17 commits into
mainfrom
feat/issue-28-attachments
Nov 26, 2026
Merged

littlebit0 merged 17 commits into
mainfrom
feat/issue-28-attachments

Conversation

@littlebit0

Copy link
Copy Markdown
Owner

Refs

Refs #28

배경

받은 메일의 첨부가 있다는 것만 알 수 있고 열거나 저장할 수 없었다. 제안서 1단계(받은 첨부 목록과 저장)를 구현한다.

변경

  • 서버: 메시지 상세 응답에 attachments(part, 파일명, MIME, 크기)를 추가하고, GET /accounts/:accountId/messages/:messageId/attachments/:part가 IMAP 파트를 캐시 없이 스트리밍한다(파일명은 RFC 5987 인코딩). 파일명 디코딩은 imapflow의 RFC 2231 처리에 의존한다.
  • 클라이언트: 본문 아래 첨부 목록과 저장 버튼(file_selector 저장 대화상자, dio 다운로드). macOS 샌드박스에 files.user-selected.read-write 권한 추가.

검증

  • 서버 tsc·테스트 통과(파트 추출, 라우트 스트리밍·404 테스트 추가). 클라이언트 analyze·test 통과.
  • macOS 디버그 빌드·실행 확인, 서명에 user-selected 권한 포함 확인. 빈 서버라 계정이 없어 메시지 화면의 저장 대화상자는 실제로 열어 보지 못했다.

미확인/후속

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T18:46:10.108364Z
We couldn’t complete this review. Comment @codex review to try again.
d2d552f New commits
🔒 Security Review ✅ Completed 2026-11-21T16:15:54.477233Z 4809bd6 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 2bc0a8c6ce

ℹ️ 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 thread apps/server/src/mail/attachments.ts Resolved
@littlebit0

Copy link
Copy Markdown
Owner Author

Codex 지적 2건을 e284391에서 반영했습니다.

@codex review

언어 (최우선)

리뷰 제목·본문·요약·지적 사항은 모두 한국어로 작성하세요.

댓글작성

지적은 문제, 재현 조건, 수정 방향 순서로 짧게 쓰세요.

@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: e284391d00

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

@littlebit0

Copy link
Copy Markdown
Owner Author

Codex 지적 2건을 bcd2b54 에서 반영했습니다.

@codex review

언어 (최우선)

리뷰 제목·본문·요약·지적 사항은 모두 한국어로 작성하세요.

댓글작성

지적은 문제, 재현 조건, 수정 방향 순서로 짧게 쓰세요.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: bcd2b54e04

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

@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 Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: bcd2b54e04

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread apps/server/src/api/routes.ts Resolved
실제 사용자 인증(#20) 전까지 네트워크 호출자가 첨부 원문을 받지 못하게 막는다. ALLOW_REMOTE_MAIL_ACCESS=true로만 원격 허용.
@littlebit0

Copy link
Copy Markdown
Owner Author

Codex 지적 1건을 9d9f379에서 반영했습니다.

@codex review

언어 (최우선)

리뷰 제목·본문·요약·지적 사항은 모두 한국어로 작성하세요.

댓글작성

지적은 문제, 재현 조건, 수정 방향 순서로 짧게 쓰세요.

loopback 요청이라도 Host가 loopback이 아니거나 Origin 헤더가 있으면(브라우저 경유, DNS 리바인딩) 403으로 막는다. ALLOW_REMOTE_MAIL_ACCESS=true면 모두 허용.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 9d9f379032

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

IMAP BODYSTRUCTURE 크기는 전송 인코딩 크기라 실제 파일보다 크게 보였다.
base64 파트는 줄바꿈 오버헤드를 빼고 3/4로 환산한 추정 크기를 반환한다.
@littlebit0

Copy link
Copy Markdown
Owner Author

실제 macOS 앱 확인에서 나온 문제: 첨부 크기가 IMAP 인코딩 크기로 표시됨(실제 3,655B 파일이 5,012B로 표시).

  • base64 첨부는 줄바꿈(CRLF) 오버헤드를 빼고 3/4로 환산한 추정 디코딩 크기를 서버에서 반환하도록 수정 (quoted-printable 등은 기존 크기 유지)
  • 5,012 → 3,663(추정)을 포함한 단위 테스트 추가. 클라이언트는 이미 B/KB/MB 표기라 변경 없음

커밋: 4809bd6

@codex review

언어 (최우선)

리뷰 제목·본문·요약·지적 사항은 모두 한국어로 작성하세요.

댓글작성

지적은 문제, 재현 조건, 수정 방향 순서로 짧게 쓰세요.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 4809bd6102

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4809bd6102

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…ents

# Conflicts:
#	apps/server/package.json

@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: 8980cdef8b

ℹ️ 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 thread apps/server/src/mail/attachments.ts Resolved
Comment thread apps/server/src/mail/ImapReceiver.ts Resolved
…ents

# Conflicts:
#	apps/server/package.json
#	apps/server/src/mail/Pop3Receiver.ts
- 본문 전체가 첨부인 단일 파트 메일의 루트를 part 1로 정규화해 목록·다운로드에 포함
- inline/무disposition text/plain·text/html 첨부는 ImapFlow download의 UTF-8 변환·format=flowed 해제를 피해 BODY[] 원문을 받아 전송 인코딩만 디코딩
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ents

# Conflicts:
#	apps/server/package.json
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ents

# Conflicts:
#	apps/server/package.json
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ents

# Conflicts:
#	apps/server/package.json
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ents

# Conflicts:
#	apps/server/package.json
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ents

# Conflicts:
#	apps/server/package.json
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

…ents

# Conflicts:
#	apps/client/lib/services/mail_api_client.dart
#	apps/client/macos/Flutter/GeneratedPluginRegistrant.swift
#	apps/client/pubspec.lock
#	apps/client/pubspec.yaml
#	apps/client/test/widget_test.dart
#	apps/server/.env.example
#	apps/server/package.json
#	apps/server/src/api/routes.ts
#	apps/server/src/domain/types.ts
#	apps/server/src/mail/ImapReceiver.ts
#	apps/server/src/server.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@littlebit0
littlebit0 merged commit 56e8d6a into main Nov 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant