Skip to content

[feat] #206 QR 지원 브랜드 추가 (포토시그니처, 모노맨션)#207

Merged
ikseong00 merged 2 commits into
developfrom
feat/#206-qr-supported-brands
May 13, 2026
Merged

[feat] #206 QR 지원 브랜드 추가 (포토시그니처, 모노맨션)#207
ikseong00 merged 2 commits into
developfrom
feat/#206-qr-supported-brands

Conversation

@ikseong00
Copy link
Copy Markdown
Contributor

@ikseong00 ikseong00 commented May 13, 2026

🔗 관련 이슈

📙 작업 설명

  • 포토시그니처 QR 신규 도메인 지원 추가
    • 기존 PHOTO_SIGNATURE_URL 셋을 _1 suffix로 리네임 (photoqr3.kr 유지)
    • 신규 viewer 도메인(photosignature-viewer.web.app) + 자산 CDN(photosignature-asset-cdn.photosignature.workers.dev/sessions/) → _2 셋으로 추가
    • final.jpg 매칭으로 분할샷(photo_1.jpg~photo_8.jpg) 제외
  • 모노맨션 QR 이미지 매칭 대소문자 무시 적용
    • COMPLETE.jpg / complete.jpg 대소문자 변형 모두 매칭

📸 스크린샷 또는 시연 영상 (선택)

💬 추가 설명 or 리뷰 포인트 (선택)

  • local.properties 신규/리네임 키 셋팅 필요:
    • PHOTO_SIGNATURE_URL_1, PHOTO_SIGNATURE_IMAGE_URL_1, PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1 (기존 키 리네임)
    • PHOTO_SIGNATURE_URL_2, PHOTO_SIGNATURE_IMAGE_URL_2, PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2 (신규)
    • MONO_MANSION_IMAGE_URL = ncloudstorage.com, MONO_MANSION_IMAGE_URL_MIME_TYPE = COMPLETE.jpg
  • 모노맨션은 페이지가 href 다운로드 링크 구조라 WebView 자동 렌더 시 이미지 요청이 안 날 가능성 있음 → 실 QR로 동작 검증 필요

Summary by CodeRabbit

릴리스 노트

  • 개선 사항
    • 다중 사진 서명 설정 지원으로 사진 업로드 기능의 유연성 강화
    • URL 매칭 시 대소문자 구분을 제거하여 안정성 개선

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

개요

빌드 구성에서 포토 서명 상수를 단일 세트에서 이중 세트로 마이그레이션하고, QR 스캔 뷰모델의 브랜드 감지 로직을 업데이트했으며, 웹뷰 클라이언트의 이미지 URL 감지에 대소문자 무시 매칭을 추가했습니다.

변경 사항

포토 서명 이중 브랜드 지원

레이어 / 파일 설명
빌드 설정: 이중 서명 상수 추가
feature/photo-upload/impl/build.gradle.kts
local.properties에서 읽은 PHOTO_SIGNATURE_URL_1/2, PHOTO_SIGNATURE_IMAGE_URL_1/2, PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1/2를 buildConfigField로 정의하여 기존 단일 서명 세트를 대체합니다.
QR 브랜드 감지: 이중 URL 지원
feature/photo-upload/impl/src/main/java/com/neki/android/feature/photo_upload/impl/qrscan/QRScanViewModel.kt
isSupportedBrand와 isShouldFirstDownloadBrand 메서드가 PHOTO_SIGNATURE_URL_1과 PHOTO_SIGNATURE_URL_2를 모두 확인하도록 업데이트되었습니다.
웹뷰 요청 검사: 이중 이미지 URL 및 대소문자 무시 매칭
feature/photo-upload/impl/src/main/java/com/neki/android/feature/photo_upload/impl/qrscan/util/PhotoWebViewClient.kt
요청 검사 로직이 PHOTO_SIGNATURE_IMAGE_URL_1/2 변형을 각각 감지하고, 모노 맨션 감지에서 ignoreCase = true로 URL과 MIME 타입을 대소문자 무시로 매칭합니다.

