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