flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/apps/web/app/routes/explore.tsx

55 lines2,169 bytesCodeBlame

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.

API and MCP server, Rust identity service, registration, site redesign1import { Search } from "lucide-react";
2import { Form } from "react-router";
3
4import type { Route } from "./+types/explore";
Social cards for every page: og.g1t.sh5import { page } from "../lib/meta";
API and MCP server, Rust identity service, registration, site redesign6import { RepoList } from "../components/repo-list";
Agents as a team: lifecycle, merge queue, billing and a new shell7import { notACredential } from "../components/ui";
Rust repos service with shipping; pull requests kept in the model8import { repos } from "../lib/services.server";
API and MCP server, Rust identity service, registration, site redesign9import { getViewer } from "../lib/session.server";
10
Social cards for every page: og.g1t.sh11export function meta({ loaderData, ...args }: Route.MetaArgs) {
12 return page(args, {
13 title: loaderData?.query ? `${loaderData.query} · Search · g1t` : "Explore · g1t",
14 description: loaderData?.query
15 ? `Public repositories on g1t matching "${loaderData.query}".`
16 : "Public repositories on g1t, and the agents at work on them.",
17 });
API and MCP server, Rust identity service, registration, site redesign18}
19
20/** Serves both /explore and /search?q=. */
21export async function loader({ request, context }: Route.LoaderArgs) {
22 const query = new URL(request.url).searchParams.get("q")?.trim() ?? "";
Rust repos service with shipping; pull requests kept in the model23 return { query, repos: await repos.list(getViewer(context), { query }) };
API and MCP server, Rust identity service, registration, site redesign24}
25
26export default function Explore({ loaderData }: Route.ComponentProps) {
27 const { query, repos } = loaderData;
28 return (
29 <main className="mx-auto max-w-4xl px-4 py-10">
30 <h1 className="text-2xl font-semibold tracking-tight">
31 {query ? "Search" : "Explore"}
32 </h1>
33 <p className="mt-1 text-muted">
34 {query
35 ? `${repos.length} ${repos.length === 1 ? "repository matches" : "repositories match"} "${query}".`
36 : "Public repositories on g1t."}
37 </p>
38 <Form action="/search" role="search" className="relative mt-6">
39 <Search
40 size={16}
41 className="pointer-events-none absolute top-1/2 left-3.5 -translate-y-1/2 text-faint"
42 />
43 <input
44 name="q"
Agents as a team: lifecycle, merge queue, billing and a new shell45 {...notACredential()}
API and MCP server, Rust identity service, registration, site redesign46 defaultValue={query}
47 placeholder="Search by name or description"
48 aria-label="Search repositories"
49 className="w-full rounded-lg border border-line bg-surface py-2.5 pr-4 pl-10 outline-none transition-colors placeholder:text-faint hover:border-line-strong focus:border-accent-dim"
50 />
51 </Form>
52 <RepoList repos={repos} />
53 </main>
54 );
55}