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/repo/tree.tsx

21 lines800 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.

Initial g1t: services, event bus, intents and attempts1import type { Route } from "./+types/tree";
Social cards for every page: og.g1t.sh2import { page } from "../../lib/meta";
Initial g1t: services, event bus, intents and attempts3import { TreeView } from "../../components/repo-view";
Rust repos service with shipping; pull requests kept in the model4import { repos } from "../../lib/services.server";
Initial g1t: services, event bus, intents and attempts5import { getViewer, unwrap } from "../../lib/session.server";
6
Social cards for every page: og.g1t.sh7export function meta({ params, ...args }: Route.MetaArgs) {
Initial g1t: services, event bus, intents and attempts8 const path = params["*"] ? `${params["*"]} · ` : "";
Social cards for every page: og.g1t.sh9 return page(args, { title: `${path}${params.owner}/${params.repo} · g1t` });
Initial g1t: services, event bus, intents and attempts10}
11
12export async function loader({ params, context }: Route.LoaderArgs) {
13 const path = { namespace: params.owner, name: params.repo };
14 return unwrap(
Rust repos service with shipping; pull requests kept in the model15 await repos.tree(path, getViewer(context), params.ref, params["*"] ?? ""),
Initial g1t: services, event bus, intents and attempts16 );
17}
18
19export default function Tree({ loaderData }: Route.ComponentProps) {
20 return <TreeView tree={loaderData} />;
21}