Skip to content

Fix funnel page preview popup crash#34

Merged
peterod99 merged 1 commit intomainfrom
claude/fix-preview-popup-crash-ss8WE
Jan 6, 2026
Merged

Fix funnel page preview popup crash#34
peterod99 merged 1 commit intomainfrom
claude/fix-preview-popup-crash-ss8WE

Conversation

@peterod99
Copy link
Copy Markdown
Owner

@peterod99 peterod99 commented Jan 6, 2026

  • Add error state handling for database query failures
  • Add loading state to prevent rendering before data is ready
  • Validate activeTenantSlug before constructing preview URLs
  • Disable "Open Live Page" button when required data unavailable
  • Display user-friendly error messages instead of crashing

Summary by CodeRabbit

  • Bug Fixes

    • Added tenant context validation with warning when not configured
    • Improved error handling and messaging for live page preview failures
    • Disabled Open Live Page button when loading or required data unavailable
  • New Features

    • Added loading state indicator while fetching preview data
    • Added error state UI with clear messaging

✏️ Tip: You can customize this high-level summary in your review settings.

- Add error state handling for database query failures
- Add loading state to prevent rendering before data is ready
- Validate activeTenantSlug before constructing preview URLs
- Disable "Open Live Page" button when required data unavailable
- Display user-friendly error messages instead of crashing
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 6, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Updates LivePagePreview component to add comprehensive error handling and loading state management for funnel data fetching. Introduces tenant context validation, shields the Open Live Page action with prerequisite checks, disables the button appropriately based on state and validation, and renders dedicated error and loading UI states using AlertCircle icon.

Changes

Cohort / File(s) Summary
Error Handling & State Management
src/components/marketing/LivePagePreview.tsx
Adds isLoading and error state variables; replaces simple data fetch with try/catch/finally pattern to handle query errors from tenantAwareClient; logs errors and sets user-facing error messages; clears error on component open; extends UI to render error state with AlertCircle icon when error present, renders loading state while fetching, and preserves existing content otherwise; guards Open Live Page action with validation checks for funnelSlug and activeTenantSlug; updates URL construction to use active tenant slug; disables button while loading or when validation criteria are unmet; imports AlertCircle from lucide-react

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Poem

🐰 A hop, a skip, through states so grand,
Error messages now at hand,
Loading spinners dance with care,
Validation guards beyond compare,
Better UX, we proudly declare!


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 40dbfdb and c2a8503.

📒 Files selected for processing (1)
  • src/components/marketing/LivePagePreview.tsx

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@peterod99 peterod99 merged commit 588d65c into main Jan 6, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants