fix: add timeout template for OpenCerts#7
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a ConnectionFailure UI and story, plus FrameConnector logic to render it on connection timeouts when running on opencerts.io; existing DefaultTemplate behavior remains unchanged otherwise. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ 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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/frame/FrameConnector.tsx`:
- Line 89: The current isOpenCerts check can match unrelated hosts; update the
detection so it only returns true for the root domain or its subdomains: keep
the typeof window !== "undefined" guard, then compute const host =
window.location.hostname and set isOpenCerts to true only when host ===
"opencerts.io" or host.endsWith(".opencerts.io"); replace the existing
endsWith("opencerts.io") usage in FrameConnector.tsx (isOpenCerts) with this
stricter check to avoid false positives like evilopencerts.io.
In `@src/DefaultTemplate.tsx`:
- Line 30: The span that renders Template URL currently uses props.source
directly (the element containing Template URL: "{props.source}"), which can
display "undefined"; update DefaultTemplate.tsx to guard against a missing
source by either conditionally rendering that span only when props.source is
truthy or by providing a clear fallback (e.g., "N/A" or "Unknown") instead of
undefined; locate the span element that uses props.source and change it to
render props.source ?? 'N/A' or wrap it in a conditional check so users never
see "undefined".
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bd3c727c-859c-4964-886a-20c954ea8a08
📒 Files selected for processing (3)
src/DefaultTemplate.stories.tssrc/DefaultTemplate.tsxsrc/components/frame/FrameConnector.tsx
|
🎉 This PR is included in version 1.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit