feat(routing): serve public landing at / and move authed index to /home
Stripe's compliance crawler fetches the apex URL without executing JS and declined live-mode review when `https://resolutionflow.com/` returned the empty SPA shell that redirected to /landing client-side. Restructure the router so / serves LandingPage directly: - `/` → new `PublicLanding` wrapper (LandingPage for anon; Navigate to /home for authed users so there's no marketing-frame flicker). - Authed tree converted to a path-less layout route with absolute child paths. QuickStartPage moves to `/home`; all other children (`/trees`, `/pilot`, `/admin/*`, `/account/*`, etc.) keep their URLs. - `/landing` kept as a one-release stale-bookmark redirect to /. - `ProtectedRoute` unauth redirect flipped /landing → /; `state.from` preserved for post-login return. Reference updates: - Post-login / post-onboarding destinations → /home: OAuthCallbackPage (incl. `?welcome=teammate` query), WelcomeStep1/2/3 dismiss-rest, AssistantChatPage post-escalate, WelcomeRouter completion/dismiss redirects, VerifyEmailPage's three "Go to dashboard" links. - Authed chrome → /home: TopBar logo, AppLayout mobile nav + drawer logo, CommandPalette Dashboard entry. - Dashboard onboarding → /home: NextStepCard `ran_session.ctaPath`, SetupChecklist `ran_session.path`, SessionHistoryPage empty-state CTA. - Public back-links → /: TermsPage, PrivacyPage, PoliciesPage, ContactPage, PromotionsPage, PublicTemplatesPage (header + footer). SharedSessionPage's `to="/"` left as-is — now correctly lands anon visitors on the public landing. Crawlability: - New `frontend/public/robots.txt` allowlisting public pages and disallowing the authed app. - New `frontend/public/sitemap.xml` for /, /pricing, /contact-sales, /contact, /templates, /terms, /privacy, /policies, /promotions. - `PageMeta` gains an `og:url` (defaults to `window.location.href`) and flips `twitter:card` to `summary_large_image` when an `ogImage` is passed. Tests: - `AppLayout.test.tsx` updated to mount at `/home`. - New `ProtectedRoute.test.tsx` asserts unauthenticated `/home` redirects to `/` (not `/landing`) and preserves origin in `state.from`. If Stripe's crawler still cannot see the site after this (zero-JS crawler), the documented next escalation is server-side prerendering of public routes via `vite-plugin-ssg`. Out of scope here. Plan: docs/plans/2026-05-13-public-landing-routing-refactor.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
36
frontend/public/robots.txt
Normal file
36
frontend/public/robots.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
Allow: /terms
|
||||
Allow: /policies
|
||||
Allow: /privacy
|
||||
Allow: /contact
|
||||
Allow: /contact-sales
|
||||
Allow: /pricing
|
||||
Allow: /promotions
|
||||
Allow: /templates
|
||||
Disallow: /home
|
||||
Disallow: /trees/
|
||||
Disallow: /my-trees
|
||||
Disallow: /pilot/
|
||||
Disallow: /admin/
|
||||
Disallow: /account/
|
||||
Disallow: /script-builder
|
||||
Disallow: /scripts
|
||||
Disallow: /sessions
|
||||
Disallow: /analytics
|
||||
Disallow: /escalations
|
||||
Disallow: /queue
|
||||
Disallow: /review-queue
|
||||
Disallow: /network-diagrams
|
||||
Disallow: /kb-accelerator
|
||||
Disallow: /step-library
|
||||
Disallow: /tickets
|
||||
Disallow: /shares
|
||||
Disallow: /feedback
|
||||
Disallow: /welcome
|
||||
Disallow: /flow-assist
|
||||
Disallow: /dev/
|
||||
Disallow: /flows/
|
||||
Disallow: /guides
|
||||
|
||||
Sitemap: https://resolutionflow.com/sitemap.xml
|
||||
57
frontend/public/sitemap.xml
Normal file
57
frontend/public/sitemap.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/pricing</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.9</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/contact-sales</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/contact</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/templates</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.7</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/terms</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>yearly</changefreq>
|
||||
<priority>0.4</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/privacy</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>yearly</changefreq>
|
||||
<priority>0.4</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/policies</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>yearly</changefreq>
|
||||
<priority>0.4</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://resolutionflow.com/promotions</loc>
|
||||
<lastmod>2026-05-13</lastmod>
|
||||
<changefreq>monthly</changefreq>
|
||||
<priority>0.4</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
Reference in New Issue
Block a user