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