Redesign proof page with marketing content and CTAs#452
Redesign proof page with marketing content and CTAs#452AnthonyRonning merged 1 commit intomasterfrom
Conversation
Deploying maple with
|
| Latest commit: |
30a4904
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6da431ce.maple-ca8.pages.dev |
| Branch Preview URL: | https://feature-update-proof-page.maple-ca8.pages.dev |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 31 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds multiple local UI components and restructures the Verify (/proof) route into a multi-section page: data-flow diagram and repo links, live cryptographic attestation with loader/error and attestation display, privacy-comparison cards, security facts with contact/agent actions, and an FAQ. All changes are localized to the proof route file. Changes
Sequence Diagram(s)(No sequence diagrams generated — changes are primarily UI restructuring and new local components without a multi-component sequential flow that requires visualization.) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (1)
frontend/src/routes/proof.tsx (1)
255-259: Add error handling for clipboard API.
navigator.clipboard.writeText()can reject if the clipboard API is unavailable or permission is denied. Currently, failures are silently ignored.♻️ Suggested improvement with error handling
const handleCopy = async () => { - await navigator.clipboard.writeText(text); - setCopied(true); - setTimeout(() => setCopied(false), 2000); + try { + await navigator.clipboard.writeText(text); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } catch { + // Clipboard access denied or unavailable - fail silently or add user feedback + } };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/routes/proof.tsx` around lines 255 - 259, The handleCopy function currently calls navigator.clipboard.writeText(text) without handling rejections; wrap the writeText call in a try/catch inside handleCopy, call setCopied(true) only on successful await, and in the catch log or surface the error (e.g., console.error or show a toast) and ensure setCopied(false) is used to clear any state; also consider a fallback behavior (e.g., select-and-execCommand or a user-visible error) when navigator.clipboard is unavailable before calling navigator.clipboard.writeText.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/src/routes/proof.tsx`:
- Around line 255-259: The handleCopy function currently calls
navigator.clipboard.writeText(text) without handling rejections; wrap the
writeText call in a try/catch inside handleCopy, call setCopied(true) only on
successful await, and in the catch log or surface the error (e.g., console.error
or show a toast) and ensure setCopied(false) is used to clear any state; also
consider a fallback behavior (e.g., select-and-execCommand or a user-visible
error) when navigator.clipboard is unavailable before calling
navigator.clipboard.writeText.
| <div className="flex flex-col gap-4 mt-2"> | ||
| {/* To field */} | ||
| <div className="flex flex-col gap-1.5"> | ||
| <label className="text-sm font-medium text-muted-foreground">To</label> | ||
| <div className="flex items-center justify-between gap-2 px-3 py-2 rounded-md border border-input bg-[hsl(var(--muted))]/50"> | ||
| <span className="text-sm font-mono">{CONTACT_EMAIL}</span> | ||
| <CopyButton text={CONTACT_EMAIL} label="Copy" /> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Subject field */} | ||
| <div className="flex flex-col gap-1.5"> | ||
| <label className="text-sm font-medium text-muted-foreground">Subject</label> | ||
| <div className="flex items-center justify-between gap-2 px-3 py-2 rounded-md border border-input bg-[hsl(var(--muted))]/50"> | ||
| <span className="text-sm">{CONTACT_SUBJECT}</span> | ||
| <CopyButton text={CONTACT_SUBJECT} label="Copy" /> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Body field */} | ||
| <div className="flex flex-col gap-1.5"> | ||
| <div className="flex items-center justify-between"> | ||
| <label className="text-sm font-medium text-muted-foreground">Message</label> | ||
| <CopyButton text={CONTACT_BODY} label="Copy message" /> | ||
| </div> | ||
| <div className="px-3 py-2 rounded-md border border-input bg-[hsl(var(--muted))]/50"> | ||
| <pre className="text-sm whitespace-pre-wrap font-sans text-foreground/80"> | ||
| {CONTACT_BODY} | ||
| </pre> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Copy all */} | ||
| <div className="flex justify-end pt-2"> | ||
| <CopyButton | ||
| text={`To: ${CONTACT_EMAIL}\nSubject: ${CONTACT_SUBJECT}\n\n${CONTACT_BODY}`} | ||
| label="Copy all" | ||
| /> | ||
| </div> |
There was a problem hiding this comment.
the copy pasting for email sending here is very strange. there's standard email client popups that should be used instead
There was a problem hiding this comment.
good call, changed it to a standard mailto with pre-populated values
c2909b4 to
fcbcbc5
Compare
fcbcbc5 to
71844f8
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/src/routes/proof.tsx (1)
252-263: Consider cleaning up the timeout on unmount.If the component unmounts within the 2-second feedback window, the
setTimeoutcallback will still fire. While React 18+ handles this gracefully without errors, adding cleanup viauseEffectwould be more robust.♻️ Optional cleanup pattern
function CopyButton({ text, label }: { text: string; label: string }) { const [copied, setCopied] = useState(false); + const timeoutRef = useRef<number | null>(null); + + useEffect(() => { + return () => { + if (timeoutRef.current) clearTimeout(timeoutRef.current); + }; + }, []); const handleCopy = async () => { try { await navigator.clipboard.writeText(text); setCopied(true); - setTimeout(() => setCopied(false), 2000); + timeoutRef.current = window.setTimeout(() => setCopied(false), 2000); } catch { console.error("Failed to copy to clipboard"); } };Note: You'd need to add
useRefto the React imports.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/routes/proof.tsx` around lines 252 - 263, The CopyButton component's handleCopy starts a 2s setTimeout but doesn't clear it on unmount; add a timeout ref (via useRef) to store the timer id when calling setTimeout inside handleCopy, import useRef from React, and add a useEffect with a cleanup function that clears the timeout (clearTimeout) using that ref (and resets the ref) to prevent the callback from firing after unmount; keep setCopied behavior the same but cancel the pending timer on unmount or when a new copy occurs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@frontend/src/routes/proof.tsx`:
- Around line 252-263: The CopyButton component's handleCopy starts a 2s
setTimeout but doesn't clear it on unmount; add a timeout ref (via useRef) to
store the timer id when calling setTimeout inside handleCopy, import useRef from
React, and add a useEffect with a cleanup function that clears the timeout
(clearTimeout) using that ref (and resets the ref) to prevent the callback from
firing after unmount; keep setCopied behavior the same but cancel the pending
timer on unmount or when a new copy occurs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0cdf348d-8fb5-4a9a-9b6a-766c2746aa96
📒 Files selected for processing (1)
frontend/src/routes/proof.tsx
Add data flow diagram, privacy spectrum comparison cards, security team facts section, FAQ, contact modal with copyable fields, and AI agent introduction modal with llms-full.txt integration.
71844f8 to
30a4904
Compare
|
Ready for final review. Code review comments are fixed and code updated to latest from master. |
Summary
/proofpage with 6 sections: hero, data flow diagram, live attestation, privacy spectrum comparison, security team facts, and FAQllms-full.txtTest plan
Summary by CodeRabbit
New Features
Bug Fixes / Improvements