Skip to content
133 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.

Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put1import assert from "node:assert/strict";
2import { test } from "node:test";
3
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.4import type { RepoMirror } from "@g1t/contracts";
5
6import { frameOf, hiddenOnMirror, projectPageAt, projectPages } from "./chrome.ts";
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put7
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.8const visitor = { signedIn: false, workspace: false };
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.9const mirror = (state: RepoMirror["state"], warm = false): RepoMirror => ({
10 state,
11 remote: "github.com/acme/web",
12 url: "https://github.com/acme/web",
13 since: "2026-10-08T10:00:00Z",
14 warm,
15});
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.16const member = { signedIn: true, workspace: true };
17const newcomer = { signedIn: true, workspace: false };
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put18
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.19test("signing in, signing up and choosing a workspace stand alone, for everyone", () => {
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put20 for (const path of [
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.21 "/login",
22 "/login/two-factor",
23 "/register",
24 "/register/",
25 "/invite/abc123",
26 "/verify",
27 "/confirm-email",
28 "/forgot",
29 "/reset",
30 "/device",
31 "/oauth/authorize",
32 "/auth/github/callback",
33 "/auth/github/username",
34 "/workspaces/new",
35 "/workspaces/new.data",
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put36 ]) {
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.37 for (const viewer of [visitor, member, newcomer]) assert.equal(frameOf(path, viewer), "standalone", path);
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put38 }
39});
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.41test("answering an invitation stands alone until you belong to a workspace", () => {
42 assert.equal(frameOf("/invitations", newcomer), "standalone");
43 assert.equal(frameOf("/invitations", member), "app");
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put44});
45
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.46test("someone signed in gets the app everywhere else, public pages included", () => {
The front page is Home: where you're needed comes first, however long ago it started, with what's at stake and how long it has waited; then what happened since you were last here, in words, with the agent work that settled, what landed, what deployed, what was decided and what was spent, switchable to the last 24 hours or 7 days; then what's running now. Your last visit is kept with your account, so it's the same on every device; Today's old address leads here. The home guide says how.47 for (const path of ["/", "/explore", "/u/ada", "/other/web", "/acme/-/home", "/notifications", "/pricing", "/does/not/exist"]) {
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.48 assert.equal(frameOf(path, member), "app", path);
49 assert.equal(frameOf(path, newcomer), "app", path);
Chat controls, public profiles, shadcn selects, and no Docs tab in a project50 }
51});
52
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.53test("a visitor gets the public frame everywhere else", () => {
54 for (const path of ["/", "/explore", "/search", "/u/ada", "/acme", "/acme/web", "/acme/web/issues/4", "/policies/privacy", "/nothing/here/at/all"]) {
55 assert.equal(frameOf(path, visitor), "public", path);
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look56 }
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 // A workspace named like a page is still a workspace, and still public to a visitor.
58 assert.equal(frameOf("/loginx", visitor), "public");
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put59});
60
61test("a project's menu hides member-only pages from everyone else", () => {
62 const visitor = projectPages(false);
63 assert.deepEqual(visitor.slice(0, 5), ["code", "issues", "pulls", "agents", "actions"]);
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look64 for (const page of ["security", "settings"] as const) {
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put65 assert.ok(!visitor.includes(page), page);
66 assert.ok(projectPages(true).includes(page), page);
67 }
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look68 // Security needs push once the role is known: Read and Triage do not see it.
69 assert.ok(!projectPages(true, { push: false }).includes("security"));
70 assert.ok(projectPages(true, { push: true }).includes("security"));
71 // Anyone who can read a repository sees its deployments.
72 assert.ok(visitor.includes("deployments") && projectPages(true).includes("deployments"));
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put73});
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 bar74
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.75test("a mirror's menu lists what it offers: a read-only copy until it is taken over", () => {
76 const can = { push: true };
77 const all = projectPages(true, can);
78 assert.deepEqual(projectPages(true, can, null), all);
79 assert.deepEqual(projectPages(true, can, mirror("takeover")), all);
80 // Standing by: code, security, insights and settings. Nothing that works or runs.
81 assert.deepEqual(projectPages(true, can, mirror("standby")), ["code", "security", "insights", "settings"]);
82 assert.deepEqual(projectPages(false, undefined, mirror("standby")), ["code", "insights"]);
83 // Workflows show when they run here: CI failover, or a standby kept warm.
84 assert.deepEqual(projectPages(true, can, mirror("ci")), ["code", "actions", "security", "insights", "settings"]);
85 assert.ok(projectPages(true, can, mirror("standby", true)).includes("actions"));
86 assert.ok(!projectPages(true, can, mirror("handing_back", true)).includes("actions"));
87 assert.ok(!projectPages(true, can, mirror("handing_back")).includes("issues"));
88});
89
90test("a page a mirror does not offer stands behind the read-only note, by its name", () => {
91 const standby = mirror("standby");
92 assert.deepEqual(hiddenOnMirror("issues", standby), { page: "issues", what: "issues" });
93 assert.deepEqual(hiddenOnMirror("issues/new", standby), { page: "issues", what: "issues" });
94 assert.deepEqual(hiddenOnMirror("pulls", standby), { page: "pulls", what: "pull requests" });
95 assert.deepEqual(hiddenOnMirror("queue", standby), { page: "pulls", what: "pull requests" });
96 assert.deepEqual(hiddenOnMirror("agents/runs/9", standby), { page: "agents", what: "agents" });
97 assert.deepEqual(hiddenOnMirror("sessions", standby), { page: "agents", what: "agents" });
98 assert.deepEqual(hiddenOnMirror("memory", standby), { page: "agents", what: "agents" });
99 assert.deepEqual(hiddenOnMirror("deployments/d1", standby), { page: "deployments", what: "deployments" });
100 assert.deepEqual(hiddenOnMirror("labels", standby), { page: "issues", what: "issues" });
101 assert.deepEqual(hiddenOnMirror("milestones/2", standby), { page: "issues", what: "issues" });
102 assert.deepEqual(hiddenOnMirror("plans", standby), { page: "issues", what: "issues" });
103 assert.deepEqual(hiddenOnMirror("actions", standby), { page: "actions", what: "workflows" });
104 assert.deepEqual(hiddenOnMirror("releases/new", standby), { page: "code", what: "releases" });
105 // What a read-only copy still shows.
106 for (const path of ["", "code", "tree/main/src", "commits", "branches", "releases", "compare", "security/vulnerabilities", "contributors", "settings/mirroring", "issues/12", "pull/3/files"]) {
107 assert.equal(hiddenOnMirror(path, standby), null, path);
108 }
109 // Workflows stay when they run here; everything stays once g1t leads.
110 assert.equal(hiddenOnMirror("actions", mirror("ci")), null);
111 assert.equal(hiddenOnMirror("actions", mirror("standby", true)), null);
112 assert.equal(hiddenOnMirror("issues", mirror("takeover")), null);
113 assert.equal(hiddenOnMirror("issues", null), null);
114 assert.ok(hiddenOnMirror("pulls", mirror("handing_back")));
115});
116
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 bar117test("the phone's project strip lights the page a path is under", () => {
118 assert.equal(projectPageAt(""), "overview");
119 assert.equal(projectPageAt("blob/main/README.md"), "code");
120 assert.equal(projectPageAt("commit/abc123"), "code");
121 assert.equal(projectPageAt("issues/12"), "issues");
122 assert.equal(projectPageAt("milestones"), "issues");
123 assert.equal(projectPageAt("pull/3/files"), "pulls");
124 assert.equal(projectPageAt("queue"), "pulls");
125 assert.equal(projectPageAt("sessions/abc"), "agents");
126 assert.equal(projectPageAt("actions/runs/9"), "actions");
127 assert.equal(projectPageAt("security/secret-scanning"), "security");
128 assert.equal(projectPageAt("stargazers"), "insights");
129 assert.equal(projectPageAt("settings/branches"), "settings");
130 assert.equal(projectPageAt("soon/logs", { logs: "observability" }), "observability");
131 assert.equal(projectPageAt("soon/boards", { boards: "issues" }), "issues");
132 assert.equal(projectPageAt("pulse"), null);
133});