flagon-io/g1t

public

Git for AI scale: a forge for thousands of agents working on the same code at once.

g1t/apps/sudo/app/root.tsx

73 lines2,712 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

A menu shaped by how g1t works, Soon pages for every promise, and sudo for sales1import { isRouteErrorResponse, Links, Meta, Outlet, useRouteLoaderData } from "react-router";
Billing accounts, terms and enterprises; g1t is no longer free2
3import type { Route } from "./+types/root";
4import "./app.css";
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look5import displayFont from "@g1t/theme/fonts/bricolage-grotesque-latin.woff2?url";
6import sansFont from "@g1t/theme/fonts/hanken-grotesk-latin.woff2?url";
A menu shaped by how g1t works, Soon pages for every promise, and sudo for sales7import { MobileBar, Sidebar } from "./components/shell";
Billing accounts, terms and enterprises; g1t is no longer free8import { ButtonLink } from "./components/ui";
9import { requireStaff } from "./lib/staff";
10
11export const links: Route.LinksFunction = () => [
12 { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look13 // The faces are served by sudo itself (@g1t/theme); these two are on every page.
14 { rel: "preload", href: sansFont, as: "font", type: "font/woff2", crossOrigin: "anonymous" },
15 { rel: "preload", href: displayFont, as: "font", type: "font/woff2", crossOrigin: "anonymous" },
Billing accounts, terms and enterprises; g1t is no longer free16];
17
18export const meta: Route.MetaFunction = () => [
19 { title: "sudo · g1t" },
20 { name: "robots", content: "noindex, nofollow" },
21];
22
23export async function loader({ context }: Route.LoaderArgs) {
24 return { email: requireStaff(context).email };
25}
26
27export function Layout({ children }: { children: React.ReactNode }) {
28 const root = useRouteLoaderData<typeof loader>("root");
29 return (
30 <html lang="en">
31 <head>
32 <meta charSet="utf-8" />
33 <meta name="viewport" content="width=device-width, initial-scale=1" />
34 <meta name="theme-color" content="#0f0f11" />
35 <Meta />
36 <Links />
37 </head>
A menu shaped by how g1t works, Soon pages for every promise, and sudo for sales38 <body className="min-h-screen">
39 <Sidebar email={root?.email} />
40 <MobileBar email={root?.email} />
41 <div className="lg:pl-60">{children}</div>
Billing accounts, terms and enterprises; g1t is no longer free42 {/* No <Scripts />: sudo ships no JavaScript, and its policy allows none. */}
43 </body>
44 </html>
45 );
46}
47
48export default function App() {
49 return <Outlet />;
50}
51
52export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
53 let title = "Something went wrong";
54 let details = "An unexpected error occurred.";
55 if (isRouteErrorResponse(error)) {
56 title = error.status === 404 ? "Not found" : `Error ${error.status}`;
57 details = typeof error.data === "string" && error.data ? error.data : error.statusText || details;
58 } else if (error instanceof Error) {
59 // Staff only: the real reason helps more than a polite one.
60 details = error.message;
61 }
62 return (
63 <main className="mx-auto max-w-xl px-4 py-24 text-center">
64 <h1 className="text-2xl font-semibold tracking-tight">{title}</h1>
65 <p className="mt-3 break-words text-muted">{details}</p>
66 <div className="mt-8">
67 <ButtonLink to="/" variant="quiet">
A menu shaped by how g1t works, Soon pages for every promise, and sudo for sales68 Back to the overview
Billing accounts, terms and enterprises; g1t is no longer free69 </ButtonLink>
70 </div>
71 </main>
72 );
73}