Skip to content

fix: 마일스톤당 인증 사진을 1장으로 잠가 중복 업로드를 막음 - #224

Merged
howooyeon merged 1 commit into
mainfrom
fix/milestone-photo-lock
Sep 29, 2026
Merged

howooyeon merged 1 commit into
mainfrom
fix/milestone-photo-lock

Conversation

@howooyeon

@howooyeon howooyeon commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

관련 이슈

백엔드 PR 후속 작업 — 마일스톤당 인증 사진 1장 제약에 대한 프론트 대응

작업 내용

문제

  • 프론트가 MinIO 업로드 → 메타 POST 순서라, 같은 마일스톤을 두 번 찍으면 서버가 409로 거절하는 시점엔 이미 파일이 버킷에 올라가 있음 (고아 오브젝트)
  • 기존 가드는 세션 상한 4장과 업로드 중 재진입 잠금뿐이라 "같은 마일스톤을 두 번"은 그대로 통과

수정 (app/(tabs)/tracking.tsx)

  • capturedMilestonesRef로 이미 찍은 마일스톤을 들고, 카메라를 열기 전에 차단 — 업로드 전에 끊는 것이 핵심. 기존 photosTakenRef와 같은 세 지점(세션 복원 / 촬영 성공 / 세션 정리)에서 갱신
  • 찍은 마일스톤의 촬영 UI를 닫음 — 지도 배너는 내리고 레일 카메라는 잠금. 별도 상태 없이 trackingPhotos에서 파생
  • 409가 실제로 오면 그 마일스톤을 닫고 "이미 남겼어요"로 안내 (기존엔 재시도를 유도해 누를 때마다 고아 파일이 하나씩 늘어남)

확인 방법

트래킹 중 마일스톤 도달 → 인증 사진 촬영

  • 찍고 나면 배너가 내려가고 레일 카메라가 잠기는지
  • 다음 마일스톤에서 다시 열리는지
  • 앱을 껐다 켜도(세션 복원) 이미 찍은 지점은 안 열리는지

시뮬레이터 실기 확인은 GPS 마일스톤 도달이 필요해 못 했습니다.

남는 한계 — 409가 난 경우 서버엔 사진이 있는데 레일 썸네일에는 안 뜹니다. 추가 업로드는 막히지만 화면은 어긋난 채 남습니다.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: SEMOSAN/SEMOSAN_FE/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6e475c7e-edac-49cb-9df4-dfff38141a52

📥 Commits

Reviewing files that changed from the base of the PR and between 6835d0b and 0a06c6f.

📒 Files selected for processing (1)
  • app/(tabs)/tracking.tsx

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.

@JioCoder

Copy link
Copy Markdown
Contributor

확인했습니다 머지해주세요!

@howooyeon
howooyeon merged commit ac12584 into main Sep 29, 2026
5 checks passed
@howooyeon
howooyeon deleted the fix/milestone-photo-lock branch September 29, 2026 05:19
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.

2 participants