g1t/apps/web/app/routes/home.tsx
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.
| Workspace things at the bottom of the sidebar, and on mission control | 1 | import { ArrowRight, Hand, Plus, Settings, Users } from "lucide-react"; |
| New workspaces are told to connect a model, before anything fails | 2 | import { env } from "cloudflare:workers"; |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 3 | import { type ReactNode, useEffect } from "react"; |
| Get started on mission control | 4 | import { Link, data, useRevalidator, useRouteLoaderData } from "react-router"; |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 5 | |
| 6 | import type { Lifecycle, Pull, Repo } from "@g1t/contracts"; | |
| Initial g1t: services, event bus, intents and attempts | 7 | |
| 8 | import type { Route } from "./+types/home"; | |
| Social cards for every page: og.g1t.sh | 9 | import { page } from "../lib/meta"; |
| API and MCP server, Rust identity service, registration, site redesign | 10 | import { Landing } from "../components/landing"; |
| Get started on mission control | 11 | import type { ShellData } from "../components/shell"; |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 12 | import { STAGE_LABEL, StageDots } from "../components/lifecycle"; |
| API and MCP server, Rust identity service, registration, site redesign | 13 | import { RepoList } from "../components/repo-list"; |
| 14 | import { | |
| 15 | Avatar, | |
| 16 | ButtonLink, | |
| 17 | CopyLine, | |
| 18 | EmptyState, | |
| 19 | TimeAgo, | |
| 20 | } from "../components/ui"; | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 21 | import { Assignee, IssueIcon, PullIcon } from "../components/work"; |
| Work service in Rust, with RFC 3339 timestamps | 22 | import { repos as reposApi, work } from "../lib/services.server"; |
| Initial g1t: services, event bus, intents and attempts | 23 | import { getViewer } from "../lib/session.server"; |
| 24 | ||
| Agents as a team: lifecycle, merge queue, billing and a new shell | 25 | const REFRESH_MS = 5000; |
| 26 | ||
| A free allowance on g1t's models, so anyone can try its agents | 27 | const dollars = (micros: number) => `$${(Math.max(0, micros) / 1_000_000).toFixed(2)}`; |
| 28 | ||
| Social cards for every page: og.g1t.sh | 29 | export function meta(args: Route.MetaArgs) { |
| 30 | return page(args, { | |
| 31 | title: "g1t — Git for AI scale", | |
| 32 | description: | |
| 33 | "A git forge for thousands of agents working on the same code at once: every change isolated, every decision recorded, every change landed in order. Open source, built on Cloudflare.", | |
| 34 | }); | |
| Initial g1t: services, event bus, intents and attempts | 35 | } |
| 36 | ||
| Agents as a team: lifecycle, merge queue, billing and a new shell | 37 | export function headers({ loaderHeaders }: Route.HeadersArgs) { |
| 38 | return { "Server-Timing": loaderHeaders.get("Server-Timing") ?? "" }; | |
| 39 | } | |
| 40 | ||
| Initial g1t: services, event bus, intents and attempts | 41 | export async function loader({ context }: Route.LoaderArgs) { |
| 42 | const viewer = getViewer(context); | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 43 | const started = Date.now(); |
| 44 | const times: Record<string, number> = {}; | |
| 45 | const timed = <T,>(name: string, promise: Promise<T>) => | |
| 46 | promise.then((value) => ((times[name] = Date.now() - started), value)); | |
| New workspaces are told to connect a model, before anything fails | 47 | // The workspace the sidebar shows, as the shell picks it. |
| 48 | const workspace = viewer?.workspaces?.[0]?.slug ?? null; | |
| 49 | const [repos, pulls, assigned, models] = await Promise.all([ | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 50 | timed("repos", reposApi.list(viewer, { memberOnly: Boolean(viewer) })), |
| 51 | timed("pulls", work.listActivePulls(viewer)), | |
| 52 | timed("assigned", work.listAssignedIssues(viewer)), | |
| New workspaces are told to connect a model, before anything fails | 53 | // Whether its agents can reach a model: g1t's, or one it connected. |
| 54 | workspace ? timed("models", env.RUNNER.modelAccess(workspace).catch(() => null)) : Promise.resolve(null), | |
| Initial g1t: services, event bus, intents and attempts | 55 | ]); |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 56 | // Each issue and pull request is shown under its repository. Most are in |
| 57 | // the viewer's own, already listed; the rest are looked up once each, all | |
| 58 | // at once. One the viewer can no longer see drops out. | |
| 59 | const known = new Map<string, Repo>(repos.map((repo) => [repo.id, repo])); | |
| 60 | const missing = [ | |
| 61 | ...new Set([...assigned.map((issue) => issue.repoId), ...pulls.map(({ pull }) => pull.repoId)]), | |
| 62 | ].filter((id) => !known.has(id)); | |
| 63 | const looked = await Promise.all(missing.map((id) => reposApi.getById(id, viewer))); | |
| 64 | for (const found of looked) if (found.ok) known.set(found.value.id, found.value); | |
| 65 | times.lookups = Date.now() - started; | |
| 66 | const serverTiming = Object.entries(times) | |
| 67 | .map(([name, ms]) => `${name};dur=${ms}`) | |
| 68 | .join(", "); | |
| 69 | return data({ | |
| Initial g1t: services, event bus, intents and attempts | 70 | viewer, |
| 71 | repos, | |
| New workspaces are told to connect a model, before anything fails | 72 | canRunAgents: models == null || models.hosted || models.own != null, |
| A free allowance on g1t's models, so anyone can try its agents | 73 | // Its free allowance on g1t's models, when that is what it runs on. |
| 74 | trial: models?.own == null ? (models?.trial ?? null) : null, | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 75 | assigned: assigned.flatMap((issue) => { |
| 76 | const repo = known.get(issue.repoId); | |
| 77 | return repo ? [{ issue, repo }] : []; | |
| Initial g1t: services, event bus, intents and attempts | 78 | }), |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 79 | active: pulls.flatMap((item) => { |
| 80 | const repo = known.get(item.pull.repoId); | |
| 81 | return repo ? [{ ...item, repo }] : []; | |
| 82 | }), | |
| 83 | }, { headers: { "Server-Timing": serverTiming } }); | |
| 84 | } | |
| 85 | ||
| 86 | type Active = { pull: Pull; lifecycle: Lifecycle | null; repo: Repo }; | |
| 87 | ||
| 88 | /** What a pull request is waiting on, in a word or two. */ | |
| 89 | function standing({ pull, lifecycle }: Active): string { | |
| 90 | if (lifecycle) return STAGE_LABEL[lifecycle.stage]; | |
| 91 | return pull.status === "draft" ? "In progress" : "Ready for review"; | |
| 92 | } | |
| 93 | ||
| 94 | function PullRows({ items, detail }: { items: Active[]; detail?: boolean }) { | |
| 95 | return ( | |
| 96 | <ul className="divide-y divide-line overflow-hidden rounded-xl border border-line bg-surface"> | |
| 97 | {items.map((item) => { | |
| 98 | const { pull, lifecycle, repo } = item; | |
| 99 | return ( | |
| 100 | <li key={pull.id}> | |
| 101 | <Link | |
| 102 | prefetch="intent" | |
| 103 | to={`/${repo.namespace}/${repo.name}/pull/${pull.number}`} | |
| 104 | className="flex items-center gap-3 px-4 py-3 transition-colors hover:bg-raised" | |
| 105 | > | |
| 106 | <PullIcon status={pull.status} /> | |
| 107 | <span className="min-w-0 grow"> | |
| 108 | <span className="block truncate font-medium">{pull.title}</span> | |
| 109 | <span className="block truncate font-mono text-xs text-muted"> | |
| 110 | {repo.namespace}/{repo.name}#{pull.number} | |
| 111 | {pull.issue != null && ` · for #${pull.issue}`} · {pull.agent} | |
| 112 | </span> | |
| 113 | {detail && lifecycle && ( | |
| 114 | <span className="mt-1 block text-xs text-muted">{lifecycle.detail}</span> | |
| 115 | )} | |
| 116 | </span> | |
| 117 | {lifecycle && ( | |
| 118 | <span className="hidden shrink-0 sm:block"> | |
| 119 | <StageDots stage={lifecycle.stage} /> | |
| 120 | </span> | |
| 121 | )} | |
| 122 | <span className="w-28 shrink-0 text-right text-xs text-muted"> | |
| 123 | {standing(item)} | |
| 124 | </span> | |
| 125 | <span className="hidden w-14 shrink-0 text-right text-xs text-faint sm:block"> | |
| 126 | <TimeAgo at={pull.updatedAt} /> | |
| 127 | </span> | |
| 128 | </Link> | |
| 129 | </li> | |
| 130 | ); | |
| 131 | })} | |
| 132 | </ul> | |
| 133 | ); | |
| Initial g1t: services, event bus, intents and attempts | 134 | } |
| 135 | ||
| Agents as a team: lifecycle, merge queue, billing and a new shell | 136 | function Section({ title, children }: { title: ReactNode; children: ReactNode }) { |
| 137 | return ( | |
| 138 | <section> | |
| 139 | <h2 className="flex items-center gap-2 text-sm font-medium text-muted">{title}</h2> | |
| 140 | <div className="mt-3">{children}</div> | |
| 141 | </section> | |
| 142 | ); | |
| 143 | } | |
| 144 | ||
| 145 | function plural(count: number, one: string, many: string): string { | |
| 146 | return `${count} ${count === 1 ? one : many}`; | |
| 147 | } | |
| 148 | ||
| Get started on mission control | 149 | type Step = { done: boolean; title: string; about: string; to: string | null; action: string }; |
| 150 | ||
| 151 | /** | |
| Workspace things at the bottom of the sidebar, and on mission control | 152 | * The workspace being looked at, from mission control: what it holds and |
| 153 | * what is moving in it, and the way to its people and settings. The rest of | |
| 154 | * the page stays the viewer's own, across every workspace. | |
| 155 | */ | |
| Workspace names and icons, and a component kit for every control | 156 | function WorkspaceCard({ |
| 157 | slug, | |
| 158 | name, | |
| 159 | avatar, | |
| 160 | role, | |
| 161 | repos, | |
| 162 | active, | |
| 163 | }: { | |
| 164 | slug: string; | |
| 165 | name: string; | |
| 166 | avatar?: string | null; | |
| 167 | role: string; | |
| 168 | repos: Repo[]; | |
| 169 | active: Active[]; | |
| 170 | }) { | |
| Workspace things at the bottom of the sidebar, and on mission control | 171 | const mine = active.filter((item) => item.repo.namespace.toLowerCase() === slug); |
| 172 | const stats = [ | |
| 173 | { value: repos.filter((repo) => repo.namespace.toLowerCase() === slug).length, label: "repositories" }, | |
| 174 | { value: mine.length, label: "pull requests open" }, | |
| 175 | { value: mine.filter((item) => item.lifecycle?.stage === "needs_you").length, label: "need you" }, | |
| 176 | ]; | |
| 177 | return ( | |
| 178 | <div className="rounded-xl border border-line bg-surface p-5"> | |
| 179 | <div className="flex items-center gap-3"> | |
| Workspace names and icons, and a component kit for every control | 180 | <Avatar name={slug} image={avatar} size={32} square /> |
| Workspace things at the bottom of the sidebar, and on mission control | 181 | <div className="min-w-0"> |
| Workspace names and icons, and a component kit for every control | 182 | <Link to={`/${slug}`} title={name} className="block truncate font-medium hover:underline"> |
| 183 | {name} | |
| Workspace things at the bottom of the sidebar, and on mission control | 184 | </Link> |
| Workspace names and icons, and a component kit for every control | 185 | <p className="truncate text-xs text-muted"> |
| 186 | <span className="font-mono">g1t.sh/{slug}</span> · <span className="capitalize">{role}</span> | |
| 187 | </p> | |
| Workspace things at the bottom of the sidebar, and on mission control | 188 | </div> |
| 189 | </div> | |
| 190 | <dl className="mt-4 grid grid-cols-3 gap-2"> | |
| 191 | {stats.map((stat) => ( | |
| 192 | <div key={stat.label} className="rounded-lg bg-bg/60 px-2.5 py-2 ring-1 ring-line"> | |
| 193 | <dt className="sr-only">{stat.label}</dt> | |
| 194 | <dd className="text-lg font-semibold tabular-nums tracking-tight">{stat.value}</dd> | |
| 195 | <dd className="text-[0.6875rem] leading-tight text-muted">{stat.label}</dd> | |
| 196 | </div> | |
| 197 | ))} | |
| 198 | </dl> | |
| 199 | <div className="mt-4 flex flex-wrap gap-x-4 gap-y-1 text-sm"> | |
| 200 | <Link to={`/${slug}/-/people`} className="inline-flex items-center gap-1.5 text-muted hover:text-fg"> | |
| 201 | <Users size={13} /> | |
| 202 | Members | |
| 203 | </Link> | |
| 204 | <Link | |
| 205 | to={role === "owner" ? `/${slug}/-/settings` : `/${slug}/-/people`} | |
| 206 | className="inline-flex items-center gap-1.5 text-muted hover:text-fg" | |
| 207 | > | |
| 208 | <Settings size={13} /> | |
| 209 | Settings | |
| 210 | </Link> | |
| 211 | <Link to={`/${slug}`} className="inline-flex items-center gap-1 text-accent hover:underline"> | |
| 212 | Its page <ArrowRight size={13} /> | |
| 213 | </Link> | |
| 214 | </div> | |
| 215 | </div> | |
| 216 | ); | |
| 217 | } | |
| 218 | ||
| 219 | /** | |
| Get started on mission control | 220 | * The first things to do, ticked off as they are done, until an outcome has |
| 221 | * been handed to agents. Shown above everything else on mission control. | |
| 222 | */ | |
| 223 | function GetStarted({ steps }: { steps: Step[] }) { | |
| 224 | const left = steps.filter((step) => !step.done).length; | |
| 225 | return ( | |
| 226 | <section className="rounded-2xl bg-surface p-5 ring-1 ring-line"> | |
| 227 | <div className="flex items-baseline justify-between gap-3"> | |
| 228 | <h2 className="font-semibold tracking-tight">Get started</h2> | |
| 229 | <span className="text-xs text-muted"> | |
| 230 | {steps.length - left} of {steps.length} done | |
| 231 | </span> | |
| 232 | </div> | |
| 233 | <ol className="mt-4 space-y-2"> | |
| 234 | {steps.map((step, index) => ( | |
| 235 | <li | |
| 236 | key={step.title} | |
| 237 | className={`flex items-start gap-3 rounded-xl px-3 py-2.5 ${step.done ? "" : "bg-bg/50 ring-1 ring-line"}`} | |
| 238 | > | |
| 239 | <span | |
| 240 | className={`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full text-[0.6875rem] font-medium ${ | |
| 241 | step.done ? "bg-accent text-bg" : "text-muted ring-1 ring-line-strong" | |
| 242 | }`} | |
| 243 | > | |
| 244 | {step.done ? "✓" : index + 1} | |
| 245 | </span> | |
| 246 | <span className="min-w-0 grow"> | |
| 247 | <span className={`block text-sm font-medium ${step.done ? "text-muted line-through decoration-faint" : ""}`}> | |
| 248 | {step.title} | |
| 249 | </span> | |
| 250 | {!step.done && <span className="mt-0.5 block text-xs leading-5 text-muted">{step.about}</span>} | |
| 251 | </span> | |
| 252 | {!step.done && step.to && ( | |
| 253 | <Link | |
| 254 | to={step.to} | |
| 255 | className="shrink-0 rounded-md bg-fg px-2.5 py-1 text-xs font-medium text-bg transition-colors hover:bg-white" | |
| 256 | > | |
| 257 | {step.action} | |
| 258 | </Link> | |
| 259 | )} | |
| 260 | </li> | |
| 261 | ))} | |
| 262 | </ol> | |
| 263 | </section> | |
| 264 | ); | |
| 265 | } | |
| 266 | ||
| Initial g1t: services, event bus, intents and attempts | 267 | export default function Home({ loaderData }: Route.ComponentProps) { |
| A free allowance on g1t's models, so anyone can try its agents | 268 | const { viewer, repos, active, assigned, canRunAgents, trial } = loaderData; |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 269 | |
| 270 | const needsYou = active.filter((item) => item.lifecycle?.stage === "needs_you"); | |
| 271 | const ready = active.filter((item) => item.lifecycle?.stage === "ready"); | |
| 272 | const moving = active.filter( | |
| 273 | (item) => item.lifecycle?.stage !== "needs_you" && item.lifecycle?.stage !== "ready", | |
| 274 | ); | |
| 275 | // Agents are at work, so the page changes without anyone touching it. | |
| 276 | const changing = moving.some((item) => item.lifecycle || item.pull.status === "draft"); | |
| 277 | const revalidator = useRevalidator(); | |
| 278 | useEffect(() => { | |
| 279 | if (!changing) return; | |
| 280 | const timer = setInterval(() => { | |
| 281 | if (document.visibilityState === "visible") revalidator.revalidate(); | |
| 282 | }, REFRESH_MS); | |
| 283 | return () => clearInterval(timer); | |
| 284 | }, [changing, revalidator]); | |
| 285 | ||
| Get started on mission control | 286 | const shell = useRouteLoaderData("root")?.shell as ShellData | null | undefined; |
| API and MCP server, Rust identity service, registration, site redesign | 287 | if (!viewer) return <Landing repos={repos} />; |
| Initial g1t: services, event bus, intents and attempts | 288 | |
| Get started on mission control | 289 | const workspace = shell?.workspace?.slug; |
| 290 | const first = repos[0]; | |
| Usage while free is shown at cost; agents get rustfmt and clippy | 291 | const handedOff = active.length > 0 || (shell?.monthUsageMicros ?? 0) > 0; |
| Get started on mission control | 292 | const steps: Step[] = [ |
| 293 | { | |
| 294 | done: Boolean(workspace), | |
| 295 | title: "Create a workspace", | |
| 296 | about: "Repositories, people and agent credit live in one.", | |
| 297 | to: "/workspaces/new", | |
| 298 | action: "Create", | |
| 299 | }, | |
| 300 | { | |
| 301 | done: repos.length > 0, | |
| 302 | title: "Add a repository", | |
| 303 | about: "Create one, or import one from GitHub by its address. Push to it with git as usual.", | |
| 304 | to: workspace ? `/new?workspace=${workspace}` : "/new", | |
| 305 | action: "Add", | |
| 306 | }, | |
| A free allowance on g1t's models, so anyone can try its agents | 307 | trial?.open |
| New workspaces are told to connect a model, before anything fails | 308 | ? { |
| A free allowance on g1t's models, so anyone can try its agents | 309 | done: true, |
| 310 | title: "Try g1t's agents free", | |
| 311 | about: `This workspace has ${dollars(trial.limitMicros - trial.usedMicros)} of its free ${dollars(trial.limitMicros)} left on g1t's models${trial.endsAt ? `, until ${new Date(trial.endsAt).toLocaleDateString("en-US", { month: "long", day: "numeric", timeZone: "America/Los_Angeles" })}` : ""}: assign issues and watch agents land them. Connect your own model under Integrations any time for more.`, | |
| 312 | to: workspace ? `/${workspace}/-/integrations` : null, | |
| 313 | action: "Connect", | |
| 314 | } | |
| 315 | : canRunAgents | |
| 316 | ? { | |
| Billing accounts, terms and enterprises; g1t is no longer free | 317 | // Done unless the workspace is near or at its usage limit. |
| 318 | done: Boolean(shell?.free) || shell?.limit == null || shell.limit.comped || shell.limit.state === "ok", | |
| 319 | title: "Keep work running", | |
| 320 | about: "Usage is charged after it runs, at what it costs g1t plus a markup. Add a card under Billing, so g1t charges it as you near your limit instead of stopping work.", | |
| New workspaces are told to connect a model, before anything fails | 321 | to: workspace ? `/${workspace}/-/billing` : null, |
| Billing accounts, terms and enterprises; g1t is no longer free | 322 | action: "Billing", |
| New workspaces are told to connect a model, before anything fails | 323 | } |
| 324 | : { | |
| 325 | done: false, | |
| 326 | title: "Connect a model", | |
| A free allowance on g1t's models, so anyone can try its agents | 327 | about: `${ |
| 328 | trial?.reason === "used" | |
| 329 | ? "This workspace has used its free allowance on g1t's models. " | |
| 330 | : trial?.reason === "pool" || trial?.reason === "ended" | |
| 331 | ? "The free allowance on g1t's models has ended. " | |
| 332 | : "" | |
| 333 | }Agents need a model to think with. Connect your Anthropic or OpenAI key, or any compatible endpoint; g1t itself costs nothing while it is being built out.`, | |
| New workspaces are told to connect a model, before anything fails | 334 | to: workspace ? `/${workspace}/-/integrations` : null, |
| 335 | action: "Connect", | |
| 336 | }, | |
| Get started on mission control | 337 | { |
| 338 | done: handedOff, | |
| 339 | title: "Hand off an outcome", | |
| 340 | about: "Write what you want on a repository's Plan page. A planner splits it into issues, and agents take them and land them on main.", | |
| 341 | to: first ? `/${first.namespace}/${first.name}/plans` : null, | |
| 342 | action: "Write one", | |
| 343 | }, | |
| 344 | ]; | |
| 345 | const starting = steps.some((step) => !step.done); | |
| 346 | ||
| Agents as a team: lifecycle, merge queue, billing and a new shell | 347 | const summary = [ |
| 348 | moving.length > 0 && `${moving.length} in progress`, | |
| 349 | ready.length > 0 && `${ready.length} ready to merge`, | |
| 350 | needsYou.length > 0 && plural(needsYou.length, "needs you", "need you"), | |
| 351 | assigned.length > 0 && `${assigned.length} assigned to you`, | |
| 352 | ].filter(Boolean); | |
| API and MCP server, Rust identity service, registration, site redesign | 353 | return ( |
| 354 | <main className="mx-auto grid max-w-6xl gap-10 px-4 py-10 lg:grid-cols-[1fr_20rem]"> | |
| 355 | <div className="min-w-0 space-y-10"> | |
| Initial g1t: services, event bus, intents and attempts | 356 | <section> |
| API and MCP server, Rust identity service, registration, site redesign | 357 | <div className="flex items-center gap-3"> |
| Workspace names and icons, and a component kit for every control | 358 | <Avatar name={viewer.username} image={viewer.avatar} size={36} /> |
| API and MCP server, Rust identity service, registration, site redesign | 359 | <div> |
| 360 | <h1 className="text-xl font-semibold tracking-tight"> | |
| 361 | Mission control | |
| 362 | </h1> | |
| 363 | <p className="text-sm text-muted"> | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 364 | {summary.length === 0 |
| Issues and pull requests replace intents and attempts | 365 | ? "Nothing is being worked on right now." |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 366 | : `${summary.join(" · ")}.`} |
| API and MCP server, Rust identity service, registration, site redesign | 367 | </p> |
| 368 | </div> | |
| 369 | </div> | |
| 370 | </section> | |
| 371 | ||
| Get started on mission control | 372 | {starting && <GetStarted steps={steps} />} |
| 373 | ||
| Agents as a team: lifecycle, merge queue, billing and a new shell | 374 | {needsYou.length > 0 && ( |
| 375 | <Section | |
| 376 | title={ | |
| 377 | <> | |
| 378 | <Hand size={14} className="text-warn" /> | |
| 379 | Needs you | |
| 380 | </> | |
| 381 | } | |
| 382 | > | |
| 383 | <PullRows items={needsYou} detail /> | |
| 384 | </Section> | |
| 385 | )} | |
| 386 | ||
| 387 | {ready.length > 0 && ( | |
| 388 | <Section title="Ready to merge"> | |
| 389 | <PullRows items={ready} /> | |
| 390 | </Section> | |
| 391 | )} | |
| 392 | ||
| 393 | {assigned.length > 0 && ( | |
| 394 | <Section title="Assigned to you"> | |
| 395 | <ul className="divide-y divide-line overflow-hidden rounded-xl border border-line bg-surface"> | |
| 396 | {assigned.map(({ issue, repo }) => ( | |
| 397 | <li key={issue.id}> | |
| 398 | <Link | |
| 399 | prefetch="intent" | |
| 400 | to={`/${repo.namespace}/${repo.name}/issues/${issue.number}`} | |
| 401 | className="flex items-center gap-3 px-4 py-3 transition-colors hover:bg-raised" | |
| 402 | > | |
| 403 | <IssueIcon issue={issue} /> | |
| 404 | <span className="min-w-0 grow"> | |
| 405 | <span className="block truncate font-medium">{issue.title}</span> | |
| 406 | <span className="block truncate font-mono text-xs text-muted"> | |
| 407 | {repo.namespace}/{repo.name}#{issue.number} | |
| Initial g1t: services, event bus, intents and attempts | 408 | </span> |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 409 | </span> |
| 410 | {issue.agent && <Assignee agent={issue.agent} />} | |
| 411 | <span className="hidden w-14 shrink-0 text-right text-xs text-faint sm:block"> | |
| 412 | <TimeAgo at={issue.updatedAt} /> | |
| 413 | </span> | |
| 414 | </Link> | |
| 415 | </li> | |
| 416 | ))} | |
| 417 | </ul> | |
| 418 | </Section> | |
| 419 | )} | |
| 420 | ||
| 421 | <Section title="In progress"> | |
| 422 | {moving.length === 0 ? ( | |
| 423 | <EmptyState title="No pull requests in progress"> | |
| 424 | Assign issues to the g1t agent from a repository's Issues tab, | |
| 425 | or point your own agent at one. | |
| 426 | </EmptyState> | |
| 427 | ) : ( | |
| 428 | <PullRows items={moving} /> | |
| 429 | )} | |
| 430 | </Section> | |
| API and MCP server, Rust identity service, registration, site redesign | 431 | |
| Initial g1t: services, event bus, intents and attempts | 432 | <section> |
| API and MCP server, Rust identity service, registration, site redesign | 433 | <div className="flex items-center justify-between"> |
| 434 | <h2 className="text-sm font-medium text-muted">Your repositories</h2> | |
| 435 | <ButtonLink to="/new" variant="quiet"> | |
| 436 | <Plus size={14} /> | |
| 437 | New | |
| 438 | </ButtonLink> | |
| 439 | </div> | |
| Initial g1t: services, event bus, intents and attempts | 440 | <RepoList repos={repos} /> |
| 441 | </section> | |
| API and MCP server, Rust identity service, registration, site redesign | 442 | </div> |
| Initial g1t: services, event bus, intents and attempts | 443 | |
| API and MCP server, Rust identity service, registration, site redesign | 444 | <aside className="space-y-4"> |
| Workspace things at the bottom of the sidebar, and on mission control | 445 | {shell?.workspace && ( |
| 446 | <WorkspaceCard | |
| 447 | slug={shell.workspace.slug.toLowerCase()} | |
| Workspace names and icons, and a component kit for every control | 448 | name={shell.workspace.name || shell.workspace.slug} |
| 449 | avatar={shell.workspace.avatar} | |
| Workspace things at the bottom of the sidebar, and on mission control | 450 | role={shell.workspace.role} |
| 451 | repos={repos} | |
| 452 | active={active} | |
| 453 | /> | |
| 454 | )} | |
| API and MCP server, Rust identity service, registration, site redesign | 455 | <div className="rounded-xl border border-line bg-surface p-5"> |
| 456 | <h2 className="font-medium">Connect an agent</h2> | |
| 457 | <p className="mt-1.5 text-sm text-muted"> | |
| OAuth 2.1 sign-in for MCP clients and other applications | 458 | Add g1t to Claude Code, then run /mcp in it to sign in through |
| 459 | your browser. | |
| API and MCP server, Rust identity service, registration, site redesign | 460 | </p> |
| 461 | <div className="mt-4 space-y-2"> | |
| 462 | <CopyLine | |
| 463 | prompt | |
| OAuth 2.1 sign-in for MCP clients and other applications | 464 | text="claude mcp add --transport http g1t https://mcp.g1t.sh" |
| API and MCP server, Rust identity service, registration, site redesign | 465 | /> |
| 466 | </div> | |
| 467 | <Link | |
| Docs as their own app; shared theme package | 468 | to="https://docs.g1t.sh/guides/bring-your-own-agent/" |
| API and MCP server, Rust identity service, registration, site redesign | 469 | className="mt-4 inline-flex items-center gap-1 text-sm text-accent hover:underline" |
| 470 | > | |
| 471 | How it works <ArrowRight size={13} /> | |
| 472 | </Link> | |
| 473 | </div> | |
| 474 | <div className="rounded-xl border border-line bg-surface p-5"> | |
| 475 | <h2 className="font-medium">Explore</h2> | |
| 476 | <p className="mt-1.5 text-sm text-muted"> | |
| Issues and pull requests replace intents and attempts | 477 | Browse public repositories and the issues open on them. |
| API and MCP server, Rust identity service, registration, site redesign | 478 | </p> |
| 479 | <Link | |
| 480 | to="/explore" | |
| 481 | className="mt-3 inline-flex items-center gap-1 text-sm text-accent hover:underline" | |
| 482 | > | |
| 483 | Public repositories <ArrowRight size={13} /> | |
| 484 | </Link> | |
| 485 | </div> | |
| 486 | </aside> | |
| Initial g1t: services, event bus, intents and attempts | 487 | </main> |
| 488 | ); | |
| 489 | } |