dev: add /dev/kyc-ui audit page#2113
Conversation
dev-only page showing all KYC UI states, modals, copy audit, and a proposed "Where you can pay" page design that separates identity confirmation from per-region payment status. splits manteca into separate argentina/brazil entries matching the geo-scoped enrollment.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization 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)
WalkthroughA new Next.js development page for KYC UI auditing was added at ChangesKYC UI Audit Page
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 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. ✨ Finishing Touches📝 Generate docstrings
Comment |
Code-analysis diffPainscore total: 5721.23 → 5729.52 (+8.29) 🆕 New findings (5)
📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/app/dev/kyc-ui/page.tsx (1)
590-594: 💤 Low valueOptional: Add cleanup for setTimeout to prevent state updates on unmounted component.
If the component unmounts during the 100ms delay,
setOpenModalwill be called on an unmounted component. For a dev page, this is low risk, but you could add cleanup using a ref oruseEffect.♻️ Optional fix with cleanup
export default function KycUiAuditPage() { const [openModal, setOpenModal] = useState<string | null>(null) const [activeTab, setActiveTab] = useState<'proposed' | 'states' | 'modals' | 'audit'>('proposed') const noop = () => {} + const timeoutRef = useRef<NodeJS.Timeout>() + + useEffect(() => { + return () => { + if (timeoutRef.current) { + clearTimeout(timeoutRef.current) + } + } + }, []) return ( ... onClick={() => { setActiveTab('modals') - setTimeout(() => setOpenModal('initiate_cross_region'), 100) + timeoutRef.current = setTimeout(() => setOpenModal('initiate_cross_region'), 100) }}🤖 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 `@src/app/dev/kyc-ui/page.tsx` around lines 590 - 594, The onClick handler schedules setOpenModal('initiate_cross_region') with setTimeout which can call state on an unmounted component; capture the timeout ID (e.g., in a ref like timeoutRef) when calling setTimeout in the component that contains setActiveTab and setOpenModal, and clear it in a useEffect cleanup (or clearTimeout before scheduling another) so the pending timeout is cancelled on unmount and avoids calling setOpenModal after unmount.
🤖 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.
Nitpick comments:
In `@src/app/dev/kyc-ui/page.tsx`:
- Around line 590-594: The onClick handler schedules
setOpenModal('initiate_cross_region') with setTimeout which can call state on an
unmounted component; capture the timeout ID (e.g., in a ref like timeoutRef)
when calling setTimeout in the component that contains setActiveTab and
setOpenModal, and clear it in a useEffect cleanup (or clearTimeout before
scheduling another) so the pending timeout is cancelled on unmount and avoids
calling setOpenModal after unmount.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0010776a-2fc0-4622-8155-ad4325d3d710
📒 Files selected for processing (1)
src/app/dev/kyc-ui/page.tsx
Uh oh!
There was an error while loading. Please reload this page.