Skip to content

Conversation

@Alexbeav
Copy link

@Alexbeav Alexbeav commented Nov 3, 2025

🐛 Fix: Frontend 404 and React warnings

Problem

  1. Accessing root path (/) shows 404 before middleware redirect executes
  2. React Fragment prop warning when Plausible analytics is disabled

Solution

  1. Add empty page.tsx at (app)/(site)/ route to prevent 404 flash
  2. Use conditional rendering for PlausibleProvider instead of dynamic component assignment

Changes

  • apps/frontend/src/app/(app)/(site)/page.tsx (NEW FILE)
  • apps/frontend/src/app/(app)/layout.tsx (refactored lines 35-114)

Testing

  • Root path loads without 404
  • No React Fragment warnings in console
  • Existing OAuth login flows still work
  • All frontend tests pass

Breaking Changes

None - pure improvements, backward compatible

Why This Matters

  • Improves initial user experience by eliminating 404 flash
  • Removes console warnings that can confuse developers
  • Better aligns with Next.js App Router best practices

- Add empty page.tsx at root route to prevent 404 flash before middleware redirect
- Fix React Fragment warning by using explicit conditional rendering for PlausibleProvider
- Improves user experience during initial page load
Copilot AI review requested due to automatic review settings November 3, 2025 08:34
@vercel
Copy link

vercel bot commented Nov 3, 2025

@Alexbeav is attempting to deploy a commit to the Listinai Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

1 participant