Skip to content

feat: 스키마 타입별 Non-URL 결과 안내 문구 추가#41

Merged
kim-subsub merged 2 commits into
developfrom
feat/40
May 14, 2026
Merged

feat: 스키마 타입별 Non-URL 결과 안내 문구 추가#41
kim-subsub merged 2 commits into
developfrom
feat/40

Conversation

@Ahreum02

@Ahreum02 Ahreum02 commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

관련 있는 Issue를 태그해주세요. (e.g. closed, fixed, resolved, related, #100)

'ResultNonUrlPage.tsx' 페이지를 수정. 12개의 URL 스키마 타입에 따라 화면에 적절한 멘트가 나오도록 수정

Tasks

URL 스키마 타입 상세 가이드:

  1. WEB: 일반적인 웹사이트 주소 (http, https)
  2. SHORT_URL: bit.ly 등 단축 URL 서비스
  3. OTP: 2단계 인증용 일회용 비밀번호 생성
  4. CRYPTO: 가상자산 지갑 주소 및 송금 요청
  5. SMS: 문자 메시지 발송 (smsto:)
  6. WIFI: 와이파이 네트워크 자동 접속 정보
  7. CONTACT: 연락처(vCard) 자동 저장 정보
  8. DEEP_LINK: 특정 앱의 특정 화면 실행 링크,instagram://kakaotalk://kakaopay/money/remit (카카오페이 송금 화면)
  9. TEL: 전화 걸기 (tel:)
  10. EMAIL: 이메일 작성 (mailto:)
  11. APP_STORE: 앱 마켓(PlayStore, AppStore) 이동, 앱 설치 및 업데이트 페이지
  12. OTHER: 기타 텍스트 및 미분류 타입

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 비URL 액션 감지 및 분류가 대폭 확장되어 더 많은 타입(WEB, SHORT_URL, TEL, SMS, EMAIL, APP_STORE, DEEP_LINK, CRYPTO 등)을 지원합니다.
    • UI 문구가 동적 한국어 메시지로 바뀌어 미리보기 레이블을 문장에 반영합니다.
    • 미리보기 목록 및 헤더, 실행 버튼 문구(예: “주의하고 실행하기”, “전체 URL 스키마 타입 보기”)가 갱신되었습니다.
  • 버그 수정

    • 입력값 검증 강화로 잘못된 URL/전화번호/이메일 등에 대해 명확한 안내(지원 불가 메시지)를 제공합니다.

@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
veri-q Ready Ready Preview, Comment May 8, 2026 4:35am

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b7604d9d-0b46-4cc7-b06f-7ebe1616b6c9

📥 Commits

Reviewing files that changed from the base of the PR and between e97dfe0 and c4156e8.

📒 Files selected for processing (1)
  • src/pages/ResultNonUrl/constants/nonUrlActionText.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/ResultNonUrl/constants/nonUrlActionText.ts

Walkthrough

Non-URL QR 처리 스택을 대대적으로 재설계: 액션 타입을 12개 대문자 식별자로 확장하고, 스킴 정규화 + 타겟값 기반 2단계 추론을 도입하며 카탈로그·실행계획·UI·테스트를 연동해 한국어 문구로 업데이트했습니다.

변경 사항

Non-URL 작업 유형 통합 재설계

계층 / 파일 요약
타입 정의 및 계약
src/pages/ResultNonUrl/types/resultNonUrlPage.types.ts
NonUrlActionType을 6개(appLaunch, appStore, bitcoin, telSms, unknown, wifi)에서 12개 명시적 대문자 항목(WEB, SHORT_URL, OTP, CRYPTO, SMS, WIFI, CONTACT, DEEP_LINK, TEL, EMAIL, APP_STORE, OTHER)으로 확대합니다.
작업 유형 추론 로직
src/pages/ResultNonUrl/lib/toResultNonUrlPageData.ts
두 단계 추론 구현: 정규화된 스킴 별칭으로 먼저 해결 후, 타겟값(HTTP, OTP, 암호화, SMS, Wi‑Fi, vCard, tel, mailto 등)에서 패턴 매칭으로 추론하며, 기본값으로 OTHER로 폴백합니다. 스킴 정규화 및 타겟값 키 확장을 포함합니다.
작업 카탈로그 및 섹션 복사 해결
src/pages/ResultNonUrl/constants/nonUrlActionText.ts
새 작업 타입에 맞춰 카탈로그를 재구성하고 각 항목에 sectionDescription, sectionTitle을 추가합니다. resolveNonUrlSectionCopy() 함수를 추가하고, 이전 resolveNonUrlActionContent()를 제거하며, 결정적 순서로 미리보기 항목을 생성합니다.
작업 실행 계획 생성
src/pages/ResultNonUrl/lib/resolveNonUrlActionExecution.ts
HTTP URL, 전화, SMS, 이메일 정규화 헬퍼를 추가하고, 각 작업 유형을 open/navigate/unsupported 실행 계획으로 매핑하며, 새로운 한국어 메시지로 업데이트합니다.
컴포넌트 UI 통합
src/pages/ResultNonUrl/ResultNonUrlPage.tsx
resolveNonUrlSectionCopy() 헬퍼를 사용하도록 업데이트하고, 영문 고정 복사를 동적 한국어 메시지로 변경하며, 표시된 작업 레이블 폴백 로직을 추가합니다.
테스트 범위 확장
src/pages/ResultNonUrl/lib/toResultNonUrlPageData.test.ts
공유 baseSession으로 매개변수화된 테스트를 도입하여 모든 12개 새 작업 유형에 대해 detectedActionTypesectionTitle/sectionDescription을 검증하며, 스킴 타입 누락 시 타겟값 추론을 테스트합니다.
🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 12가지 URL 스키마 타입별로 Non-URL 결과 안내 문구를 추가하는 변경사항을 정확하게 요약하고 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 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 `@src/pages/ResultNonUrl/lib/resolveNonUrlActionExecution.ts`:
- Around line 99-106: The resolveSchemeHref function currently allows any scheme
and returns values that later get used for kind: 'navigate' (DEEP_LINK/CRYPTO)
and assigned to window.location.href; update resolveSchemeHref to reject
dangerous schemes by normalizing and lowercasing the input and returning null if
the scheme matches a blacklist (at minimum: javascript:, data:, vbscript:,
file:) or if it contains suspicious characters; keep the existing
genericSchemePattern check but add a guard that extracts the scheme prefix
(before ':') and rejects those blacklisted schemes so dangerous inputs never
propagate to DEEP_LINK/CRYPTO navigation.

In `@src/pages/ResultNonUrl/lib/toResultNonUrlPageData.test.ts`:
- Line 25: 테스트에 사용된 실제 메인넷 비트코인 주소 문자열 '1BoatSLRHtKNngkdXEeobR76b53LETtpyT'(배열
항목 ['CRYPTO', ..., 'CRYPTO'] in toResultNonUrlPageData.test.ts)를 안전한 플레이스홀더로
교체하세요; 예를 들어 테스트넷 또는 명시적 더미값(테스트용 스킴 판별만 검증되도록)으로 바꾸면 스캐너를 자극하지 않고 다른 곳에 복사될 위험을
줄일 수 있습니다.

In `@src/pages/ResultNonUrl/lib/toResultNonUrlPageData.ts`:
- Around line 74-80: The classification treats inputs without a scheme (bare
domains like "example.com" or "play.google.com/store/..." and short URLs) as
OTHER because patterns (appStoreUrlPattern, shortUrlPattern,
cryptoSchemePattern, genericSchemePattern) only match when "http(s)://" is
present; update to normalize inputs before matching by detecting bare domains
(no scheme) and prepending a default scheme (e.g., "http://") or run a
URL-normalizer used by the runtime, then run the existing pattern checks in the
same order (appStoreUrlPattern, shortUrlPattern, cryptoSchemePattern,
genericSchemePattern) so bare domains and short URLs are classified as
APP_STORE/SHORT_URL/WEB instead of OTHER (apply same change to the second block
around lines 107-116 referenced in the review).

In `@src/pages/ResultNonUrl/ResultNonUrlPage.tsx`:
- Around line 119-120: The section heading text in ResultNonUrlPage (inside the
JSX block with section className={styles.previewSection} and h2
className={styles.previewTitle}) is misleading — change the literal string "전체
URL 스키마 타입 보기" to a more accurate label such as "전체 스키마 타입 보기" (or "비-URL 스키마 타입
보기" if you prefer emphasis on non-URL items); update any corresponding i18n key
or text constant if the project uses localization and ensure any aria-labels or
tests that reference the old text are updated to match.
🪄 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: 9d11eb2a-7aa5-4556-b774-df1a84342f9f

📥 Commits

Reviewing files that changed from the base of the PR and between 852601d and e97dfe0.

📒 Files selected for processing (6)
  • src/pages/ResultNonUrl/ResultNonUrlPage.tsx
  • src/pages/ResultNonUrl/constants/nonUrlActionText.ts
  • src/pages/ResultNonUrl/lib/resolveNonUrlActionExecution.ts
  • src/pages/ResultNonUrl/lib/toResultNonUrlPageData.test.ts
  • src/pages/ResultNonUrl/lib/toResultNonUrlPageData.ts
  • src/pages/ResultNonUrl/types/resultNonUrlPage.types.ts

Comment thread src/pages/ResultNonUrl/lib/resolveNonUrlActionExecution.ts
Comment thread src/pages/ResultNonUrl/lib/toResultNonUrlPageData.test.ts
Comment thread src/pages/ResultNonUrl/lib/toResultNonUrlPageData.ts
Comment thread src/pages/ResultNonUrl/ResultNonUrlPage.tsx
@kim-subsub kim-subsub merged commit 25768ae into develop May 14, 2026
8 checks passed
@kim-subsub kim-subsub deleted the feat/40 branch May 14, 2026 11:10
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