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