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.
| Initial g1t: services, event bus, intents and attempts | 1 | import { |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 2 | BookOpen, |
| 3 | ChevronDown, | |
| Search across all of g1t, Explore, and a command palette | 4 | Compass, |
| 5 | CreditCard, | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 6 | LayoutDashboard, |
| Search across all of g1t, Explore, and a command palette | 7 | LogIn, |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 8 | LogOut, |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 9 | Menu, |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 10 | Plus, |
| 11 | Search, | |
| 12 | Settings, | |
| 13 | } from "lucide-react"; | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 14 | import { useState } from "react"; |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 15 | import { |
| Initial g1t: services, event bus, intents and attempts | 16 | Form, |
| 17 | isRouteErrorResponse, | |
| 18 | Link, | |
| 19 | Links, | |
| 20 | Meta, | |
| API and MCP server, Rust identity service, registration, site redesign | 21 | NavLink, |
| Initial g1t: services, event bus, intents and attempts | 22 | Outlet, |
| 23 | Scripts, | |
| 24 | ScrollRestoration, | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 25 | type ShouldRevalidateFunctionArgs, |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 26 | useLocation, |
| Search across all of g1t, Explore, and a command palette | 27 | useParams, |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 28 | useRouteError, |
| Initial g1t: services, event bus, intents and attempts | 29 | useRouteLoaderData, |
| Acceptance checks in sandboxes, line comments and review verdicts | 30 | useSubmit, |
| Initial g1t: services, event bus, intents and attempts | 31 | } from "react-router"; |
| 32 | ||
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 33 | import { type User, hasAccessIn, sharedWorkspaces } from "@g1t/contracts"; |
| Email verification, password reset, and Git for AI scale positioning | 34 | |
| Initial g1t: services, event bus, intents and attempts | 35 | import type { Route } from "./+types/root"; |
| Load the stylesheet first; plain legal contact details | 36 | import appCss from "./app.css?url"; |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 37 | import displayFont from "@g1t/theme/fonts/bricolage-grotesque-latin.woff2?url"; |
| 38 | import sansFont from "@g1t/theme/fonts/hanken-grotesk-latin.woff2?url"; | |
| Initial g1t: services, event bus, intents and attempts | 39 | import { Logo } from "./components/logo"; |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 40 | import { Avatar, ButtonLink, notACredential } from "./components/ui"; |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 41 | import { |
| 42 | DropdownMenu, | |
| 43 | DropdownMenuContent, | |
| 44 | DropdownMenuItem, | |
| 45 | DropdownMenuLabel, | |
| 46 | DropdownMenuSeparator, | |
| 47 | DropdownMenuTrigger, | |
| 48 | } from "./components/ui/dropdown-menu"; | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 49 | import { AppShell, Progress, type ShellData } from "./components/shell"; |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 50 | import { SiteFooter } from "./components/footer"; |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 51 | import { SpikeBanner } from "./components/spike-banner"; |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 52 | import { readCookie } from "./lib/mission"; |
| 53 | import { WORKSPACE_COOKIE, workspaceFor } from "./lib/workspace-choice"; | |
| 54 | import { NotFound } from "./components/not-found"; | |
| 55 | import { usesAppShell } from "./lib/chrome"; | |
| Search across all of g1t, Explore, and a command palette | 56 | import { CommandPalette, type PaletteCommand, usePaletteShortcut } from "./components/command-palette"; |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 57 | import { billing, projects } from "./lib/services.server"; |
| 58 | import { countsFor, readableRepos } from "./lib/access.server"; | |
| 59 | import { shortCache } from "./lib/cache.server"; | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 60 | import { getViewer, viewerMiddleware } from "./lib/session.server"; |
| 61 | import { registrationMode } from "./lib/registration.server"; | |
| 62 | import { useSignUpCopy } from "./lib/registration"; | |
| 63 | ||
| Initial g1t: services, event bus, intents and attempts | 64 | |
| 65 | export const links: Route.LinksFunction = () => [ | |
| The fleet: g1t's new mark | 66 | { rel: "icon", href: "/favicon.ico", sizes: "32x32" }, |
| Initial g1t: services, event bus, intents and attempts | 67 | { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }, |
| The fleet: g1t's new mark | 68 | { rel: "icon", type: "image/png", sizes: "192x192", href: "/icon-192.png" }, |
| 69 | { rel: "apple-touch-icon", href: "/apple-touch-icon.png" }, | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 70 | // The text and headline faces are wanted on every page, so they start |
| 71 | // loading with the stylesheet; mono waits until something uses it. | |
| 72 | { rel: "preload", href: sansFont, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, | |
| 73 | { rel: "preload", href: displayFont, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, | |
| Initial g1t: services, event bus, intents and attempts | 74 | ]; |
| 75 | ||
| 76 | export const middleware: Route.MiddlewareFunction[] = [viewerMiddleware]; | |
| 77 | ||
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 78 | export async function loader({ context, params, request }: Route.LoaderArgs) { |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 79 | const user = getViewer(context); |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 80 | const chosen = readCookie(request.headers.get("cookie"), WORKSPACE_COOKIE); |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 81 | // What sign-up buttons say: Request access while g1t is invite-only. |
| 82 | const [shell, mode] = await Promise.all([ | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 83 | user ? shellFor(user, params, chosen, context) : visitorShell(params, context), |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 84 | user ? Promise.resolve(null) : registrationMode(), |
| 85 | ]); | |
| 86 | return { user, shell, inviteOnly: mode !== "open" }; | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 87 | } |
| 88 | ||
| 89 | /** | |
| 90 | * The sidebar for someone not signed in: nothing of their own, only the | |
| 91 | * open counts of the project being looked at. One call, and only in a | |
| 92 | * project; it answers the same for a private project as a missing one. | |
| 93 | */ | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 94 | async function visitorShell(params: { owner?: string; repo?: string }, context: Route.LoaderArgs["context"]): Promise<ShellData> { |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 95 | const path = params.owner && params.repo ? { namespace: params.owner, name: params.repo } : null; |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 96 | const counts = path ? await countsFor(context, params) : null; |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 97 | return { |
| 98 | workspace: null, | |
| 99 | repos: [], | |
| 100 | repo: path && counts?.ok ? { ...path, member: false, issues: counts.value.issues, pulls: counts.value.pulls } : null, | |
| 101 | limit: null, | |
| 102 | monthUsageMicros: null, | |
| 103 | }; | |
| Initial g1t: services, event bus, intents and attempts | 104 | } |
| 105 | ||
| Agents as a team: lifecycle, merge queue, billing and a new shell | 106 | /** |
| 107 | * The sidebar only changes with the workspace or repository being looked | |
| 108 | * at, or after something was submitted: not on every page within them. | |
| 109 | */ | |
| 110 | export function shouldRevalidate({ | |
| 111 | currentParams, | |
| 112 | nextParams, | |
| 113 | formMethod, | |
| 114 | defaultShouldRevalidate, | |
| 115 | }: ShouldRevalidateFunctionArgs) { | |
| 116 | if (formMethod && formMethod !== "GET") return defaultShouldRevalidate; | |
| 117 | return currentParams.owner !== nextParams.owner || currentParams.repo !== nextParams.repo; | |
| 118 | } | |
| 119 | ||
| 120 | /** | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 121 | * The sidebar: the workspace you chose (lib/workspace-choice.ts), or the |
| 122 | * one whose own pages these are; its projects; and the repository being | |
| 123 | * looked at. A project in another workspace does not switch it. | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 124 | */ |
| 125 | async function shellFor( | |
| 126 | user: User, | |
| 127 | params: { owner?: string; repo?: string }, | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 128 | chosen: string | null, |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 129 | context: Route.LoaderArgs["context"], |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 130 | ): Promise<ShellData> { |
| 131 | const memberships = user.workspaces ?? []; | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 132 | const workspace = workspaceFor(memberships, chosen, params); |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 133 | const path = params.owner && params.repo ? { namespace: params.owner, name: params.repo } : null; |
| Usage, like a hosting provider's: what agents cost, per day, task, repository and pull request | 134 | const now = new Date(); |
| 135 | const monthStart = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), 1)).toISOString(); | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 136 | // What the sidebar shows of the workspace changes rarely: kept for a few |
| 137 | // seconds per person and workspace, except just after they changed | |
| 138 | // something (lib/cache.server.ts). | |
| 139 | const kept = <T,>(what: string, load: () => Promise<T>) => | |
| 140 | workspace ? shortCache(`shell:${what}:${user.id}:${workspace.slug}`, SHELL_TTL_MS, load) : Promise.resolve(null); | |
| The sidebar asks billing whether it is on, not for the account, so no page waits on the card processor | 141 | const [listed, counts, status, usage, limit, entitlements, shared] = await Promise.all([ |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 142 | kept("projects", () => projects.list(workspace!.slug, user)), |
| 143 | path ? countsFor(context, params) : Promise.resolve(null), | |
| The sidebar asks billing whether it is on, not for the account, so no page waits on the card processor | 144 | // Whether billing is on, without reading the account: that asks the |
| 145 | // card processor about the workspace's cards, too slow for every page. | |
| 146 | kept("status", () => billing.status()).catch(() => null), | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 147 | kept(`usage:${monthStart}`, () => billing.usage(workspace!.slug, user, monthStart)), |
| 148 | kept("limit", () => billing.limit(workspace!.slug, user)).catch(() => null), | |
| 149 | kept("entitlements", () => billing.entitlements(workspace!.slug)).catch(() => null), | |
| 150 | sharedRepos(user), | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 151 | ]); |
| 152 | return { | |
| 153 | workspace, | |
| Projects: what a workspace builds and runs, first on every page | 154 | // Projects are what the sidebar lists: what the workspace builds and runs. |
| 155 | repos: listed?.ok | |
| 156 | ? listed.value.map((project) => ({ | |
| 157 | namespace: project.workspace, | |
| 158 | name: project.slug, | |
| 159 | title: project.name, | |
| 160 | isPrivate: project.private, | |
| 161 | })) | |
| 162 | : [], | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 163 | repo: |
| 164 | path && counts?.ok | |
| 165 | ? { | |
| 166 | ...path, | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 167 | // Until the repository's own page says what their role is. |
| 168 | member: hasAccessIn(user, path.namespace), | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 169 | issues: counts.value.issues, |
| 170 | pulls: counts.value.pulls, | |
| 171 | } | |
| 172 | : null, | |
| Billing accounts, terms and enterprises; g1t is no longer free | 173 | // Where the workspace stands against its usage limit, once billing is on. |
| 174 | limit: | |
| The sidebar asks billing whether it is on, not for the account, so no page waits on the card processor | 175 | status?.enabled && limit?.ok |
| Billing accounts, terms and enterprises; g1t is no longer free | 176 | ? { |
| 177 | exposureMicros: limit.value.exposureMicros, | |
| 178 | ceilingMicros: limit.value.ceilingMicros, | |
| 179 | state: limit.value.state, | |
| 180 | comped: limit.value.trust === "internal", | |
| 181 | } | |
| 182 | : null, | |
| The sidebar asks billing whether it is on, not for the account, so no page waits on the card processor | 183 | free: Boolean(status?.free), |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 184 | // A spend spike or a hold pauses new compute: the shell says so on every page. |
| 185 | compute: | |
| 186 | workspace && entitlements && (entitlements.paused || entitlements.spike?.status === "open") | |
| 187 | ? { paused: entitlements.paused, spike: entitlements.spike ?? null, owner: workspace.role === "owner" } | |
| 188 | : null, | |
| 189 | shared, | |
| Usage while free is shown at cost; agents get rustfmt and clippy | 190 | // While g1t is free every charge is zero, so usage is shown at cost. |
| 191 | monthUsageMicros: usage?.ok ? (usage.value.free ? usage.value.usedMicros : usage.value.spentMicros) : null, | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 192 | }; |
| 193 | } | |
| 194 | ||
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 195 | /** How long one isolate keeps the sidebar's workspace answers. */ |
| 196 | const SHELL_TTL_MS = 15_000; | |
| 197 | ||
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 198 | /** Most repositories listed under Shared with you. */ |
| 199 | const MAX_SHARED = 20; | |
| 200 | ||
| 201 | /** | |
| 202 | * Repositories shared with the user in workspaces they do not belong to, | |
| 203 | * by their grants: only those, never the workspace's other repositories. | |
| 204 | */ | |
| 205 | async function sharedRepos(user: User): Promise<ShellData["shared"]> { | |
| 206 | const outside = new Set(sharedWorkspaces(user)); | |
| 207 | if (outside.size === 0) return []; | |
| 208 | const ids = (user.grants ?? []).filter((grant) => outside.has(grant.workspace)).map((grant) => grant.repo_id).slice(0, MAX_SHARED); | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 209 | const found = await readableRepos(ids, user); |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 210 | return found |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 211 | .map((repo) => ({ namespace: repo.namespace, name: repo.name, isPrivate: repo.isPrivate })) |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 212 | .sort((a, b) => `${a.namespace}/${a.name}`.localeCompare(`${b.namespace}/${b.name}`)); |
| 213 | } | |
| 214 | ||
| API and MCP server, Rust identity service, registration, site redesign | 215 | function HeaderLink({ to, children }: { to: string; children: React.ReactNode }) { |
| 216 | return ( | |
| 217 | <NavLink | |
| 218 | to={to} | |
| 219 | className={({ isActive }) => | |
| 220 | `rounded-md px-2.5 py-1.5 text-sm transition-colors hover:bg-raised hover:text-fg ${ | |
| 221 | isActive ? "text-fg" : "text-muted" | |
| 222 | }` | |
| 223 | } | |
| 224 | > | |
| 225 | {children} | |
| 226 | </NavLink> | |
| 227 | ); | |
| 228 | } | |
| 229 | ||
| Search across all of g1t, Explore, and a command palette | 230 | /** What the palette offers someone without the app's sidebar. */ |
| 231 | const PUBLIC_COMMANDS: PaletteCommand[] = [ | |
| 232 | { label: "Explore", hint: "Public projects", to: "/explore", icon: <Compass size={15} /> }, | |
| 233 | { label: "Search g1t", hint: "Repositories, code, issues, people", to: "/search", icon: <Search size={15} /> }, | |
| 234 | { label: "Pricing", to: "/pricing", icon: <CreditCard size={15} /> }, | |
| 235 | { label: "Documentation", to: "https://docs.g1t.sh/", icon: <BookOpen size={15} /> }, | |
| 236 | { label: "Sign in", to: "/login", icon: <LogIn size={15} /> }, | |
| 237 | { label: "Sign up", to: "/register", icon: <Plus size={15} /> }, | |
| 238 | ]; | |
| 239 | ||
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 240 | /** Sign up, or Request access while g1t is invite-only. */ |
| 241 | function SignUpButton() { | |
| 242 | const copy = useSignUpCopy(); | |
| 243 | return <ButtonLink to="/register">{copy.primary}</ButtonLink>; | |
| 244 | } | |
| 245 | ||
| Email verification, password reset, and Git for AI scale positioning | 246 | function Header({ user }: { user: User | null | undefined }) { |
| Acceptance checks in sandboxes, line comments and review verdicts | 247 | const submit = useSubmit(); |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 248 | const signUp = useSignUpCopy(); |
| Search across all of g1t, Explore, and a command palette | 249 | const [palette, setPalette] = useState(false); |
| 250 | usePaletteShortcut(() => setPalette((open) => !open)); | |
| 251 | const params = useParams(); | |
| 252 | const repo = params.owner && params.repo ? `${params.owner}/${params.repo}` : null; | |
| API and MCP server, Rust identity service, registration, site redesign | 253 | return ( |
| 254 | <header className="sticky top-0 z-40 border-b border-line bg-surface/85 backdrop-blur"> | |
| 255 | <div className="mx-auto flex h-14 max-w-6xl items-center gap-2 px-4"> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 256 | <Link to="/" aria-label="g1t home" className="mr-2 flex"> |
| API and MCP server, Rust identity service, registration, site redesign | 257 | <Logo /> |
| 258 | </Link> | |
| 259 | <Form action="/search" role="search" className="relative hidden grow sm:block sm:max-w-xs"> | |
| 260 | <Search | |
| 261 | size={14} | |
| 262 | className="pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-faint" | |
| 263 | /> | |
| 264 | <input | |
| 265 | name="q" | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 266 | {...notACredential()} |
| Search across all of g1t, Explore, and a command palette | 267 | placeholder="Search g1t" |
| 268 | aria-label="Search g1t" | |
| 269 | className="w-full rounded-md border border-line bg-bg py-1.5 pr-12 pl-8 text-sm outline-none transition-colors placeholder:text-faint hover:border-line-strong focus:border-accent-dim" | |
| API and MCP server, Rust identity service, registration, site redesign | 270 | /> |
| Search across all of g1t, Explore, and a command palette | 271 | <kbd className="pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 rounded bg-raised px-1.5 font-mono text-[0.625rem] text-muted ring-1 ring-line"> |
| 272 | ⌘K | |
| 273 | </kbd> | |
| API and MCP server, Rust identity service, registration, site redesign | 274 | </Form> |
| Search across all of g1t, Explore, and a command palette | 275 | <button |
| 276 | type="button" | |
| 277 | aria-label="Search g1t" | |
| 278 | onClick={() => setPalette(true)} | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 279 | className="flex size-10 items-center justify-center rounded-md text-muted transition-colors hover:bg-raised hover:text-fg sm:hidden" |
| Search across all of g1t, Explore, and a command palette | 280 | > |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 281 | <Search size={18} /> |
| Search across all of g1t, Explore, and a command palette | 282 | </button> |
| 283 | <CommandPalette | |
| 284 | open={palette} | |
| 285 | onOpenChange={setPalette} | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 286 | commands={user ? [{ label: "Mission control", to: "/", icon: <LayoutDashboard size={15} /> }, ...PUBLIC_COMMANDS.slice(0, 4)] : PUBLIC_COMMANDS.map((command) => (command.to === "/register" ? { ...command, label: signUp.primary } : command))} |
| Search across all of g1t, Explore, and a command palette | 287 | repo={repo} |
| 288 | /> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 289 | <nav aria-label="Main" className="hidden items-center gap-0.5 sm:flex"> |
| API and MCP server, Rust identity service, registration, site redesign | 290 | <HeaderLink to="/explore">Explore</HeaderLink> |
| Prices keep themselves current with what g1t pays | 291 | <HeaderLink to="/pricing">Pricing</HeaderLink> |
| Docs as their own app; shared theme package | 292 | <HeaderLink to="https://docs.g1t.sh/">Docs</HeaderLink> |
| API and MCP server, Rust identity service, registration, site redesign | 293 | </nav> |
| 294 | <div className="ml-auto flex items-center gap-2"> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 295 | {/* On a phone the links fold into one menu, so the bar fits. */} |
| 296 | <DropdownMenu> | |
| 297 | <DropdownMenuTrigger | |
| 298 | aria-label="Menu" | |
| 299 | className="flex size-10 items-center justify-center rounded-md text-muted outline-none transition-colors hover:bg-raised hover:text-fg data-[state=open]:bg-raised data-[state=open]:text-fg sm:hidden" | |
| 300 | > | |
| 301 | <Menu size={18} /> | |
| 302 | </DropdownMenuTrigger> | |
| 303 | <DropdownMenuContent align="end" className="w-52"> | |
| 304 | <DropdownMenuItem asChild className="min-h-11"> | |
| 305 | <Link to="/explore"> | |
| 306 | <Compass /> | |
| 307 | Explore | |
| 308 | </Link> | |
| 309 | </DropdownMenuItem> | |
| 310 | <DropdownMenuItem asChild className="min-h-11"> | |
| 311 | <Link to="/pricing"> | |
| 312 | <CreditCard /> | |
| 313 | Pricing | |
| 314 | </Link> | |
| 315 | </DropdownMenuItem> | |
| 316 | <DropdownMenuItem asChild className="min-h-11"> | |
| 317 | <Link to="https://docs.g1t.sh/"> | |
| 318 | <BookOpen /> | |
| 319 | Docs | |
| 320 | </Link> | |
| 321 | </DropdownMenuItem> | |
| 322 | {!user && ( | |
| 323 | <> | |
| 324 | <DropdownMenuSeparator /> | |
| 325 | <DropdownMenuItem asChild className="min-h-11"> | |
| 326 | <Link to="/login"> | |
| 327 | <LogIn /> | |
| 328 | Sign in | |
| 329 | </Link> | |
| 330 | </DropdownMenuItem> | |
| 331 | </> | |
| 332 | )} | |
| 333 | </DropdownMenuContent> | |
| 334 | </DropdownMenu> | |
| API and MCP server, Rust identity service, registration, site redesign | 335 | {user ? ( |
| 336 | <> | |
| 337 | <Link | |
| 338 | to="/new" | |
| Projects live: fixes from walking them end to end | 339 | aria-label="New project" |
| API and MCP server, Rust identity service, registration, site redesign | 340 | className="rounded-md border border-line p-1.5 text-muted transition-colors hover:border-line-strong hover:text-fg" |
| 341 | > | |
| 342 | <Plus size={16} /> | |
| 343 | </Link> | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 344 | <DropdownMenu> |
| 345 | <DropdownMenuTrigger | |
| 346 | aria-label="Account menu" | |
| 347 | className="flex items-center gap-1.5 rounded-md p-1 outline-none transition-colors hover:bg-raised data-[state=open]:bg-raised" | |
| API and MCP server, Rust identity service, registration, site redesign | 348 | > |
| Workspace names and icons, and a component kit for every control | 349 | <Avatar name={user.username} image={user.avatar} size={24} /> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 350 | <ChevronDown size={14} className="text-faint" /> |
| 351 | </DropdownMenuTrigger> | |
| 352 | <DropdownMenuContent align="end" className="w-56"> | |
| 353 | <DropdownMenuLabel> | |
| 354 | Signed in as{" "} | |
| 355 | <span className="font-mono font-medium text-fg"> | |
| 356 | {user.username} | |
| 357 | </span> | |
| 358 | </DropdownMenuLabel> | |
| 359 | <DropdownMenuSeparator /> | |
| Workspaces own repositories | 360 | {(user.workspaces ?? []).map((membership) => ( |
| 361 | <DropdownMenuItem asChild key={membership.slug}> | |
| 362 | <Link to={`/${membership.slug}`}> | |
| Workspace names and icons, and a component kit for every control | 363 | <Avatar name={membership.slug} image={membership.avatar} size={16} square /> |
| 364 | <span className="min-w-0 truncate">{membership.name || membership.slug}</span> | |
| Workspaces own repositories | 365 | </Link> |
| 366 | </DropdownMenuItem> | |
| 367 | ))} | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 368 | <DropdownMenuItem asChild> |
| Workspaces own repositories | 369 | <Link to="/workspaces/new"> |
| 370 | <Plus /> | |
| 371 | New workspace | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 372 | </Link> |
| 373 | </DropdownMenuItem> | |
| Workspaces own repositories | 374 | <DropdownMenuSeparator /> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 375 | <DropdownMenuItem asChild> |
| 376 | <Link to="/"> | |
| 377 | <LayoutDashboard /> | |
| 378 | Mission control | |
| 379 | </Link> | |
| 380 | </DropdownMenuItem> | |
| 381 | <DropdownMenuItem asChild> | |
| 382 | <Link to="/new"> | |
| 383 | <Plus /> | |
| Projects live: fixes from walking them end to end | 384 | New project |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 385 | </Link> |
| 386 | </DropdownMenuItem> | |
| 387 | <DropdownMenuSeparator /> | |
| 388 | <DropdownMenuItem asChild> | |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 389 | <Link to="/settings/profile"> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 390 | <Settings /> |
| 391 | Settings | |
| 392 | </Link> | |
| 393 | </DropdownMenuItem> | |
| 394 | <DropdownMenuItem asChild> | |
| Docs as their own app; shared theme package | 395 | <Link to="https://docs.g1t.sh/quickstart/"> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 396 | <BookOpen /> |
| 397 | Documentation | |
| 398 | </Link> | |
| 399 | </DropdownMenuItem> | |
| 400 | <DropdownMenuSeparator /> | |
| Acceptance checks in sandboxes, line comments and review verdicts | 401 | {/* Submitted from here: the menu closes on select, and a button |
| 402 | that has left the page cannot submit a form. */} | |
| 403 | <DropdownMenuItem | |
| 404 | onSelect={() => submit(null, { method: "post", action: "/logout" })} | |
| 405 | > | |
| 406 | <LogOut /> | |
| 407 | Sign out | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 408 | </DropdownMenuItem> |
| 409 | </DropdownMenuContent> | |
| 410 | </DropdownMenu> | |
| API and MCP server, Rust identity service, registration, site redesign | 411 | </> |
| 412 | ) : ( | |
| 413 | <> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 414 | <span className="hidden sm:contents"> |
| 415 | <HeaderLink to="/login">Sign in</HeaderLink> | |
| 416 | </span> | |
| 417 | <SignUpButton /> | |
| API and MCP server, Rust identity service, registration, site redesign | 418 | </> |
| 419 | )} | |
| 420 | </div> | |
| 421 | </div> | |
| 422 | </header> | |
| 423 | ); | |
| 424 | } | |
| 425 | ||
| Initial g1t: services, event bus, intents and attempts | 426 | export function Layout({ children }: { children: React.ReactNode }) { |
| 427 | // Undefined when the root loader itself failed. | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 428 | const root = useRouteLoaderData<typeof loader>("root"); |
| 429 | const user = root?.user; | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 430 | const { pathname } = useLocation(); |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 431 | // Drawn around the error page too: a 404 keeps the sidebar out of a |
| 432 | // project or workspace the viewer cannot see. | |
| 433 | const error = useRouteError(); | |
| 434 | const missing = isRouteErrorResponse(error) && error.status === 404; | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 435 | // The billing page shows the full banner itself. |
| 436 | const paused = root?.shell?.compute && root.shell.workspace && !pathname.endsWith("/-/billing") && ( | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 437 | <SpikeBanner |
| 438 | compact | |
| 439 | slug={root.shell.workspace.slug} | |
| 440 | entitlements={{ paused: root.shell.compute.paused, spike: root.shell.compute.spike }} | |
| 441 | owner={root.shell.compute.owner} | |
| 442 | /> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 443 | ); |
| 444 | const verify = user && !user.verified && ( | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 445 | <Form |
| 446 | method="post" | |
| 447 | action="/verify" | |
| 448 | className="flex flex-wrap items-center justify-center gap-x-3 gap-y-1 border-b border-warn/30 bg-warn/10 px-4 py-2 text-sm" | |
| 449 | > | |
| 450 | <span> | |
| 451 | Confirm your email address to create repositories and push. We | |
| 452 | sent you a link. | |
| 453 | </span> | |
| 454 | <button type="submit" className="font-medium underline underline-offset-4"> | |
| 455 | Send it again | |
| 456 | </button> | |
| 457 | </Form> | |
| 458 | ); | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 459 | const banner = |
| 460 | paused || verify ? ( | |
| 461 | <> | |
| 462 | {paused} | |
| 463 | {verify} | |
| 464 | </> | |
| 465 | ) : null; | |
| Initial g1t: services, event bus, intents and attempts | 466 | return ( |
| 467 | <html lang="en"> | |
| 468 | <head> | |
| 469 | <meta charSet="utf-8" /> | |
| 470 | <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| Dark gray base with lavender as an accent, and a live outcome view for plans | 471 | <meta name="theme-color" content="#0f0f11" /> |
| Put the stylesheet at the top of the head, before React Router's preloads | 472 | {/* The stylesheet before everything React Router preloads, so a slow |
| 473 | connection paints sooner (docs/research/css-shipping.md). */} | |
| Give the stylesheet a precedence so React places it before preloads | 474 | <link rel="stylesheet" href={appCss} precedence="default" /> |
| Initial g1t: services, event bus, intents and attempts | 475 | <Meta /> |
| 476 | <Links /> | |
| 477 | </head> | |
| API and MCP server, Rust identity service, registration, site redesign | 478 | <body className="flex min-h-screen flex-col"> |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 479 | {root?.shell && usesAppShell(pathname, user != null) ? ( |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 480 | <AppShell user={user ?? null} shell={root.shell} missing={missing} banner={banner}> |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 481 | {children} |
| 482 | </AppShell> | |
| 483 | ) : ( | |
| 484 | <> | |
| 485 | <Progress /> | |
| 486 | <Header user={user} /> | |
| 487 | {banner} | |
| 488 | <div className="grow">{children}</div> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 489 | <SiteFooter user={user} /> |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 490 | </> |
| Email verification, password reset, and Git for AI scale positioning | 491 | )} |
| Initial g1t: services, event bus, intents and attempts | 492 | <ScrollRestoration /> |
| 493 | <Scripts /> | |
| 494 | </body> | |
| 495 | </html> | |
| 496 | ); | |
| 497 | } | |
| 498 | ||
| 499 | export default function App() { | |
| 500 | return <Outlet />; | |
| 501 | } | |
| 502 | ||
| 503 | export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) { | |
| API and MCP server, Rust identity service, registration, site redesign | 504 | let title = "Something went wrong"; |
| 505 | let details = "An unexpected error occurred. Try again in a moment."; | |
| Initial g1t: services, event bus, intents and attempts | 506 | let stack: string | undefined; |
| 507 | ||
| 508 | if (isRouteErrorResponse(error)) { | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 509 | // The same page for something private and something missing. |
| 510 | if (error.status === 404) return <NotFound data={error.data} />; | |
| 511 | if (typeof error.data === "string" && error.data) { | |
| API and MCP server, Rust identity service, registration, site redesign | 512 | details = error.data; |
| 513 | } | |
| 514 | } else if (import.meta.env.DEV && error instanceof Error) { | |
| Initial g1t: services, event bus, intents and attempts | 515 | details = error.message; |
| 516 | stack = error.stack; | |
| 517 | } | |
| 518 | ||
| 519 | return ( | |
| API and MCP server, Rust identity service, registration, site redesign | 520 | <main className="mx-auto max-w-xl px-4 py-32 text-center"> |
| 521 | <h1 className="text-2xl font-semibold tracking-tight">{title}</h1> | |
| 522 | <p className="mt-3 text-muted">{details}</p> | |
| 523 | <div className="mt-8"> | |
| 524 | <ButtonLink to="/" variant="quiet"> | |
| 525 | Back to home | |
| 526 | </ButtonLink> | |
| 527 | </div> | |
| Initial g1t: services, event bus, intents and attempts | 528 | {stack && ( |
| API and MCP server, Rust identity service, registration, site redesign | 529 | <pre className="mt-8 overflow-x-auto rounded-lg border border-line p-4 text-left text-xs"> |
| Initial g1t: services, event bus, intents and attempts | 530 | <code>{stack}</code> |
| 531 | </pre> | |
| 532 | )} | |
| 533 | </main> | |
| 534 | ); | |
| 535 | } |