fix(gift): 상세 문의를 TALK에 연결한다

This commit is contained in:
Yu Sung
2026-10-08 20:34:54 +09:00
parent f36faf7ee4
commit 2997714e2c
7 changed files with 50 additions and 6 deletions
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
ruby - "$root" <<'RUBY'
root = ARGV.fetch(0)
source_root = File.join(root, 'SodaLive/Sources')
read = lambda do |path|
File.read(File.join(source_root, path))
.gsub(%r{"(?:\\.|[^"\\])*"|//[^\n]*|/\*.*?\*/}m) { |token| token.start_with?('"') ? token : '' }
.gsub(/\s+/, ' ').gsub(/\s*([(),:])\s*/, '\1').strip
end
check = lambda do |condition, message|
abort "RED gift-detail TALK inquiry: #{message}" unless condition
end
service = read.call('MyPage/ServiceCenter/ServiceCenterView.swift')
gift_sources = [
'V2/Gift/Detail/Components/GiftDetailActionBar.swift',
'V2/Gift/Detail/Components/ReceivedGiftDetailContentView.swift',
'V2/Gift/Detail/Components/GiftCancelCompleteView.swift'
].map { |path| [path, read.call(path)] }
helper = 'enum ServiceCenterInquiry { static func openTalk(){ UIApplication.shared.open(URL(string:"http://pf.kakao.com/_lkxgxhG/chat")!)} }'
check.call(service.include?(helper), 'ServiceCenterInquiry.openTalk must own the existing Kakao TALK action')
check.call(service.scan('ServiceCenterInquiry.openTalk()').length == 1, 'ServiceCenter TALK button must call the shared action once')
check.call(service.scan('http://pf.kakao.com/_lkxgxhG/chat').length == 1, 'Kakao TALK URL must have one source of truth')
gift_sources.each do |path, source|
check.call(source.scan('ServiceCenterInquiry.openTalk()').length == 1, "#{path} must call the shared action once")
check.call(!source.include?('GiftConstants.inquiryStep'), "#{path} must not navigate to the in-app service center")
check.call(!source.include?('.serviceCenter'), "#{path} must not navigate directly to the in-app service center")
check.call(!source.include?('http://pf.kakao.com/_lkxgxhG/chat'), "#{path} must not duplicate the TALK URL")
end
puts 'PASS gift-detail TALK inquiry: ServiceCenter and all three Gift actions share one TALK action'
RUBY
+1 -1
View File
@@ -218,7 +218,7 @@ for probe in ('GiftInfoSectionView(title: "받는 주소")', 'GiftInfoRow(title:
require(not re.search(r"model\.(senderInfo|mailbox|applicationNo|paidCan|tracking)\b", component), "privacy-safe component")
actions, _ = block(component, "struct ReceivedGiftDetailActionBar: View")
require("guard !isNavigating else { return }" in actions and "isNavigating = true" in actions and ".disabled(isNavigating)" in actions, "inquiry repeat guard")
require("AppState.shared.setAppStep(step: GiftConstants.inquiryStep)" in actions and '"문의하기"' in actions, "existing inquiry route")
require("ServiceCenterInquiry.openTalk()" in actions and '"문의하기"' in actions, "shared TALK inquiry action")
appear, _ = block(actions, ".onAppear")
require("isNavigating = false" in appear, "navigation guard resets")
require("let onPolicy: () -> Void" in actions and "onPolicy()" in actions and '"선물 정책 확인"' in actions, "policy callback")