Skip to content

Discord artifact 이미지 첨부 전송 경로 수정 / Fix Discord artifact image attachm…#136

Open
min9538p wants to merge 1 commit into
phj1081:mainfrom
min9538p:codex/fix-discord-artifact-images
Open

Discord artifact 이미지 첨부 전송 경로 수정 / Fix Discord artifact image attachm…#136
min9538p wants to merge 1 commit into
phj1081:mainfrom
min9538p:codex/fix-discord-artifact-images

Conversation

@min9538p
Copy link
Copy Markdown

@min9538p min9538p commented May 7, 2026

증상 / Symptom

한국어:
Discord paired room에서 !... 형태의 PNG 캡처를 보내면, 이미지 마크다운 줄은 본문에서 제거되지만 Discord 파일 첨부로 업로드되지 않았습니다. 그 결과 사용자는 캡처 이미지가 있어야 할 위치에서 빈 공간만 보게 되었습니다.

English:
When a PNG capture was sent from a Discord paired room using !...`, the markdown image line was removed from the message body but the file was not uploaded as a Discord attachment. As a result, users only saw an empty gap where the screenshot should have appeared.

원인 / Root Cause

한국어:
본문 안의 마크다운 이미지는 outbound 처리 과정에서 구조화 첨부로 추출되지만, work item에 명시적인 attachments 배열이 없으면 deliverOpenWorkItem이 attachmentBaseDirs를 sendMessage로 전달하지 않았습니다. 또한 /home/ejclaw/EJClaw/data/artifacts 경로가 기본 첨부 허용 경로에 포함되어 있지 않아 생성된 캡처 파일을 안전한 업로드 대상으로 인정하지 못했습니다.

English:
Markdown images in the message body are extracted as structured attachments during outbound processing, but deliverOpenWorkItem did not pass attachmentBaseDirs to sendMessage when the work item did not include an explicit attachments array. In addition, /home/ejclaw/EJClaw/data/artifacts was not part of the default attachment allowlist, so generated capture files were not accepted as safe upload targets.

조치내역 / Changes

한국어:

  • DATA_DIR/artifacts를 기본 첨부 허용 경로에 추가했습니다.
  • 텍스트 본문에만 마크다운 이미지가 있는 경우에도 attachmentBaseDirs가 sendMessage까지 전달되도록 수정했습니다.
  • data/artifacts 아래 PNG가 Discord 첨부로 업로드되는 회귀 테스트를 추가했습니다.
  • text-only message delivery 경로에서 첨부 base dir 전달이 유지되는지 테스트를 추가했습니다.

English:

  • Added DATA_DIR/artifacts to the default attachment allowlist.
  • Updated delivery so attachmentBaseDirs are passed through to sen
    dMessage even when markdown images only exist in the text body.
  • Added regression coverage for uploading PNG files from data/artifacts as Discord attachments.
  • Added coverage to ensure text-only message delivery preserves attachment base directories.

반영사항 / Impact

한국어:
Playwright/Chromium으로 생성한 웹 화면 캡처나 디자인 테스트 산출물을 /home/ejclaw/EJClaw/data/artifacts/ 아래에 저장한 뒤 마크다운 이미지로 보내면 Discord 첨부로 정상 표시됩니다. 기존 명시 첨부 전송 경로는 유지됩니다.

English:
Web screenshots and design test artifacts generated by Playwright/Chromium can now be stored under /home/ejclaw/EJClaw/data/artifacts/ and sent as markdown images that appear as Discord file attachments. Existing explicit attachment delivery behavior is preserved.

검증 / Verification

한국어:

  • bun run test src/outbound-attachments.test.ts src/channels/discord-structured-output.test.ts src/message-runtime-delivery.test.ts → 3 files / 18 tests passed
  • bun run typecheck → passed
  • bun run build → passed
  • live Discord room에서 example.com PNG 캡처가 실제 첨부로 표시되는 것 확인

English:

  • bun run test src/outbound-attachments.test.ts src/channels/discord-structured-output.test.ts src/message-runtime-delivery.test.ts → 3 files / 18 tests passed
  • bun run typecheck → passed
  • bun run build → passed
  • Confirmed in the live Discord room that the example.com PNG capture appears as an actual attachment

…ents

한국어:
- data/artifacts 아래 생성된 PNG가 Discord 파일 첨부로 업로드되도록 허용 경로를 추가합니다.
- 텍스트 본문에만 있는 마크다운 이미지도 attachmentBaseDirs를 전달받아 검증/업로드될 수 있게 합니다.
- artifact 이미지 첨부 회귀 테스트를 추가합니다.

English:
- Allow generated PNG files under data/artifacts to be uploaded as Discord file attachments.
- Pass attachmentBaseDirs for text-only markdown image outputs so extracted images can be validated and uploaded.
- Add regression coverage for artifact image attachment delivery.
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