Skip to content
75 linesCodeBlameRaw

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.

Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar1import { isCodeownersPath } from "@g1t/contracts";
2
Initial g1t: services, event bus, intents and attempts3import type { Route } from "./+types/blob";
Social cards for every page: og.g1t.sh4import { page } from "../../lib/meta";
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar5import { CodeownersFileErrors } from "../../components/codeowners";
Initial g1t: services, event bus, intents and attempts6import { BlobView } from "../../components/repo-view";
Fast pages, required checks on the branch, self-hosted runners, honest incidents7import { highlightLines } from "../../lib/highlight.server";
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar8import { repos, work } from "../../lib/services.server";
Merge commit authors and hovercards: commits show their accounts, every name opens a card (repos 0016)9import { showCommits } from "../../lib/commit-people.server";
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look10import { redirectIfBranchRenamed } from "../../lib/branch-redirect.server";
Initial g1t: services, event bus, intents and attempts11import { getViewer, unwrap } from "../../lib/session.server";
12
Social cards for every page: og.g1t.sh13export function meta({ params, ...args }: Route.MetaArgs) {
14 return page(args, { title: `${params["*"]} · ${params.owner}/${params.repo} · g1t` });
Initial g1t: services, event bus, intents and attempts15}
16
Agents as a team: lifecycle, merge queue, billing and a new shell17export async function loader({ params, context, request }: Route.LoaderArgs) {
18 const viewer = getViewer(context);
Initial g1t: services, event bus, intents and attempts19 const path = { namespace: params.owner, name: params.repo };
Agents as a team: lifecycle, merge queue, billing and a new shell20 const file = params["*"] ?? "";
21 const wantsBlame = new URL(request.url).searchParams.has("blame");
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar22 const [found, blame, list, checked] = await Promise.all([
Agents as a team: lifecycle, merge queue, billing and a new shell23 repos.blob(path, viewer, params.ref, file),
24 wantsBlame ? repos.blame(path, viewer, params.ref, file) : null,
Branches and Tags pages, each file's last commit, and the branch menu on files25 // For the branch menu; the page still shows without it.
26 repos.branches(path, viewer).catch(() => null),
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar27 // A CODEOWNERS file is checked as it is shown; the file shows without it.
28 isCodeownersPath(file) ? work.codeownersErrors(path, viewer, params.ref).catch(() => null) : null,
Agents as a team: lifecycle, merge queue, billing and a new shell29 ]);
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar30 const codeowners = checked?.ok ? checked.value : null;
Branches and Tags pages, each file's last commit, and the branch menu on files31 const branches = list?.ok ? list.value : null;
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look32 // A branch that was renamed: the same file on its new name.
33 if (!found.ok && found.error.code === "not_found") await redirectIfBranchRenamed(request, path, viewer, params.ref);
Agents as a team: lifecycle, merge queue, billing and a new shell34 const blob = unwrap(found);
35 if (blame?.ok && blob.text != null) {
36 return {
37 blob,
38 html: null,
Merge commit authors and hovercards: commits show their accounts, every name opens a card (repos 0016)39 blame: {
40 // Every commit's people at once.
41 blame: { ...blame.value, commits: await showCommits(blame.value.commits) },
42 lines: await highlightLines(blob.path, blob.text),
43 },
Branches and Tags pages, each file's last commit, and the branch menu on files44 branches,
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar45 codeowners,
Agents as a team: lifecycle, merge queue, billing and a new shell46 };
47 }
API and MCP server, Rust identity service, registration, site redesign48 return {
49 blob,
Fast pages, required checks on the branch, self-hosted runners, honest incidents50 html: blob.text == null ? null : await highlightLines(blob.path, blob.text),
Agents as a team: lifecycle, merge queue, billing and a new shell51 blame: null,
Branches and Tags pages, each file's last commit, and the branch menu on files52 branches,
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar53 codeowners,
API and MCP server, Rust identity service, registration, site redesign54 };
Initial g1t: services, event bus, intents and attempts55}
56
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar57export default function Blob({ loaderData, params }: Route.ComponentProps) {
58 const { codeowners, blob } = loaderData;
59 // Its errors' lines are marked, when they are this file's.
60 const own = codeowners != null && codeowners.path === blob.path;
61 return (
62 <BlobView
63 blob={blob}
64 html={loaderData.html}
65 blame={loaderData.blame}
66 branches={loaderData.branches}
67 notice={
68 codeowners && (
69 <CodeownersFileErrors report={codeowners} path={blob.path} base={`/${params.owner}/${params.repo}`} />
70 )
71 }
72 marked={own ? codeowners.errors.map((error) => error.line).filter((line) => line > 0) : undefined}
73 />
74 );
Initial g1t: services, event bus, intents and attempts75}

This file's history is long; its oldest lines are credited to the oldest commit read.