코드 검토 예상 소요 시간

🎯 2 (단순) | ⏱️ ~12분

시 🐰

두 가지 서명이 필요한 날,
빌드에 상수 쌍을 싣고,
뷰모델은 둘을 마주 보고,
웹뷰는 대소문자 구분 없이 반긴다네.
포토의 여정, 이제 둘이 함께! 📸✨
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 QR 지원 브랜드 추가(포토시그니처, 모노맨션)라는 주요 변경사항을 명확하게 요약하고 있으며, 이슈 번호 #206도 포함되어 있습니다.
Description check ✅ Passed PR 설명이 관련 이슈, 작업 설명, 추가 설명을 포함하여 템플릿 요구사항을 충족하고 있습니다.
Linked Issues check ✅ Passed 코드 변경사항들이 이슈 #206의 요구사항인 포토시그니처와 모노맨션 QR 브랜드 지원을 완전히 구현하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 코드 변경사항이 이슈 #206의 범위 내에 있으며, QR 브랜드 지원 추가와 관련된 변경만 포함되어 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#206-qr-supported-brands

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@feature/photo-upload/impl/build.gradle.kts`:
- Around line 33-39: The build currently writes literal "null" into BuildConfig
when required keys are missing; add explicit build-time guards in the Gradle
Kotlin DSL for each required key (PHOTO_SIGNATURE_URL_1,
PHOTO_SIGNATURE_IMAGE_URL_1, PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1,
PHOTO_SIGNATURE_URL_2, PHOTO_SIGNATURE_IMAGE_URL_2,
PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2) by checking properties.containsKey(...)
or using requireNotNull(properties["..."]) and throw a
GradleException/IllegalStateException with a clear message if absent so the
build fails fast and prevents silent runtime failures in PhotoWebViewClient and
QRScanViewModel URL matching logic.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 20cba495-582a-4ffd-a274-6966b634b9f8

📥 Commits

Reviewing files that changed from the base of the PR and between f437cd6 and 03e5b08.

📒 Files selected for processing (3)
  • feature/photo-upload/impl/build.gradle.kts
  • feature/photo-upload/impl/src/main/java/com/neki/android/feature/photo_upload/impl/qrscan/QRScanViewModel.kt
  • feature/photo-upload/impl/src/main/java/com/neki/android/feature/photo_upload/impl/qrscan/util/PhotoWebViewClient.kt

Comment on lines +33 to +39
buildConfigField("String", "PHOTO_SIGNATURE_URL_1", properties["PHOTO_SIGNATURE_URL_1"].toString())
buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_1", properties["PHOTO_SIGNATURE_IMAGE_URL_1"].toString())
buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1", properties["PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1"].toString())

buildConfigField("String", "PHOTO_SIGNATURE_URL_2", properties["PHOTO_SIGNATURE_URL_2"].toString())
buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_2", properties["PHOTO_SIGNATURE_IMAGE_URL_2"].toString())
buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2", properties["PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2"].toString())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

if [[ ! -f local.properties ]]; then
  echo "local.properties 파일이 없습니다."
  exit 1
fi

required_keys=(
  PHOTO_SIGNATURE_URL_1
  PHOTO_SIGNATURE_IMAGE_URL_1
  PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1
  PHOTO_SIGNATURE_URL_2
  PHOTO_SIGNATURE_IMAGE_URL_2
  PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2
)

missing=0
for key in "${required_keys[@]}"; do
  if ! rg -n "^${key}=" local.properties >/dev/null; then
    echo "누락된 키: ${key}"
    missing=1
  fi
done

exit $missing

Repository: YAPP-Github/27th-App-Team-2-Android

Length of output: 106


🏁 Script executed:

find . -name "build.gradle.kts" -type f | head -20

Repository: YAPP-Github/27th-App-Team-2-Android

Length of output: 739


🏁 Script executed:

git ls-files | grep -E "feature/photo-upload.*build\.gradle\.kts"

Repository: YAPP-Github/27th-App-Team-2-Android

Length of output: 164


🏁 Script executed:

cat -n feature/photo-upload/impl/build.gradle.kts

Repository: YAPP-Github/27th-App-Team-2-Android

Length of output: 3909


🏁 Script executed:

rg -n "PHOTO_SIGNATURE" --type kotlin --type java | head -30

Repository: YAPP-Github/27th-App-Team-2-Android

Length of output: 2308


🏁 Script executed:

rg -n "BuildConfig" feature/photo-upload/impl/src --type kotlin --type java | head -20

Repository: YAPP-Github/27th-App-Team-2-Android

Length of output: 4065


필수 프로퍼티 누락을 빌드 타임에 강제 실패시키는 가드가 필요합니다.

현재 방식은 키가 없으면 "null"BuildConfig에 들어가서, 런타임에서 PhotoWebViewClientQRScanViewModel의 URL 매칭 로직이 조용히 실패할 수 있습니다. 신규 _1/_2 키는 필수값이므로 누락 시 즉시 실패시키는 게 안전합니다.

권장 수정 예시
+fun requireProp(key: String): String =
+    properties.getProperty(key) ?: error("Missing required local.properties key: $key")
+
-        buildConfigField("String", "PHOTO_SIGNATURE_URL_1", properties["PHOTO_SIGNATURE_URL_1"].toString())
-        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_1", properties["PHOTO_SIGNATURE_IMAGE_URL_1"].toString())
-        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1", properties["PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1"].toString())
+        buildConfigField("String", "PHOTO_SIGNATURE_URL_1", requireProp("PHOTO_SIGNATURE_URL_1"))
+        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_1", requireProp("PHOTO_SIGNATURE_IMAGE_URL_1"))
+        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1", requireProp("PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1"))
 
-        buildConfigField("String", "PHOTO_SIGNATURE_URL_2", properties["PHOTO_SIGNATURE_URL_2"].toString())
-        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_2", properties["PHOTO_SIGNATURE_IMAGE_URL_2"].toString())
-        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2", properties["PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2"].toString())
+        buildConfigField("String", "PHOTO_SIGNATURE_URL_2", requireProp("PHOTO_SIGNATURE_URL_2"))
+        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_2", requireProp("PHOTO_SIGNATURE_IMAGE_URL_2"))
+        buildConfigField("String", "PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2", requireProp("PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2"))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@feature/photo-upload/impl/build.gradle.kts` around lines 33 - 39, The build
currently writes literal "null" into BuildConfig when required keys are missing;
add explicit build-time guards in the Gradle Kotlin DSL for each required key
(PHOTO_SIGNATURE_URL_1, PHOTO_SIGNATURE_IMAGE_URL_1,
PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_1, PHOTO_SIGNATURE_URL_2,
PHOTO_SIGNATURE_IMAGE_URL_2, PHOTO_SIGNATURE_IMAGE_URL_MIME_TYPE_2) by checking
properties.containsKey(...) or using requireNotNull(properties["..."]) and throw
a GradleException/IllegalStateException with a clear message if absent so the
build fails fast and prevents silent runtime failures in PhotoWebViewClient and
QRScanViewModel URL matching logic.

@ikseong00 ikseong00 merged commit 822c1d5 into develop May 13, 2026
4 checks passed
@ikseong00 ikseong00 deleted the feat/#206-qr-supported-brands branch May 13, 2026 04:03
Ojongseok pushed a commit that referenced this pull request May 25, 2026
[feat] #206 QR 지원 브랜드 추가 (포토시그니처, 모노맨션)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] QR 지원 브랜드 추가 (모노맨션, 포토시그니처)

1 participant