Skip to content

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.sh
179 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.

Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start1/**
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.2 * Which frame a page is drawn in.
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start3 *
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.4 * - `standalone`: signing in, signing up and choosing a workspace. The
5 * page alone, centred, with the logo and a quiet row of links at the
The left-hand navigation takes less room and reads at a glance. The dock becomes a rail: a 56-pixel column of icons with the g1t mark on top, the current app marked by a filled square, hover hints naming each with its shortcut, the apps you pinned in a scrolling band, and Apps, People, Workspace and your account at the foot. Each mode's sidebar sits flush against it, 240 pixels wide, opening on Search or jump to and listing its groups under small labels in 36-pixel rows; Ctrl B hides it and the page grows into the room. Every mode's list is built on the shadcn Sidebar now in the kit, so Workspace, Code, People, Notifications, account settings, Chat, Artifacts and Agents all share one frame; the phone keeps its bottom bar and drawer. The workspaces guide describes the rail, the sidebar and the page.6 * foot: no header, no sidebar, no rail.
7 * - `app`: someone signed in, everywhere else. The rail, the mode's
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.8 * sidebar and the page in its panel, always about their current
9 * workspace, even on public pages such as Explore, a profile or another
10 * workspace's public project.
11 * - `public`: a visitor who is not signed in (or has not confirmed their
12 * address yet), on every other page: a plain header with the logo,
13 * Explore, Docs and signing in, the page at full width, and the footer.
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start14 */
15
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.16import type { Abilities, Capability, RepoMirror } from "@g1t/contracts";
17
18import { type RepoArea, offers, writable } from "./mirror.ts";
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start19
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.20export type Frame = "standalone" | "public" | "app";
21
22/** Pages that are drawn on their own, whoever opens them. */
23const STANDALONE = new Set([
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start24 "/login",
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.25 "/login/two-factor",
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start26 "/register",
27 "/logout",
28 "/verify",
Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036)29 "/confirm-email",
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start30 "/forgot",
31 "/reset",
32 "/device",
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.33 "/oauth/authorize",
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start34 "/workspaces/new",
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.35 "/integrations/github/setup",
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start36]);
37
g1t.sh/download is a marketing page: it is drawn with the site's header and footer whoever opens it, never inside the app's rail and sidebar, in the shape of Pricing, with Download in the public header, its phone menu and the footer. The desktop app's check in CI runs on the larger machine the Rust tests use; on the small one the linker ran out of room and died with a bus error on every push since the app arrived.38/** Marketing pages: the public header and footer, even for someone signed in. */
39const MARKETING = new Set(["/download"]);
40
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.41/** The page's path without a trailing slash or a click's `.data`. */
42function framePath(pathname: string): string {
43 const path = pathname.replace(/\.data$/, "");
44 return path.length > 1 ? path.replace(/\/+$/, "") : path;
45}
Chat controls, public profiles, shadcn selects, and no Docs tab in a project46
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.47/**
48 * The frame for `pathname`. `viewer` says whether someone is signed in and
49 * confirmed (`signedIn`), and whether they belong to a workspace yet: until
50 * they do, answering an invitation is part of getting started too.
51 */
52export function frameOf(pathname: string, viewer: { signedIn: boolean; workspace: boolean }): Frame {
53 const path = framePath(pathname);
54 if (STANDALONE.has(path)) return "standalone";
g1t.sh/download is a marketing page: it is drawn with the site's header and footer whoever opens it, never inside the app's rail and sidebar, in the shape of Pricing, with Download in the public header, its phone menu and the footer. The desktop app's check in CI runs on the larger machine the Rust tests use; on the small one the linker ran out of room and died with a bus error on every push since the app arrived.55 // Marketing pages are the site's front, whoever reads them: never inside the app's rail and sidebar.
56 if (MARKETING.has(path)) return "public";
g1t is described as the product it is in alpha, and its shell takes the new shape: the README, the docs home and docs/PLAN.md label every feature Live, Preview or Coming; a floating dock with the g1t mark, Today, Chat, Notifications, Agents, Code, Artifacts, your pinned apps and the Apps launcher, with People, Workspace and the account menu (now holding help) at its foot; the workspace's logo and switcher heading a flat sidebar that folds away with Ctrl B, or leading the header's breadcrumbs where there is none; the page in a rounded panel with a full-width header; Today as the front page, with first-time acceptance of agents' pull requests, what needs you and what's at stake, spend today and one item to start with, every number from a service; Notifications in place of the Inbox at /notifications; a bottom bar and More sheet on phones; and sign-in, sign-up, two-factor, reset, invites and choosing a workspace on standalone pages with no app around them.57 // An invite link, and signing in with GitHub, are the front door.
58 if (path.startsWith("/invite/") || path === "/auth/github" || path.startsWith("/auth/github/")) return "standalone";
59 if (path === "/invitations" && viewer.signedIn && !viewer.workspace) return "standalone";
60 return viewer.signedIn ? "app" : "public";
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start61}
62
63/** The project pages the sidebar lists, by key, for a member or not. */
64export type ProjectPage =
65 | "code"
66 | "issues"
67 | "pulls"
68 | "agents"
69 | "actions"
70 | "deployments"
71 | "observability"
72 | "security"
73 | "insights"
74 | "settings";
75
76/**
77 * What a page needs beyond a role on the repository, once what the viewer
78 * may do is known: Security's findings are for people who can push.
79 */
80export const PAGE_NEEDS: Partial<Record<ProjectPage, Capability>> = { security: "push" };
81
82/**
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.83 * The part of the repository each page is about (`RepoArea` in the
84 * contracts): what a mirror offers decides which pages it lists.
85 */
86export const PAGE_AREA: Record<ProjectPage, RepoArea> = {
87 code: "code",
88 issues: "issues",
89 pulls: "pulls",
90 agents: "agents",
91 actions: "workflows",
92 deployments: "deployments",
93 // Logs and traces are of something running here.
94 observability: "deployments",
95 security: "security",
96 insights: "insights",
97 settings: "settings",
98};
99
100/**
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start101 * A project's menu, in order. Security and Settings are for people with a
102 * role on its repository, and a page in `PAGE_NEEDS` only for those whose
103 * role has its capability (`can`, once the repository's page has loaded);
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.104 * everyone who can see the project sees the rest. A mirror lists only what
105 * it offers now (`mirror`, the repository's, once its page has loaded): a
106 * standby mirror is a read-only copy, so Code, Security, Insights and
107 * Settings, no Issues, Pull requests, Agents or Deployments, and Workflows
108 * only when they run here.
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start109 */
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.110export function projectPages(member: boolean, can?: Partial<Abilities>, mirror?: RepoMirror | null): ProjectPage[] {
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start111 const pages: (ProjectPage | false)[] = [
112 "code",
113 "issues",
114 "pulls",
115 "agents",
116 "actions",
117 // A public repository's deployments and build logs are for anyone, as its code is.
118 "deployments",
Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.119 // Logs and requests are not: they can hold what only the people running it should read.
120 member && "observability",
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start121 member && "security",
122 "insights",
123 member && "settings",
124 ];
125 return pages.filter(
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.126 (page): page is ProjectPage =>
127 page !== false && (!can || !PAGE_NEEDS[page] || Boolean(can[PAGE_NEEDS[page]!])) && offers(mirror, PAGE_AREA[page]),
Packages lists like a registry: Type, search, Visibility and Sort in one bar, richer rows, and a registry to choose from to start128 );
129}
Phones reach every page: each mode's menu from the top bar or by tapping the tab you're on, Docs first in the avatar sheet, a project's pages as a swipeable strip; dialogs as bottom sheets above the keyboard, safe areas, menus kept on screen, 40px targets, touch-visible controls, save bars above the tab bar130
131/**
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.132 * The page under a project that a mirror does not offer now and `rest`
133 * (the path under the project) is on, with what to call it, or null when
134 * the page is there. An issue or a pull request by number stays readable,
135 * as does a release; making a release is a write.
136 */
137export function hiddenOnMirror(rest: string, mirror: RepoMirror | null | undefined): { page: ProjectPage; what: string } | null {
138 if (!mirror || writable(mirror)) return null;
139 const path = rest.replace(/^\/+|\/+$/g, "");
140 if (path === "releases/new") return { page: "code", what: "releases" };
141 if (/^(issues|pull)\/\d+(\/|$)/.test(path)) return null;
142 const page = projectPageAt(path);
143 if (!page || page === "overview" || offers(mirror, PAGE_AREA[page])) return null;
144 return { page, what: PROJECT_PAGE_LINKS[page].label.toLowerCase() };
145}
146
147/**
Phones reach every page: each mode's menu from the top bar or by tapping the tab you're on, Docs first in the avatar sheet, a project's pages as a swipeable strip; dialogs as bottom sheets above the keyboard, safe areas, menus kept on screen, 40px targets, touch-visible controls, save bars above the tab bar148 * A project's pages as the phone's strip of tabs under its name names them
149 * (routes/repo/layout.tsx): the sidebar's words, and the paths under the
150 * project at which each is the current one.
151 */
152export const PROJECT_PAGE_LINKS: Record<ProjectPage, { label: string; path: string; also: string[]; soon?: boolean }> = {
153 code: { label: "Code", path: "code", also: ["tree", "blob", "commits", "commit", "branches", "tags", "releases", "compare"] },
154 issues: { label: "Issues", path: "issues", also: ["plans", "milestones", "labels"] },
155 pulls: { label: "Pull requests", path: "pulls", also: ["pull", "queue"] },
156 agents: { label: "Agents", path: "agents", also: ["sessions", "memory"] },
157 actions: { label: "Workflows", path: "actions", also: [] },
158 deployments: { label: "Deployments", path: "deployments", also: [] },
Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.159 observability: { label: "Observability", path: "observability", also: [] },
Phones reach every page: each mode's menu from the top bar or by tapping the tab you're on, Docs first in the avatar sheet, a project's pages as a swipeable strip; dialogs as bottom sheets above the keyboard, safe areas, menus kept on screen, 40px targets, touch-visible controls, save bars above the tab bar160 security: { label: "Security", path: "security", also: [] },
161 insights: { label: "Insights", path: "contributors", also: ["activity", "stargazers"] },
162 settings: { label: "Settings", path: "settings", also: [] },
163};
164
165/**
166 * Which of a project's pages `rest` (the path under the project, no
167 * leading slash) is on: "overview" for the project itself. `soon` says
168 * which page a roadmap page (`soon/<key>`) sits under.
169 */
170export function projectPageAt(rest: string, soon: Record<string, ProjectPage> = {}): ProjectPage | "overview" | null {
171 const path = rest.replace(/^\/+|\/+$/g, "");
172 if (path === "") return "overview";
173 const soonKey = /^soon\/([^/]+)/.exec(path)?.[1];
174 if (soonKey && soon[soonKey]) return soon[soonKey]!;
175 for (const [page, link] of Object.entries(PROJECT_PAGE_LINKS) as [ProjectPage, (typeof PROJECT_PAGE_LINKS)[ProjectPage]][]) {
176 if ([link.path, ...link.also].some((prefix) => path === prefix || path.startsWith(`${prefix}/`))) return page;
177 }
178 return null;
179}

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