From edfbe170a6c2c628a1c4d0b08d95abf72a43a7ca Mon Sep 17 00:00:00 2001 From: snehasishcodes Date: Sat, 29 Aug 2026 00:00:04 +0530 Subject: [PATCH] feat(web): add support page with GitHub prefill and rebalance footer - add /support form that redirects to GitHub new issue with title/body/labels prefilled - add public visibility warning with mailto:support@crosscode.site fallback - add Support to navbar and footer, reorganize footer into Product/Developers/Community/Legal for balance - simplify CTA card to minimal style (remove flickering grid, gradients, heavy borders) - add /support to sitemap Co-authored-by: muse-spark-1.2 --- apps/web/src/app/sitemap.ts | 6 + apps/web/src/app/support/page.tsx | 187 ++++++++++++++++++ apps/web/src/components/landing/cta.tsx | 55 +++--- .../components/landing/flickering-grid.tsx | 78 -------- apps/web/src/components/landing/footer.tsx | 24 ++- apps/web/src/components/landing/navbar.tsx | 3 + 6 files changed, 245 insertions(+), 108 deletions(-) create mode 100644 apps/web/src/app/support/page.tsx delete mode 100644 apps/web/src/components/landing/flickering-grid.tsx diff --git a/apps/web/src/app/sitemap.ts b/apps/web/src/app/sitemap.ts index 4acd4d4..c0f34d1 100644 --- a/apps/web/src/app/sitemap.ts +++ b/apps/web/src/app/sitemap.ts @@ -57,6 +57,12 @@ export const sitemapRoutes: MetadataRoute.Sitemap = [ changeFrequency: "weekly", priority: 0.7, }, + { + url: "/support", + lastModified: new Date(), + changeFrequency: "monthly", + priority: 0.6, + }, { url: "/privacy", lastModified: new Date(), diff --git a/apps/web/src/app/support/page.tsx b/apps/web/src/app/support/page.tsx new file mode 100644 index 0000000..2debf8a --- /dev/null +++ b/apps/web/src/app/support/page.tsx @@ -0,0 +1,187 @@ +"use client"; + +import { useEffect, useState } from "react"; +import { Navbar } from "@/components/landing/navbar"; +import { Footer } from "@/components/landing/footer"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; +import { authClient } from "@/lib/auth-client"; +import { AlertTriangle, ExternalLink, Github, Mail } from "lucide-react"; + + +const categories = [ + { value: "bug", label: "Bug Report" }, + { value: "feature", label: "Feature Request" }, + { value: "question", label: "Question" }, + { value: "billing", label: "Billing" }, + { value: "other", label: "Other" }, +] as const; + +const GITHUB_NEW_ISSUE = "https://github.com/snhsish/crosscode/issues/new"; + +export default function SupportPage() { + const [category, setCategory] = useState("question"); + const [title, setTitle] = useState(""); + const [description, setDescription] = useState(""); + const [email, setEmail] = useState(""); + + useEffect(() => { + authClient.getSession().then(({ data }) => { + if (data?.user?.email) setEmail(data.user.email); + }); + }, []); + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + const issueTitle = `[${categories.find((c) => c.value === category)?.label ?? category}] ${title}`.slice(0, 120); + const bodyParts = [description]; + if (email.trim()) bodyParts.push(`\n---\nContact: ${email.trim()}`); + bodyParts.push("\n_via /support_"); + const body = bodyParts.join("\n\n"); + const params = new URLSearchParams({ + title: issueTitle, + body, + labels: `support,${category}`, + }); + window.location.href = `${GITHUB_NEW_ISSUE}?${params.toString()}`; + }; + + return ( +
+ +
+
+
+

Support

+

+ Need help? Create a GitHub issue and we'll get back to you. +

+
+ +
+
+
+ +
+

This will be public

+

+ Issues created from this form are visible publicly on GitHub. For sensitive or private support, email{" "} + + support@crosscode.site + + {" "}instead. +

+
+
+
+ + + +
+
+ +
+
+ Create a support issue + You'll be redirected to GitHub to submit +
+
+
+ +
+
+ + +
+ +
+ + setTitle(e.target.value)} + required + maxLength={120} + /> +
+ +
+ +