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