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

Workspace names and icons, and a component kit for every control1/**
2 * A project's pages and the tabs within them, in one place: the sidebar
3 * lists the pages, and a page with more than one view shows them as tabs
4 * across its top, the way GitHub and Vercel do. Soon tabs come from the
5 * roadmap and open its page for them, under the same tabs.
6 */
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.7import type { Abilities, Capability, RepoMirror } from "@g1t/contracts";
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look8
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.9import { type RepoArea, offers } from "./mirror.ts";
10import { type RoadmapItem, roadmapIn } from "./roadmap.ts";
Workspace names and icons, and a component kit for every control11
12export type Tab = {
13 label: string;
14 /** Under the project, without a leading slash; "" is its overview. */
15 path: string;
16 /** Other paths under which this tab is the current one. */
17 also?: string[];
18 soon?: boolean;
19 about?: string;
20 /** Members only. */
21 members?: boolean;
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar22 /** Current on its own path only, not on the paths under it. */
23 exact?: boolean;
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look24 /** Only for viewers whose role has this capability, once it is known. */
25 needs?: Capability;
Workspace names and icons, and a component kit for every control26};
27
28export type Section = {
29 key: RoadmapItem["section"] | "Workflows" | "Settings";
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.30 /** The part of the repository it is about: a mirror shows the tabs of what it offers (lib/mirror.ts `offers`). */
31 area: RepoArea;
Workspace names and icons, and a component kit for every control32 tabs: Tab[];
33};
34
35function soon(section: RoadmapItem["section"]): Tab[] {
36 return roadmapIn(section).map((item) => ({ label: item.title, path: `soon/${item.key}`, soon: true, about: item.summary }));
37}
38
39export const SECTIONS: Section[] = [
40 {
41 key: "Code",
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.42 area: "code",
Workspace names and icons, and a component kit for every control43 tabs: [
44 { label: "Files", path: "code", also: ["tree", "blob"] },
45 { label: "Commits", path: "commits", also: ["commit"] },
Branches and Tags pages, each file's last commit, and the branch menu on files46 { label: "Branches", path: "branches" },
47 { label: "Tags", path: "tags" },
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9748 { label: "Releases", path: "releases" },
Compare: any two branches, the commits one has that the other does not, and the diff, with Open a pull request49 { label: "Compare", path: "compare" },
Chat controls, public profiles, shadcn selects, and no Docs tab in a project50 // No Docs tab: code is not docs. Docs is a workspace mode, filtered by project there.
Workspace names and icons, and a component kit for every control51 ],
52 },
53 {
54 key: "Issues",
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.55 area: "issues",
Workspace names and icons, and a component kit for every control56 tabs: [
57 { label: "Issues", path: "issues" },
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look58 { label: "Outcomes", path: "plans" },
Usage, Billing settings and prepaid AI credit; fixes from the UX audit59 { label: "Milestones", path: "milestones" },
Workspace names and icons, and a component kit for every control60 ...soon("Issues"),
61 ],
62 },
63 {
64 key: "Agents",
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.65 area: "agents",
Agents and memory, checks and conflicts, profiles, slug renames, custom domains66 tabs: [
67 { label: "At work", path: "agents" },
68 { label: "Sessions", path: "sessions" },
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look69 { label: "Memory", path: "memory" },
Agents and memory, checks and conflicts, profiles, slug renames, custom domains70 ...soon("Agents"),
71 ],
Workspace names and icons, and a component kit for every control72 },
73 {
74 key: "Deployments",
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.75 area: "deployments",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look76 tabs: [{ label: "Deployments", path: "deployments" }, ...soon("Deployments")],
Workspace names and icons, and a component kit for every control77 },
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.78 { key: "Observability", area: "deployments", tabs: soon("Observability") },
Agents get guardrails, run credentials, an audit log, a context hub, repository instructions and mentions; security upkeep; snake_case API79 {
80 key: "Security",
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.81 area: "security",
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar82 tabs: [
Merge main (membership, two-factor, GitHub repo roles) into tokens83 { label: "Overview", path: "security", members: true, needs: "security_alerts", exact: true },
84 { label: "Secret scanning", path: "security/secret-scanning", members: true, needs: "security_alerts" },
85 { label: "Code scanning", path: "security/code-scanning", members: true, needs: "security_alerts", also: ["security/pulls"] },
86 { label: "Vulnerabilities", path: "security/vulnerabilities", members: true, needs: "security_alerts" },
87 { label: "Dependency graph", path: "security/dependency-graph", members: true, needs: "security_alerts" },
88 { label: "Dependency updates", path: "security/dependency-updates", members: true, needs: "security_alerts" },
89 { label: "Settings", path: "security/settings", members: true, needs: "security_alerts" },
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar90 ...soon("Security"),
91 ],
Agents get guardrails, run credentials, an audit log, a context hub, repository instructions and mentions; security upkeep; snake_case API92 },
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9793 {
94 key: "Insights",
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.95 area: "insights",
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9796 tabs: [
97 { label: "Contributors", path: "contributors" },
98 { label: "Activity", path: "activity" },
99 { label: "Stargazers", path: "stargazers" },
100 ...soon("Insights"),
101 ],
102 },
Workspace names and icons, and a component kit for every control103];
104
105/** Pull requests and the merge queue share a page's tabs too. */
106export const PULLS: Section = {
107 key: "Code",
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.108 area: "pulls",
Workspace names and icons, and a component kit for every control109 tabs: [
110 { label: "Pull requests", path: "pulls", also: ["pull"] },
111 { label: "Merge queue", path: "queue" },
112 ],
113};
114
115function matches(rest: string, tab: Tab): boolean {
116 return [tab.path, ...(tab.also ?? [])].some((path) => path !== "" && (rest === path || rest.startsWith(`${path}/`)));
117}
118
119/**
120 * The tabs for the page at `rest` (the path under the project), if it
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.121 * belongs to a page with more than one view. On a mirror, only the pages
122 * it offers now have tabs (`mirror`, the repository's).
Workspace names and icons, and a component kit for every control123 */
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.124export function tabsFor(rest: string, member: boolean, can?: Partial<Abilities>, mirror?: RepoMirror | null): Tab[] | null {
Workspace names and icons, and a component kit for every control125 for (const section of [...SECTIONS, PULLS]) {
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 if (!offers(mirror, section.area)) continue;
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look127 const visible = section.tabs.filter(
128 (tab) => (member || !tab.members) && (!tab.needs || !can || Boolean(can[tab.needs])),
129 );
Workspace names and icons, and a component kit for every control130 if (visible.length > 1 && visible.some((tab) => matches(rest, tab))) return visible;
131 }
132 return null;
133}
134
135/** The first page of a section, for its sidebar link: a built one if any. */
136export function entryOf(key: Section["key"]): Tab | undefined {
137 return SECTIONS.find((section) => section.key === key)?.tabs[0];
138}

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