Redesign embedded Arcade widget - #41
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 58 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe Arcade widget now validates configurable HTTP(S) targets, applies sanitized UTM parameters, and renders a compact linked card. Responsive CSS updates stack content on narrow screens. Cookie consent is disabled on widget routes. ChangesArcade widget
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant ArcadeEmbedWidget
participant parseTargetUrl
participant TargetSite
Browser->>ArcadeEmbedWidget: provides url and UTM query parameters
ArcadeEmbedWidget->>parseTargetUrl: validates the target URL
parseTargetUrl-->>ArcadeEmbedWidget: returns the validated target or fallback
ArcadeEmbedWidget->>TargetSite: opens the target with sanitized UTM parameters
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
🧹 PR preview removedThe preview for this pull request was removed after the PR was closed. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@components/arcade/arcade-embed-widget.tsx`:
- Around line 24-31: Initialize ctaUrl in the arcade embed widget to the same
static fallback value for both server and initial client renders, then move the
window.location.search parsing and UTM customization into a useEffect that
updates ctaUrl after hydration. Preserve the existing parseTargetUrl and
sanitizeUtm behavior for the post-mount URL.
In `@components/privacy/cookie-consent.tsx`:
- Line 28: Update the isEmbedWidget path check to recognize only the root
/widget route and explicitly supported localized or base-path widget variants;
do not rely on broad pathname.endsWith("/widget") or endsWith("/widget/") checks
that classify unrelated routes such as /privacy/widget.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 312d8eff-0d5f-4249-ba84-ab955068fc68
📒 Files selected for processing (3)
app/widget/widget.csscomponents/arcade/arcade-embed-widget.tsxcomponents/privacy/cookie-consent.tsx
Summary
/widgetas a compact horizontal promo card instead of a mini landing pageCheck your scoreCTA/widget, including PR preview modeWhy
The previous widget consumed too much vertical space inside articles and looked like a separate page. The embed should read as a lightweight native promo card instead.
No direct changes were made to
main.Summary by CodeRabbit
New Features
Bug Fixes