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"; | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 14 | import { useEffect, 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, |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 27 | useMatches, |
| Search across all of g1t, Explore, and a command palette | 28 | useParams, |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 29 | useRouteError, |
| Initial g1t: services, event bus, intents and attempts | 30 | useRouteLoaderData, |
| Acceptance checks in sandboxes, line comments and review verdicts | 31 | useSubmit, |
| Initial g1t: services, event bus, intents and attempts | 32 | } from "react-router"; |
| 33 | ||
| Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036) | 34 | import { type User, awaitsConfirmation, hasAccessIn, sharedWorkspaces } from "@g1t/contracts"; |
| Email verification, password reset, and Git for AI scale positioning | 35 | |
| Initial g1t: services, event bus, intents and attempts | 36 | import type { Route } from "./+types/root"; |
| Load the stylesheet first; plain legal contact details | 37 | import appCss from "./app.css?url"; |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 38 | import displayFont from "@g1t/theme/fonts/bricolage-grotesque-latin.woff2?url"; |
| 39 | import sansFont from "@g1t/theme/fonts/hanken-grotesk-latin.woff2?url"; | |
| Initial g1t: services, event bus, intents and attempts | 40 | import { Logo } from "./components/logo"; |
| Merge branch 'worktree-agent-a985c01f43538af01' | 41 | import { Avatar, ButtonLink, SubmitButton, notACredential } from "./components/ui"; |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 42 | import { |
| 43 | DropdownMenu, | |
| 44 | DropdownMenuContent, | |
| 45 | DropdownMenuItem, | |
| 46 | DropdownMenuLabel, | |
| 47 | DropdownMenuSeparator, | |
| 48 | DropdownMenuTrigger, | |
| 49 | } from "./components/ui/dropdown-menu"; | |
| Merge branch 'worktree-agent-aca4790ea223aa235' | 50 | import { AppShell, Progress, type ShellData, useLeaving } from "./components/shell"; |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 51 | import { SiteFooter } from "./components/footer"; |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 52 | import { SpikeBanner } from "./components/spike-banner"; |
| Merge main (membership, two-factor, GitHub repo roles) into tokens | 53 | import { PolicyNotice } from "./components/policy-notice"; |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 54 | import { readCookie } from "./lib/mission"; |
| 55 | import { WORKSPACE_COOKIE, workspaceFor } from "./lib/workspace-choice"; | |
| Not found and error pages have one main landmark: their own when signed out, the shell's when signed in | 56 | import { PageMain } from "./components/landmark"; |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 57 | import { NotFound } from "./components/not-found"; |
| 58 | import { usesAppShell } from "./lib/chrome"; | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 59 | import { CommandPalette, type PaletteCommand, PaletteKey, usePaletteShortcut } from "./components/command-palette"; |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 60 | import { billing, chat, inbox, projects, workspaceAgents } from "./lib/services.server"; |
| Chat and workspace agents: channels, DMs and named agents you talk to | 61 | import { unreadTotals } from "./lib/chat"; |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 62 | import { countsFor, readableRepos } from "./lib/access.server"; |
| 63 | import { shortCache } from "./lib/cache.server"; | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 64 | import { getViewer, viewerMiddleware } from "./lib/session.server"; |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 65 | import { shortcutOf, workspaceProjects } from "./lib/workspace-projects.server"; |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 66 | import { registrationMode } from "./lib/registration.server"; |
| Merge branch 'worktree-agent-aaf03bdceac799c89' | 67 | import { addresses } from "./lib/addresses.server"; |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 68 | import { useSignUpCopy } from "./lib/registration"; |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 69 | import { RELOADED_KEY, reloadFixes } from "./lib/stale-build"; |
| Merge g1tusercontent.com: registry answers run nothing in a browser, the site's pages run only their own scripts, repository files and avatars on their own origin, raw files rate limited per address | 70 | import { useNonce } from "./lib/nonce"; |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 71 | import { LiveNotifications } from "./components/notifications/live-notifications"; |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 72 | |
| Initial g1t: services, event bus, intents and attempts | 73 | |
| 74 | export const links: Route.LinksFunction = () => [ | |
| The fleet: g1t's new mark | 75 | { rel: "icon", href: "/favicon.ico", sizes: "32x32" }, |
| Initial g1t: services, event bus, intents and attempts | 76 | { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }, |
| The fleet: g1t's new mark | 77 | { rel: "icon", type: "image/png", sizes: "192x192", href: "/icon-192.png" }, |
| 78 | { rel: "apple-touch-icon", href: "/apple-touch-icon.png" }, | |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 79 | // Installable: name, icons and colours for "Add to Home Screen" (public/manifest.webmanifest). |
| 80 | { rel: "manifest", href: "/manifest.webmanifest" }, | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 81 | // The text and headline faces are wanted on every page, so they start |
| 82 | // loading with the stylesheet; mono waits until something uses it. | |
| 83 | { rel: "preload", href: sansFont, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, | |
| 84 | { rel: "preload", href: displayFont, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, | |
| Initial g1t: services, event bus, intents and attempts | 85 | ]; |
| 86 | ||
| 87 | export const middleware: Route.MiddlewareFunction[] = [viewerMiddleware]; | |
| 88 | ||
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 89 | export async function loader({ context, params, request }: Route.LoaderArgs) { |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 90 | const user = getViewer(context); |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 91 | const chosen = readCookie(request.headers.get("cookie"), WORKSPACE_COOKIE); |
| Sign-up buttons say Sign up everywhere; only the sign-up page says registration takes an invite | 92 | // Whether sign-up takes an invite: only the sign-up page says so. |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 93 | const [shell, mode] = await Promise.all([ |
| Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036) | 94 | // An account still confirming its address sees only the pages that |
| 95 | // allows (lib/confirm-gate.ts), in the visitor's frame. | |
| 96 | user && !awaitsConfirmation(user) | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 97 | ? shellFor(user, params, chosen, context).catch((error: unknown) => { |
| 98 | // A sidebar that could not be read is no reason to lose the page, | |
| 99 | // or to draw it as if they were signed out. | |
| 100 | console.error("root: the sidebar could not be read", error); | |
| 101 | return bareShell(user, params, chosen); | |
| 102 | }) | |
| 103 | : visitorShell(params, context), | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 104 | user ? Promise.resolve(null) : registrationMode(), |
| 105 | ]); | |
| Merge branch 'worktree-agent-aaf03bdceac799c89' | 106 | // Where this g1t lives, for clone lines, agent setup and link previews. |
| 107 | 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 | 108 | } |
| 109 | ||
| 110 | /** | |
| 111 | * The sidebar for someone not signed in: nothing of their own, only the | |
| 112 | * open counts of the project being looked at. One call, and only in a | |
| 113 | * project; it answers the same for a private project as a missing one. | |
| 114 | */ | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 115 | 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 | 116 | 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 | 117 | 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 | 118 | return { |
| 119 | workspace: null, | |
| 120 | repos: [], | |
| 121 | repo: path && counts?.ok ? { ...path, member: false, issues: counts.value.issues, pulls: counts.value.pulls } : null, | |
| 122 | limit: null, | |
| 123 | monthUsageMicros: null, | |
| 124 | }; | |
| Initial g1t: services, event bus, intents and attempts | 125 | } |
| 126 | ||
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 127 | /** The sidebar from what the session already says, with no service asked. */ |
| 128 | function bareShell(user: User, params: { owner?: string; repo?: string }, chosen: string | null): ShellData { | |
| 129 | return { | |
| 130 | workspace: workspaceFor(user.workspaces ?? [], chosen, params), | |
| 131 | repos: [], | |
| 132 | repo: null, | |
| 133 | limit: null, | |
| 134 | monthUsageMicros: null, | |
| 135 | }; | |
| 136 | } | |
| 137 | ||
| Agents as a team: lifecycle, merge queue, billing and a new shell | 138 | /** |
| 139 | * The sidebar only changes with the workspace or repository being looked | |
| 140 | * at, or after something was submitted: not on every page within them. | |
| 141 | */ | |
| 142 | export function shouldRevalidate({ | |
| 143 | currentParams, | |
| 144 | nextParams, | |
| 145 | formMethod, | |
| 146 | defaultShouldRevalidate, | |
| 147 | }: ShouldRevalidateFunctionArgs) { | |
| 148 | if (formMethod && formMethod !== "GET") return defaultShouldRevalidate; | |
| 149 | return currentParams.owner !== nextParams.owner || currentParams.repo !== nextParams.repo; | |
| 150 | } | |
| 151 | ||
| 152 | /** | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 153 | * The sidebar: the workspace whose pages or project these are when it is |
| 154 | * one of yours, else the one you chose (lib/workspace-choice.ts); its | |
| 155 | * projects; and the repository being looked at. | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 156 | */ |
| 157 | async function shellFor( | |
| 158 | user: User, | |
| 159 | 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 | 160 | chosen: string | null, |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 161 | context: Route.LoaderArgs["context"], |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 162 | ): Promise<ShellData> { |
| 163 | const memberships = user.workspaces ?? []; | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 164 | const workspace = workspaceFor(memberships, chosen, params); |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 165 | 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 | 166 | const now = new Date(); |
| 167 | const monthStart = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), 1)).toISOString(); | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 168 | // What the sidebar shows of the workspace changes rarely: kept for a few |
| 169 | // seconds per person and workspace, except just after they changed | |
| 170 | // something (lib/cache.server.ts). | |
| 171 | const kept = <T,>(what: string, load: () => Promise<T>) => | |
| 172 | workspace ? shortCache(`shell:${what}:${user.id}:${workspace.slug}`, SHELL_TTL_MS, load) : Promise.resolve(null); | |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 173 | const [listed, counts, status, usage, limit, entitlements, shared, unread, shortcuts, chatUnread, teamAgents] = await Promise.all([ |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 174 | // Every project, for the palette and the count; the sidebar lists only |
| 175 | // the person's pinned and recent ones (lib/pins.ts). | |
| 176 | workspace ? workspaceProjects(workspace.slug, user) : Promise.resolve(null), | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 177 | 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 | 178 | // Whether billing is on, without reading the account: that asks the |
| 179 | // card processor about the workspace's cards, too slow for every page. | |
| 180 | kept("status", () => billing.status()).catch(() => null), | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 181 | kept(`usage:${monthStart}`, () => billing.usage(workspace!.slug, user, monthStart)).catch(() => null), |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 182 | kept("limit", () => billing.limit(workspace!.slug, user)).catch(() => null), |
| 183 | kept("entitlements", () => billing.entitlements(workspace!.slug)).catch(() => null), | |
| 184 | sharedRepos(user), | |
| Inbox: a bell in the top bar opens it beside the page, and /inbox holds it all | 185 | // The bell's count: one query, never kept, so marking an item shows at once. |
| 186 | inbox.counts(user.username).catch(() => null), | |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 187 | // Never kept: opening a project moves it up Recent. |
| 188 | workspace ? projects.shortcuts(workspace.slug, user).catch(() => null) : Promise.resolve(null), | |
| Chat and workspace agents: channels, DMs and named agents you talk to | 189 | // The rail's Chat badge: never kept, and never waited on for long. |
| 190 | workspace ? chatUnreadFor(workspace.slug, user) : Promise.resolve(null), | |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 191 | // Home's Recent and the Agents sidebar, on every page: never waited on for long. |
| 192 | workspace ? agentsFor(workspace.slug, user) : Promise.resolve(null), | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 193 | ]); |
| 194 | return { | |
| 195 | workspace, | |
| Projects: what a workspace builds and runs, first on every page | 196 | // Projects are what the sidebar lists: what the workspace builds and runs. |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 197 | repos: listed?.ok ? listed.value.map(shortcutOf) : [], |
| 198 | pinned: (shortcuts?.pinned ?? []).map(shortcutOf), | |
| 199 | recent: (shortcuts?.recent ?? []).map(shortcutOf), | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 200 | repo: |
| 201 | path && counts?.ok | |
| 202 | ? { | |
| 203 | ...path, | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 204 | // Until the repository's own page says what their role is. |
| 205 | member: hasAccessIn(user, path.namespace), | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 206 | issues: counts.value.issues, |
| 207 | pulls: counts.value.pulls, | |
| 208 | } | |
| 209 | : null, | |
| Billing accounts, terms and enterprises; g1t is no longer free | 210 | // Where the workspace stands against its usage limit, once billing is on. |
| 211 | limit: | |
| The sidebar asks billing whether it is on, not for the account, so no page waits on the card processor | 212 | status?.enabled && limit?.ok |
| Billing accounts, terms and enterprises; g1t is no longer free | 213 | ? { |
| 214 | exposureMicros: limit.value.exposureMicros, | |
| 215 | ceilingMicros: limit.value.ceilingMicros, | |
| 216 | state: limit.value.state, | |
| 217 | comped: limit.value.trust === "internal", | |
| 218 | } | |
| 219 | : null, | |
| The sidebar asks billing whether it is on, not for the account, so no page waits on the card processor | 220 | free: Boolean(status?.free), |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 221 | // A spend spike or a hold pauses new compute: the shell says so on every page. |
| 222 | compute: | |
| 223 | workspace && entitlements && (entitlements.paused || entitlements.spike?.status === "open") | |
| 224 | ? { paused: entitlements.paused, spike: entitlements.spike ?? null, owner: workspace.role === "owner" } | |
| 225 | : null, | |
| 226 | shared, | |
| Inbox: a bell in the top bar opens it beside the page, and /inbox holds it all | 227 | inbox: unread, |
| Chat and workspace agents: channels, DMs and named agents you talk to | 228 | chat: chatUnread, |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 229 | agents: teamAgents, |
| Usage while free is shown at cost; agents get rustfmt and clippy | 230 | // While g1t is free every charge is zero, so usage is shown at cost. |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 231 | // Usage at price, the one figure every page shows. |
| 232 | monthUsageMicros: usage?.ok ? (usage.value.free ? usage.value.usedMicros : (usage.value.priceMicros ?? usage.value.spentMicros)) : null, | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 233 | }; |
| 234 | } | |
| 235 | ||
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 236 | /** Starred and recent conversations Home's sidebar lists. */ |
| 237 | const SHELL_CONVERSATIONS = 8; | |
| 238 | ||
| 239 | /** | |
| 240 | * What is unread in chat, for the rail, and the starred and latest | |
| 241 | * conversations, for Home's sidebar; null when chat is slow to answer or | |
| 242 | * does not. | |
| 243 | */ | |
| Chat and workspace agents: channels, DMs and named agents you talk to | 244 | async function chatUnreadFor(slug: string, user: User): Promise<ShellData["chat"]> { |
| 245 | const timeout = new Promise<null>((resolve) => setTimeout(() => resolve(null), CHAT_BADGE_WAIT_MS)); | |
| 246 | const read = chat | |
| 247 | .sidebar(slug, user) | |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 248 | .then((result) => { |
| 249 | if (!result.ok) return null; | |
| 250 | const entries = result.value.entries; | |
| 251 | const latest = [...entries].sort((a, b) => (b.channel.last_message_at ?? "").localeCompare(a.channel.last_message_at ?? "")); | |
| 252 | return { | |
| 253 | ...unreadTotals(entries), | |
| 254 | starred: entries.filter((e) => e.starred).slice(0, SHELL_CONVERSATIONS), | |
| 255 | recent: latest.slice(0, SHELL_CONVERSATIONS), | |
| 256 | }; | |
| 257 | }) | |
| 258 | .catch(() => null); | |
| 259 | return Promise.race([read, timeout]); | |
| 260 | } | |
| 261 | ||
| 262 | /** The workspace's agents, as the shell lists them; null when the agents service is slow or down. */ | |
| 263 | async function agentsFor(slug: string, user: User): Promise<ShellData["agents"]> { | |
| 264 | const timeout = new Promise<null>((resolve) => setTimeout(() => resolve(null), CHAT_BADGE_WAIT_MS)); | |
| 265 | const read = workspaceAgents | |
| 266 | .list(slug, user) | |
| 267 | .then((result) => | |
| 268 | result.ok | |
| 269 | ? result.value | |
| 270 | .filter((agent) => !agent.archived_at) | |
| 271 | .map((agent) => ({ | |
| 272 | id: agent.id, | |
| 273 | handle: agent.handle, | |
| 274 | display_name: agent.display_name, | |
| 275 | avatar: agent.avatar, | |
| 276 | avatar_seed: agent.avatar_seed, | |
| 277 | role: agent.role, | |
| 278 | title: agent.title, | |
| 279 | team: agent.team, | |
| 280 | department: agent.department, | |
| 281 | status: agent.status, | |
| 282 | builtin: agent.builtin === true, | |
| 283 | })) | |
| 284 | : null, | |
| 285 | ) | |
| Chat and workspace agents: channels, DMs and named agents you talk to | 286 | .catch(() => null); |
| 287 | return Promise.race([read, timeout]); | |
| 288 | } | |
| 289 | ||
| 290 | /** The longest the rail's Chat badge holds up a page. */ | |
| 291 | const CHAT_BADGE_WAIT_MS = 300; | |
| 292 | ||
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 293 | /** |
| 294 | * How long the sidebar's workspace answers are kept: as long as someone's | |
| 295 | * own changes read fresh anyway (lib/perf.ts `PRIMARY_WINDOW_SECONDS`). | |
| 296 | */ | |
| 297 | const SHELL_TTL_MS = 30_000; | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 298 | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 299 | /** Most repositories listed under Shared with you. */ |
| 300 | const MAX_SHARED = 20; | |
| 301 | ||
| 302 | /** | |
| 303 | * Repositories shared with the user in workspaces they do not belong to, | |
| 304 | * by their grants: only those, never the workspace's other repositories. | |
| 305 | */ | |
| 306 | async function sharedRepos(user: User): Promise<ShellData["shared"]> { | |
| 307 | const outside = new Set(sharedWorkspaces(user)); | |
| 308 | if (outside.size === 0) return []; | |
| 309 | 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 | 310 | const found = await readableRepos(ids, user); |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 311 | return found |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 312 | .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 | 313 | .sort((a, b) => `${a.namespace}/${a.name}`.localeCompare(`${b.namespace}/${b.name}`)); |
| 314 | } | |
| 315 | ||
| API and MCP server, Rust identity service, registration, site redesign | 316 | function HeaderLink({ to, children }: { to: string; children: React.ReactNode }) { |
| 317 | return ( | |
| 318 | <NavLink | |
| 319 | to={to} | |
| 320 | className={({ isActive }) => | |
| 321 | `rounded-md px-2.5 py-1.5 text-sm transition-colors hover:bg-raised hover:text-fg ${ | |
| 322 | isActive ? "text-fg" : "text-muted" | |
| 323 | }` | |
| 324 | } | |
| 325 | > | |
| 326 | {children} | |
| 327 | </NavLink> | |
| 328 | ); | |
| 329 | } | |
| 330 | ||
| Search across all of g1t, Explore, and a command palette | 331 | /** What the palette offers someone without the app's sidebar. */ |
| 332 | const PUBLIC_COMMANDS: PaletteCommand[] = [ | |
| 333 | { label: "Explore", hint: "Public projects", to: "/explore", icon: <Compass size={15} /> }, | |
| 334 | { label: "Search g1t", hint: "Repositories, code, issues, people", to: "/search", icon: <Search size={15} /> }, | |
| 335 | { label: "Pricing", to: "/pricing", icon: <CreditCard size={15} /> }, | |
| 336 | { label: "Documentation", to: "https://docs.g1t.sh/", icon: <BookOpen size={15} /> }, | |
| 337 | { label: "Sign in", to: "/login", icon: <LogIn size={15} /> }, | |
| 338 | { label: "Sign up", to: "/register", icon: <Plus size={15} /> }, | |
| 339 | ]; | |
| 340 | ||
| Sign-up buttons say Sign up everywhere; only the sign-up page says registration takes an invite | 341 | /** Sign up: the sign-up page says whether it takes an invite. */ |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 342 | function SignUpButton() { |
| 343 | const copy = useSignUpCopy(); | |
| 344 | return <ButtonLink to="/register">{copy.primary}</ButtonLink>; | |
| 345 | } | |
| 346 | ||
| Email verification, password reset, and Git for AI scale positioning | 347 | function Header({ user }: { user: User | null | undefined }) { |
| Acceptance checks in sandboxes, line comments and review verdicts | 348 | const submit = useSubmit(); |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 349 | const signUp = useSignUpCopy(); |
| Search across all of g1t, Explore, and a command palette | 350 | const [palette, setPalette] = useState(false); |
| 351 | usePaletteShortcut(() => setPalette((open) => !open)); | |
| 352 | const params = useParams(); | |
| 353 | const repo = params.owner && params.repo ? `${params.owner}/${params.repo}` : null; | |
| API and MCP server, Rust identity service, registration, site redesign | 354 | return ( |
| 355 | <header className="sticky top-0 z-40 border-b border-line bg-surface/85 backdrop-blur"> | |
| 356 | <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 | 357 | <Link to="/" aria-label="g1t home" className="mr-2 flex"> |
| API and MCP server, Rust identity service, registration, site redesign | 358 | <Logo /> |
| 359 | </Link> | |
| 360 | <Form action="/search" role="search" className="relative hidden grow sm:block sm:max-w-xs"> | |
| 361 | <Search | |
| 362 | size={14} | |
| 363 | className="pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-faint" | |
| 364 | /> | |
| 365 | <input | |
| 366 | name="q" | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 367 | {...notACredential()} |
| Search across all of g1t, Explore, and a command palette | 368 | placeholder="Search g1t" |
| 369 | aria-label="Search g1t" | |
| 370 | 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 | 371 | /> |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 372 | <PaletteKey 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" /> |
| API and MCP server, Rust identity service, registration, site redesign | 373 | </Form> |
| Search across all of g1t, Explore, and a command palette | 374 | <button |
| 375 | type="button" | |
| 376 | aria-label="Search g1t" | |
| 377 | onClick={() => setPalette(true)} | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 378 | 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 | 379 | > |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 380 | <Search size={18} /> |
| Search across all of g1t, Explore, and a command palette | 381 | </button> |
| 382 | <CommandPalette | |
| 383 | open={palette} | |
| 384 | onOpenChange={setPalette} | |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 385 | commands={user ? [{ label: "Home", 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 | 386 | repo={repo} |
| 387 | /> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 388 | <nav aria-label="Main" className="hidden items-center gap-0.5 sm:flex"> |
| API and MCP server, Rust identity service, registration, site redesign | 389 | <HeaderLink to="/explore">Explore</HeaderLink> |
| Prices keep themselves current with what g1t pays | 390 | <HeaderLink to="/pricing">Pricing</HeaderLink> |
| Docs as their own app; shared theme package | 391 | <HeaderLink to="https://docs.g1t.sh/">Docs</HeaderLink> |
| API and MCP server, Rust identity service, registration, site redesign | 392 | </nav> |
| 393 | <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 | 394 | {/* On a phone the links fold into one menu, so the bar fits. */} |
| 395 | <DropdownMenu> | |
| 396 | <DropdownMenuTrigger | |
| 397 | aria-label="Menu" | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 398 | className="flex size-10 items-center justify-center rounded-md text-muted outline-none transition-colors hover:bg-raised hover:text-fg focus-visible:ring-2 focus-visible:ring-accent data-[state=open]:bg-raised data-[state=open]:text-fg sm:hidden" |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 399 | > |
| 400 | <Menu size={18} /> | |
| 401 | </DropdownMenuTrigger> | |
| 402 | <DropdownMenuContent align="end" className="w-52"> | |
| 403 | <DropdownMenuItem asChild className="min-h-11"> | |
| 404 | <Link to="/explore"> | |
| 405 | <Compass /> | |
| 406 | Explore | |
| 407 | </Link> | |
| 408 | </DropdownMenuItem> | |
| 409 | <DropdownMenuItem asChild className="min-h-11"> | |
| 410 | <Link to="/pricing"> | |
| 411 | <CreditCard /> | |
| 412 | Pricing | |
| 413 | </Link> | |
| 414 | </DropdownMenuItem> | |
| 415 | <DropdownMenuItem asChild className="min-h-11"> | |
| 416 | <Link to="https://docs.g1t.sh/"> | |
| 417 | <BookOpen /> | |
| 418 | Docs | |
| 419 | </Link> | |
| 420 | </DropdownMenuItem> | |
| 421 | {!user && ( | |
| 422 | <> | |
| 423 | <DropdownMenuSeparator /> | |
| 424 | <DropdownMenuItem asChild className="min-h-11"> | |
| 425 | <Link to="/login"> | |
| 426 | <LogIn /> | |
| 427 | Sign in | |
| 428 | </Link> | |
| 429 | </DropdownMenuItem> | |
| 430 | </> | |
| 431 | )} | |
| 432 | </DropdownMenuContent> | |
| 433 | </DropdownMenu> | |
| API and MCP server, Rust identity service, registration, site redesign | 434 | {user ? ( |
| 435 | <> | |
| 436 | <Link | |
| 437 | to="/new" | |
| Projects live: fixes from walking them end to end | 438 | aria-label="New project" |
| API and MCP server, Rust identity service, registration, site redesign | 439 | className="rounded-md border border-line p-1.5 text-muted transition-colors hover:border-line-strong hover:text-fg" |
| 440 | > | |
| 441 | <Plus size={16} /> | |
| 442 | </Link> | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 443 | <DropdownMenu> |
| 444 | <DropdownMenuTrigger | |
| 445 | aria-label="Account menu" | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 446 | className="flex items-center gap-1.5 rounded-md p-1 outline-none transition-colors hover:bg-raised focus-visible:ring-2 focus-visible:ring-accent data-[state=open]:bg-raised" |
| API and MCP server, Rust identity service, registration, site redesign | 447 | > |
| Workspace names and icons, and a component kit for every control | 448 | <Avatar name={user.username} image={user.avatar} size={24} /> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 449 | <ChevronDown size={14} className="text-faint" /> |
| 450 | </DropdownMenuTrigger> | |
| 451 | <DropdownMenuContent align="end" className="w-56"> | |
| 452 | <DropdownMenuLabel> | |
| 453 | Signed in as{" "} | |
| 454 | <span className="font-mono font-medium text-fg"> | |
| 455 | {user.username} | |
| 456 | </span> | |
| 457 | </DropdownMenuLabel> | |
| 458 | <DropdownMenuSeparator /> | |
| Workspaces own repositories | 459 | {(user.workspaces ?? []).map((membership) => ( |
| 460 | <DropdownMenuItem asChild key={membership.slug}> | |
| 461 | <Link to={`/${membership.slug}`}> | |
| Workspace names and icons, and a component kit for every control | 462 | <Avatar name={membership.slug} image={membership.avatar} size={16} square /> |
| 463 | <span className="min-w-0 truncate">{membership.name || membership.slug}</span> | |
| Workspaces own repositories | 464 | </Link> |
| 465 | </DropdownMenuItem> | |
| 466 | ))} | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 467 | <DropdownMenuItem asChild> |
| Workspaces own repositories | 468 | <Link to="/workspaces/new"> |
| 469 | <Plus /> | |
| 470 | New workspace | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 471 | </Link> |
| 472 | </DropdownMenuItem> | |
| Workspaces own repositories | 473 | <DropdownMenuSeparator /> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 474 | <DropdownMenuItem asChild> |
| 475 | <Link to="/"> | |
| 476 | <LayoutDashboard /> | |
| 477 | Mission control | |
| 478 | </Link> | |
| 479 | </DropdownMenuItem> | |
| 480 | <DropdownMenuItem asChild> | |
| 481 | <Link to="/new"> | |
| 482 | <Plus /> | |
| Projects live: fixes from walking them end to end | 483 | New project |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 484 | </Link> |
| 485 | </DropdownMenuItem> | |
| 486 | <DropdownMenuSeparator /> | |
| 487 | <DropdownMenuItem asChild> | |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 488 | <Link to="/settings/profile"> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 489 | <Settings /> |
| 490 | Settings | |
| 491 | </Link> | |
| 492 | </DropdownMenuItem> | |
| 493 | <DropdownMenuItem asChild> | |
| Docs as their own app; shared theme package | 494 | <Link to="https://docs.g1t.sh/quickstart/"> |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 495 | <BookOpen /> |
| 496 | Documentation | |
| 497 | </Link> | |
| 498 | </DropdownMenuItem> | |
| 499 | <DropdownMenuSeparator /> | |
| Acceptance checks in sandboxes, line comments and review verdicts | 500 | {/* Submitted from here: the menu closes on select, and a button |
| 501 | that has left the page cannot submit a form. */} | |
| 502 | <DropdownMenuItem | |
| 503 | onSelect={() => submit(null, { method: "post", action: "/logout" })} | |
| 504 | > | |
| 505 | <LogOut /> | |
| 506 | Sign out | |
| Account dropdown, llms.txt onboarding, hosted agent runner (not yet deployed) | 507 | </DropdownMenuItem> |
| 508 | </DropdownMenuContent> | |
| 509 | </DropdownMenu> | |
| API and MCP server, Rust identity service, registration, site redesign | 510 | </> |
| 511 | ) : ( | |
| 512 | <> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 513 | <span className="hidden sm:contents"> |
| 514 | <HeaderLink to="/login">Sign in</HeaderLink> | |
| 515 | </span> | |
| 516 | <SignUpButton /> | |
| API and MCP server, Rust identity service, registration, site redesign | 517 | </> |
| 518 | )} | |
| 519 | </div> | |
| 520 | </div> | |
| 521 | </header> | |
| 522 | ); | |
| 523 | } | |
| 524 | ||
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 525 | /** |
| 526 | * The root's data as the browser last had it. When a navigation fails in a | |
| 527 | * way that takes the root's data with it, the error is still drawn in the | |
| 528 | * person's own frame, signed in, not the visitor's. Never kept on the | |
| 529 | * server, where one module serves everyone. | |
| 530 | */ | |
| 531 | let lastRoot: Awaited<ReturnType<typeof loader>> | undefined; | |
| 532 | ||
| Initial g1t: services, event bus, intents and attempts | 533 | export function Layout({ children }: { children: React.ReactNode }) { |
| Merge g1tusercontent.com: registry answers run nothing in a browser, the site's pages run only their own scripts, repository files and avatars on their own origin, raw files rate limited per address | 534 | const nonce = useNonce(); |
| Initial g1t: services, event bus, intents and attempts | 535 | // Undefined when the root loader itself failed. |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 536 | const loaded = useRouteLoaderData<typeof loader>("root"); |
| 537 | const inBrowser = typeof document !== "undefined"; | |
| 538 | if (loaded && inBrowser) lastRoot = loaded; | |
| 539 | const root = loaded ?? (inBrowser ? lastRoot : undefined); | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 540 | const user = root?.user; |
| Merge branch 'worktree-agent-a985c01f43538af01' | 541 | const { pathname, search } = useLocation(); |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 542 | // Drawn around the error page too: a 404 keeps the sidebar out of a |
| 543 | // project or workspace the viewer cannot see. | |
| 544 | const error = useRouteError(); | |
| 545 | const missing = isRouteErrorResponse(error) && error.status === 404; | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 546 | // The billing page shows the full banner itself. |
| 547 | const paused = root?.shell?.compute && root.shell.workspace && !pathname.endsWith("/-/billing") && ( | |
| Fast pages, required checks on the branch, self-hosted runners, honest incidents | 548 | <SpikeBanner |
| 549 | compact | |
| 550 | slug={root.shell.workspace.slug} | |
| 551 | entitlements={{ paused: root.shell.compute.paused, spike: root.shell.compute.spike }} | |
| 552 | owner={root.shell.compute.owner} | |
| 553 | /> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 554 | ); |
| Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036) | 555 | // On the few pages an account still confirming its address can open |
| 556 | // besides /confirm-email (policies, support, signing in): the way back. | |
| 557 | const verify = user && awaitsConfirmation(user) && pathname !== "/confirm-email" && ( | |
| 558 | <p | |
| 559 | role="status" | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 560 | 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" |
| 561 | > | |
| Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036) | 562 | <span>Confirm your email address to start using g1t.</span> |
| 563 | <Link to="/confirm-email" className="font-medium underline underline-offset-4"> | |
| 564 | Enter your code | |
| 565 | </Link> | |
| 566 | </p> | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 567 | ); |
| Merge main (membership, two-factor, GitHub repo roles) into tokens | 568 | // A workspace that requires two-factor authentication of someone who |
| 569 | // has not turned it on: they keep their place, and cannot use it yet. | |
| 570 | const held = user?.held && user.held.length > 0 && pathname !== "/settings/two-factor" && <PolicyNotice held={user.held} />; | |
| Merge branch 'worktree-agent-aca4790ea223aa235' | 571 | const leaving = useLeaving(); |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 572 | const banner = |
| Merge main (membership, two-factor, GitHub repo roles) into tokens | 573 | paused || verify || held ? ( |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 574 | <> |
| 575 | {paused} | |
| 576 | {verify} | |
| Merge main (membership, two-factor, GitHub repo roles) into tokens | 577 | {held} |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 578 | </> |
| 579 | ) : null; | |
| Initial g1t: services, event bus, intents and attempts | 580 | return ( |
| 581 | <html lang="en"> | |
| 582 | <head> | |
| 583 | <meta charSet="utf-8" /> | |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 584 | <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> |
| Dark gray base with lavender as an accent, and a live outcome view for plans | 585 | <meta name="theme-color" content="#0f0f11" /> |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 586 | <meta name="apple-mobile-web-app-capable" content="yes" /> |
| 587 | <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | |
| Put the stylesheet at the top of the head, before React Router's preloads | 588 | {/* The stylesheet before everything React Router preloads, so a slow |
| 589 | connection paints sooner (docs/research/css-shipping.md). */} | |
| Give the stylesheet a precedence so React places it before preloads | 590 | <link rel="stylesheet" href={appCss} precedence="default" /> |
| Initial g1t: services, event bus, intents and attempts | 591 | <Meta /> |
| Merge g1tusercontent.com: registry answers run nothing in a browser, the site's pages run only their own scripts, repository files and avatars on their own origin, raw files rate limited per address | 592 | <Links nonce={nonce} /> |
| Initial g1t: services, event bus, intents and attempts | 593 | </head> |
| API and MCP server, Rust identity service, registration, site redesign | 594 | <body className="flex min-h-screen flex-col"> |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 595 | {/* The first stop for the keyboard: past the menus, to the page. */} |
| 596 | <a | |
| 597 | href="#content" | |
| 598 | className="sr-only rounded-md bg-fg px-3 py-2 text-sm font-medium text-bg focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70]" | |
| 599 | > | |
| 600 | Skip to content | |
| 601 | </a> | |
| Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036) | 602 | {root?.shell && usesAppShell(pathname, user != null && !awaitsConfirmation(user)) ? ( |
| status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas | 603 | <AppShell user={user ?? null} shell={root.shell} missing={missing} banner={banner}> |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 604 | {children} |
| 605 | </AppShell> | |
| 606 | ) : ( | |
| 607 | <> | |
| 608 | <Progress /> | |
| 609 | <Header user={user} /> | |
| 610 | {banner} | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 611 | <div id="content" tabIndex={-1} {...leaving} className={`grow outline-none ${leaving.className}`}> |
| Merge branch 'worktree-agent-aca4790ea223aa235' | 612 | {children} |
| 613 | </div> | |
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 614 | <SiteFooter user={user} /> |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 615 | </> |
| Email verification, password reset, and Git for AI scale positioning | 616 | )} |
| Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002) | 617 | {/* Live notifications for the signed-in: the feed socket, toasts, the tab's count (components/notifications). */} |
| 618 | {user && !awaitsConfirmation(user) && ( | |
| 619 | <LiveNotifications workspace={root?.shell?.workspace?.slug ?? null} inbox={root?.shell?.inbox?.unread ?? null} /> | |
| 620 | )} | |
| Merge g1tusercontent.com: registry answers run nothing in a browser, the site's pages run only their own scripts, repository files and avatars on their own origin, raw files rate limited per address | 621 | <ScrollRestoration nonce={nonce} /> |
| 622 | <Scripts nonce={nonce} /> | |
| Initial g1t: services, event bus, intents and attempts | 623 | </body> |
| 624 | </html> | |
| 625 | ); | |
| 626 | } | |
| 627 | ||
| 628 | export default function App() { | |
| 629 | return <Outlet />; | |
| 630 | } | |
| 631 | ||
| 632 | export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) { | |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 633 | const location = useLocation(); |
| 634 | const matches = useMatches(); | |
| 635 | // A tab left open across a deploy: load the address again as a whole | |
| 636 | // page, once, rather than show an error the reload fixes. | |
| 637 | const reload = reloadFixes({ | |
| 638 | error, | |
| 639 | status: isRouteErrorResponse(error) ? error.status : undefined, | |
| 640 | // The first page a tab loads has the key "default"; a client navigation's is its own. | |
| 641 | clientNavigation: location.key !== "default", | |
| 642 | caughtByCatchAll: matches.at(-1)?.id === "routes/not-found", | |
| 643 | }); | |
| 644 | const href = location.pathname + location.search + location.hash; | |
| 645 | useEffect(() => { | |
| 646 | if (!reload) return; | |
| 647 | try { | |
| 648 | if (sessionStorage.getItem(RELOADED_KEY) === href) return; | |
| 649 | sessionStorage.setItem(RELOADED_KEY, href); | |
| 650 | } catch { | |
| 651 | // No session storage: reload anyway; a document load never asks again. | |
| 652 | } | |
| 653 | window.location.assign(href); | |
| 654 | }, [reload, href]); | |
| 655 | if (reload) { | |
| 656 | return ( | |
| Not found and error pages have one main landmark: their own when signed out, the shell's when signed in | 657 | <PageMain className="mx-auto max-w-xl px-4 py-32 text-center text-sm text-muted" aria-busy="true"> |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 658 | <title>Loading · g1t</title> |
| 659 | Loading the latest version of g1t… | |
| Not found and error pages have one main landmark: their own when signed out, the shell's when signed in | 660 | </PageMain> |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 661 | ); |
| 662 | } | |
| 663 | ||
| API and MCP server, Rust identity service, registration, site redesign | 664 | let title = "Something went wrong"; |
| 665 | let details = "An unexpected error occurred. Try again in a moment."; | |
| Initial g1t: services, event bus, intents and attempts | 666 | let stack: string | undefined; |
| 667 | ||
| 668 | if (isRouteErrorResponse(error)) { | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 669 | // The same page for something private and something missing. |
| Usage, Billing settings and prepaid AI credit; fixes from the UX audit | 670 | if (error.status === 404) { |
| 671 | return ( | |
| 672 | <> | |
| 673 | <title>Not found · g1t</title> | |
| 674 | <NotFound data={error.data} /> | |
| 675 | </> | |
| 676 | ); | |
| 677 | } | |
| Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put | 678 | if (typeof error.data === "string" && error.data) { |
| API and MCP server, Rust identity service, registration, site redesign | 679 | details = error.data; |
| 680 | } | |
| 681 | } else if (import.meta.env.DEV && error instanceof Error) { | |
| Initial g1t: services, event bus, intents and attempts | 682 | details = error.message; |
| 683 | stack = error.stack; | |
| 684 | } | |
| 685 | ||
| 686 | return ( | |
| Not found and error pages have one main landmark: their own when signed out, the shell's when signed in | 687 | <PageMain className="mx-auto max-w-xl px-4 py-32 text-center"> |
| API and MCP server, Rust identity service, registration, site redesign | 688 | <h1 className="text-2xl font-semibold tracking-tight">{title}</h1> |
| 689 | <p className="mt-3 text-muted">{details}</p> | |
| 690 | <div className="mt-8"> | |
| 691 | <ButtonLink to="/" variant="quiet"> | |
| 692 | Back to home | |
| 693 | </ButtonLink> | |
| 694 | </div> | |
| Initial g1t: services, event bus, intents and attempts | 695 | {stack && ( |
| API and MCP server, Rust identity service, registration, site redesign | 696 | <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 | 697 | <code>{stack}</code> |
| 698 | </pre> | |
| 699 | )} | |
| Not found and error pages have one main landmark: their own when signed out, the shell's when signed in | 700 | </PageMain> |
| Initial g1t: services, event bus, intents and attempts | 701 | ); |
| 702 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.