feat: 스키마 타입별 Non-URL 결과 안내 문구 추가#41
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughNon-URL QR 처리 스택을 대대적으로 재설계: 액션 타입을 12개 대문자 식별자로 확장하고, 스킴 정규화 + 타겟값 기반 2단계 추론을 도입하며 카탈로그·실행계획·UI·테스트를 연동해 한국어 문구로 업데이트했습니다. 변경 사항Non-URL 작업 유형 통합 재설계
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ 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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
src/pages/ResultNonUrl/ResultNonUrlPage.tsxsrc/pages/ResultNonUrl/constants/nonUrlActionText.tssrc/pages/ResultNonUrl/lib/resolveNonUrlActionExecution.tssrc/pages/ResultNonUrl/lib/toResultNonUrlPageData.test.tssrc/pages/ResultNonUrl/lib/toResultNonUrlPageData.tssrc/pages/ResultNonUrl/types/resultNonUrlPage.types.ts
Summary
'ResultNonUrlPage.tsx' 페이지를 수정. 12개의 URL 스키마 타입에 따라 화면에 적절한 멘트가 나오도록 수정
Tasks
URL 스키마 타입 상세 가이드:
Summary by CodeRabbit
릴리스 노트
새로운 기능
버그 수정