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.

467 linesCodeBlameRaw
1import { type RouteConfig, index, layout, route } from "@react-router/dev/routes";
2
3export default [
4 index("routes/home.tsx"),
5 route("login", "routes/login.tsx"),
6 // The second step of signing in, for an account with two-factor authentication.
7 route("login/two-factor", "routes/login-two-factor.tsx"),
8 route("register", "routes/register.tsx"),
9 // An invite link: who sent it, then sign-up or joining. `invite` is reserved.
10 route("invite/:code", "routes/invite.tsx"),
11 route("logout", "routes/logout.tsx"),
12 route("verify", "routes/verify.tsx"),
13 // Where an account confirms its email address, with the code from the
14 // email; every other page sends it here until it has (lib/confirm-gate.ts).
15 route("confirm-email", "routes/confirm-email.tsx"),
16 route("forgot", "routes/forgot.tsx"),
17 route("reset", "routes/reset.tsx"),
18 route("device", "routes/device.tsx"),
19 route("oauth/authorize", "routes/oauth-authorize.tsx"),
20 route("new", "routes/new.tsx"),
21 // GitHub: signing in with it, and bringing repositories across through
22 // g1t's GitHub App. `auth` and `integrations` are reserved names.
23 route("new/github", "routes/new-github.tsx"),
24 route("auth/github", "routes/auth-github.ts"),
25 route("auth/github/callback", "routes/auth-github-callback.tsx"),
26 route("auth/github/username", "routes/auth-github-username.tsx"),
27 // A workspace's single sign-on: setting off to its identity provider,
28 // coming back from it (OpenID Connect and OAuth 2.0), what a SAML sign-in
29 // that did not work says (the provider's POST is answered before React
30 // Router, workers/sso-saml.ts), and g1t's SAML metadata.
31 route("auth/sso/:owner", "routes/auth-sso.tsx"),
32 route("auth/sso/:owner/callback", "routes/auth-sso-callback.tsx"),
33 route("auth/sso/:owner/saml", "routes/auth-sso-saml.tsx"),
34 route("auth/sso/:owner/metadata", "routes/auth-sso-metadata.ts"),
35 route("integrations/github/install", "routes/github-install.ts"),
36 route("integrations/github/setup", "routes/github-setup.tsx"),
37 // Your own settings: one page each, so links can name the one they mean.
38 // `/settings` goes to the first; an old link's `#anchor` to its page.
39 route("settings", "routes/settings/layout.tsx", [
40 // Its pages fail inside its frame (routes/page-boundary.tsx).
41 layout("routes/page-boundary.tsx", { id: "routes/page-boundary/settings" }, [
42 index("routes/settings/index.tsx"),
43 route("profile", "routes/settings/profile.tsx"),
44 route("emails", "routes/settings/emails.tsx"),
45 route("notifications", "routes/settings/notifications.tsx"),
46 // Invite a friend: your invites to g1t.
47 route("invites", "routes/settings/invites.tsx"),
48 route("keys", "routes/settings/keys.tsx"),
49 // Your access tokens: the list, a new one, and each one's page.
50 route("tokens", "routes/settings/tokens.tsx"),
51 route("tokens/new", "routes/settings/token-new.tsx"),
52 route("tokens/:id", "routes/settings/token.tsx"),
53 route("github", "routes/settings/github.tsx"),
54 route("applications", "routes/settings/applications.tsx"),
55 route("integrations", "routes/settings/integrations.tsx"),
56 route("two-factor", "routes/settings/two-factor.tsx"),
57 route("security-log", "routes/settings/security-log.tsx"),
58 route("account", "routes/settings/account.tsx"),
59 ]),
60 ]),
61 // The account menu's header: name, primary email and invites left.
62 route("settings/menu.json", "routes/settings-menu-json.ts"),
63 // People, apart from workspaces: `u` is a reserved name. Their profile's
64 // tabs are paths (`/u/ada/pulls`); `?tab=` is sent on (lib/tab-paths.ts).
65 route("u/:username/:tab?", "routes/user.tsx"),
66 // The card that opens over a person's name or avatar (lib/hovercard.ts).
67 // `-` is no workspace's name, so nothing else is ever found here.
68 route("-/hovercard/user/:username", "routes/hovercard-user.ts"),
69 // A person's picture by username, for avatars drawn from a name alone.
70 route("-/avatar/user/:username", "routes/avatar-user.ts"),
71 // An image pasted, dropped or chosen in a comment box, kept for its Markdown.
72 route("-/attachments", "routes/attachments.ts"),
73 // Live notifications: each tab's feed socket, and the person's
74 // notification settings as JSON (services/notify).
75 route("-/live", "routes/notify/live.ts"),
76 // A page opened with an access token asks here for each socket's
77 // short-lived ticket (lib/socket-ticket.ts).
78 route("-/live/ticket", "routes/notify/ticket.ts"),
79 route("-/notify", "routes/notify/api.ts"),
80 route("explore", "routes/explore.tsx", { id: "explore" }),
81 route("pricing", "routes/pricing.tsx"),
82 route("features", "routes/features.tsx"),
83 route("search", "routes/search.tsx"),
84 // Each person's notifications, what the panel in the top bar fetches,
85 // and the address the page once had. Saved and Done are
86 // `/notifications/saved` and `/notifications/done`.
87 route("notifications/:view?", "routes/notifications.tsx"),
88 route("inbox", "routes/inbox-moved.ts"),
89 route("inbox.json", "routes/inbox-json.ts"),
90 // What the command palette shows as someone types.
91 route("search.json", "routes/search-json.ts"),
92 route("workspaces/new", "routes/workspace/new.tsx"),
93 // Workspace invitations waiting for the person's answer. `invitations` is reserved.
94 route("invitations", "routes/invitations.tsx"),
95 // People to invite, as the People page's invite form searches them.
96 route("-/people.json", "routes/people-json.ts"),
97 // The desktop app's runner: its registration token, and its reports (lib/desktop-runner.ts).
98 route("-/desktop/runner", "routes/desktop-runner.ts"),
99 // Trust pages: reserved names, like the rest above.
100 route("policies", "routes/policies.tsx"),
101 route("policies/:policy", "routes/policy.tsx"),
102 route("security", "routes/security.tsx"),
103 route("support", "routes/support.tsx"),
104 // Status moved to status.g1t.sh (apps/status); old links go there.
105 route("status", "routes/status.tsx"),
106 route("status.json", "routes/status-json.ts"),
107 route(".well-known/security.txt", "routes/security-txt.ts"),
108 // Where this g1t's parts are, for the phone app pointed at it (packages/contracts src/discovery.ts).
109 route(".well-known/g1t.json", "routes/well-known-g1t.ts"),
110 // For search engines: what may be crawled, and a map of the public pages.
111 route("robots.txt", "routes/robots-txt.ts"),
112 route("sitemap.xml", "routes/sitemap-xml.ts"),
113 // The desktop app: which to install, from its newest release.
114 route("download", "routes/download.tsx"),
115 // Releases of the desktop app, the self-hosted runner and the g1t CLI, from R2.
116 route("downloads/:tool/*", "routes/downloads-runner.ts"),
117 // The g1t CLI's install scripts, for Linux and macOS and for Windows. `install` is reserved.
118 route("install", "routes/install-script.ts", { id: "routes/install-sh" }),
119 route("install.ps1", "routes/install-script.ts", { id: "routes/install-ps1" }),
120 // A workspace's own pages sit under `-`, which no repository can be named.
121 route(":owner", "routes/workspace/layout.tsx", [
122 // Its pages fail inside its frame (routes/page-boundary.tsx).
123 layout("routes/page-boundary.tsx", { id: "routes/page-boundary/workspace" }, [
124 index("routes/workspace/overview.tsx"),
125 // Its pages, each in the sidebar: Overview (above), People, Insights; Teams and Packages below.
126 // Code's Repositories: every repository of the workspace the viewer can see.
127 route("-/code/repositories", "routes/workspace/code-repositories.tsx"),
128 // Where Code's Repositories were, as Projects, before Work's projects took the word.
129 route("-/projects", "routes/workspace/code-moved.ts"),
130 // People mode: the directory of people and each one's profile.
131 route("-/people", "routes/workspace/people.tsx"),
132 route("-/people/:username", "routes/workspace/people/person.tsx"),
133 // Workspace mode's Access: who is a member and their roles, the invitations sent, and who may do what.
134 route("-/settings/members", "routes/workspace/members.tsx"),
135 route("-/settings/members/invitations", "routes/workspace/member-invitations.tsx"),
136 route("-/settings/permissions", "routes/workspace/permissions.tsx"),
137 // Single sign-on through the workspace's own identity provider.
138 route("-/settings/sso", "routes/workspace/sso.tsx"),
139 route("-/insights", "routes/workspace/insights.tsx"),
140 // Pinning its repositories, for the person signed in.
141 route("-/pins", "routes/workspace/pins.ts"),
142 // Getting started, for its owners: the guide's state, and dismissing
143 // it or skipping a step (components/onboarding.tsx).
144 route("-/onboarding", "routes/workspace/onboarding.ts"),
145 // Code's Overview: Mission control's code panels, for this workspace.
146 route("-/overview", "routes/workspace/code-overview.tsx"),
147 // The workspace itself, at a glance: members, plan and spend.
148 // The workspace's settings, every page under `-/settings/`, open on its Profile.
149 route("-/settings", "routes/workspace/settings-index.ts"),
150 route("-/settings/authentication", "routes/workspace/authentication.tsx"),
151 // Teams: the list, a new one, and each team's pages.
152 route("-/teams", "routes/workspace/teams.tsx"),
153 route("-/teams/new", "routes/workspace/team-new.tsx"),
154 route("-/teams/:team", "routes/workspace/team/layout.tsx", [
155 index("routes/workspace/team/members.tsx"),
156 route("teams", "routes/workspace/team/teams.tsx"),
157 route("repositories", "routes/workspace/team/repositories.tsx"),
158 route("settings", "routes/workspace/team/settings.tsx"),
159 ]),
160 // The workspace's own access tokens: the list, a new one, and each one's page.
161 route("-/settings/tokens", "routes/workspace/tokens.tsx"),
162 route("-/settings/tokens/new", "routes/workspace/token-new.tsx"),
163 route("-/settings/tokens/:id", "routes/workspace/token.tsx"),
164 // Its rules for members' personal access tokens, and approving them.
165 route("-/settings/personal-access-tokens", "routes/workspace/personal-access-tokens.tsx"),
166 route("-/settings/usage", "routes/workspace/usage.tsx"),
167 route("-/settings/billing", "routes/workspace/billing.tsx"),
168 // What the workspace's AI providers say its organization spent, from
169 // their own cost reports (services/billing/src/provider_costs.rs).
170 route("-/settings/provider-costs", "routes/workspace/provider-costs.tsx"),
171 route("-/settings/billing/entries", "routes/workspace/statement-entries.ts"),
172 route("-/settings/billing/statement.csv", "routes/workspace/statement-csv.ts"),
173 // The workspace's AI: its AI providers, managed or self-hosted, and
174 // what Ask answers with. A base setting, not an integration.
175 route("-/settings/ai", "routes/workspace/ai.tsx"),
176 // The integrations directory, and the setup pages for alerts and
177 // trackers (lib/integration-sections).
178 route("-/settings/integrations", "routes/workspace/integrations-directory.tsx"),
179 route("-/settings/integrations/github", "routes/workspace/integration-github.tsx"),
180 route("-/settings/integrations/:section", "routes/workspace/integrations.tsx"),
181 // Ask g1t: what it answers with (Chat's New with no repository), and
182 // starting a session it proposed (components/chat/agent-composer).
183 route("-/ask", "routes/workspace/ask.ts"),
184 route("-/settings/webhooks", "routes/workspace/webhooks.tsx"),
185 // The workspace's own emoji, for chat (components/emoji).
186 route("-/settings/emoji", "routes/workspace/emoji.tsx"),
187 route("-/settings/secrets", "routes/workspace/secrets.tsx"),
188 route("-/settings/runners", "routes/workspace/runners.tsx"),
189 route("-/settings/actions", "routes/workspace/actions-settings.tsx"),
190 route("-/packages", "routes/workspace/packages.tsx"),
191 route("-/packages/:ecosystem/*", "routes/workspace/package.tsx"),
192 route("-/settings/profile", "routes/workspace/settings.tsx"),
193 // What members may do in chat: channels, emoji, default channels.
194 route("-/settings/chat", "routes/workspace/chat-settings.tsx"),
195 route("-/settings/work", "routes/workspace/work-settings.tsx"),
196 route("-/settings/repositories", "routes/workspace/repositories.tsx"),
197 // Chat mode: channels by name, direct messages by id, and what the page
198 // calls as it runs: the live socket and the JSON for sending and reading.
199 route("-/chat/live", "routes/workspace/chat/live.ts"),
200 route("-/chat/api", "routes/workspace/chat/api.ts"),
201 // A person's card in Chat: their profile and teams here.
202 route("-/chat/person/:username", "routes/workspace/chat/person.ts"),
203 // A work item or pull request's card, over its chip in chat and g1t's answers.
204 route("-/chat/ref", "routes/workspace/chat/ref.ts"),
205 // Chat's sessions: what agents are doing, beside the people you talk to.
206 // Ahead of the channels, and `sessions` is no channel's name.
207 route("-/chat/sessions", "routes/workspace/work/sessions/list.tsx"),
208 route("-/chat/sessions/:id", "routes/workspace/work/sessions/session.tsx"),
209 // What a running hosted session's page asks every few seconds, so it streams.
210 route("-/chat/sessions/:id/follow", "routes/workspace/chat/session-follow.ts"),
211 // What Chat's New needs to start an agent conversation, and starting it
212 // (under `api`, which no channel may be named).
213 route("-/chat/api/agent", "routes/workspace/chat/agent.ts"),
214 // The hosted sessions' calls waiting on the viewer's approval, for Needs attention.
215 route("-/approvals.json", "routes/workspace/approvals-json.ts"),
216 // Allowing or denying one of them from its Needs attention card, on any page.
217 route("-/approvals", "routes/workspace/approvals.ts"),
218 // The viewer's recent agent sessions with their status, for Recents in Chat's sidebar.
219 route("-/recents.json", "routes/workspace/recents-json.ts"),
220 route("-/chat", "routes/workspace/chat/layout.tsx", [
221 index("routes/workspace/chat/index.tsx"),
222 route("browse", "routes/workspace/chat/browse.tsx"),
223 route("dm/:id", "routes/workspace/chat/channel.tsx", { id: "routes/workspace/chat/dm" }),
224 route(":channel", "routes/workspace/chat/channel.tsx"),
225 ]),
226 // The Library, and its artifacts (code says "folio"): what their
227 // pages call as they run (an artifact's live socket, JSON, comments,
228 // uploads, export), then Home, making one, templates, the trash, the
229 // spaces, and each artifact by its address. Addresses are flat and end
230 // in the id, so renaming or moving one keeps links working.
231 route("-/library/artifacts/live", "routes/workspace/folios/live.ts"),
232 route("-/library/artifacts/api", "routes/workspace/folios/api.ts"),
233 route("-/library/artifacts/threads/:folio/*", "routes/workspace/folios/threads.ts"),
234 route("-/library/artifacts/upload", "routes/workspace/folios/upload.ts"),
235 route("-/library/artifacts/export", "routes/workspace/folios/export.ts"),
236 // Artifacts were at `-/artifacts` before the Library: a page opened
237 // then still calls these there, and every other old address, and
238 // `-/library` itself, goes on to its place in the Library.
239 route("-/artifacts/live", "routes/workspace/folios/live.ts", { id: "routes/workspace/folios/live-before-library" }),
240 route("-/artifacts/api", "routes/workspace/folios/api.ts", { id: "routes/workspace/folios/api-before-library" }),
241 route("-/artifacts/threads/:folio/*", "routes/workspace/folios/threads.ts", { id: "routes/workspace/folios/threads-before-library" }),
242 route("-/artifacts/upload", "routes/workspace/folios/upload.ts", { id: "routes/workspace/folios/upload-before-library" }),
243 route("-/artifacts/export", "routes/workspace/folios/export.ts", { id: "routes/workspace/folios/export-before-library" }),
244 route("-/artifacts/*", "routes/workspace/folios/moved.ts", { id: "routes/workspace/folios/moved-pages" }),
245 route("-/artifacts", "routes/workspace/folios/moved.ts", { id: "routes/workspace/folios/moved-home" }),
246 route("-/library", "routes/workspace/folios/moved.ts", { id: "routes/workspace/folios/library" }),
247 route("-/library/artifacts", "routes/workspace/folios/layout.tsx", [
248 index("routes/workspace/folios/home.tsx"),
249 route("new/:kind", "routes/workspace/folios/new.tsx"),
250 route("templates", "routes/workspace/folios/templates.tsx"),
251 route("trash", "routes/workspace/folios/trash.tsx"),
252 // Artifacts possibly out of date, and a project's docs folder, read-only.
253 route("stale", "routes/workspace/folios/stale.tsx"),
254 route("spaces", "routes/workspace/folios/spaces.tsx"),
255 route("spaces/new", "routes/workspace/folios/space-new.tsx"),
256 route("spaces/:space", "routes/workspace/folios/space.tsx"),
257 route("spaces/:space/settings", "routes/workspace/folios/space-settings.tsx"),
258 route("repo/:repoOwner/:repoName/*", "routes/workspace/folios/repo-file.tsx"),
259 route(":folio", "routes/workspace/folios/folio.tsx"),
260 route(":folio/history", "routes/workspace/folios/history.tsx"),
261 ]),
262 // Home, the workspace's front page (`-/today` leads there), where it
263 // marks your visit, and every app in it you can use, with pinning them
264 // to your rail.
265 route("-/home", "routes/workspace/home.tsx"),
266 route("-/home/seen", "routes/workspace/home-seen.ts"),
267 // Work: the workspace's work items, for every member. It opens on the
268 // plan (Now, Next, Later; `-/work` with the list's filters is an old
269 // link to the list, and goes there), with one Later group's items and
270 // Triage, the new ones nobody has placed. Then the list of all of them
271 // (its filters in the address), the board of them as they move, a new
272 // one, the labels and milestones they share with pull requests, `#12`
273 // read in the workspace, and each item. Sessions are Work's too: what
274 // is cooking across the workspace, in every repository of it the
275 // viewer may read (live sessions of every kind, the merge queues, what
276 // landed and what happened), and one session's page.
277 route("-/work", "routes/workspace/work/plan.tsx"),
278 route("-/work/plan/later", "routes/workspace/work/plan-later.ts"),
279 route("-/work/triage", "routes/workspace/work/triage.tsx"),
280 route("-/work/all", "routes/workspace/work/list.tsx"),
281 route("-/work/board", "routes/workspace/work/board.tsx"),
282 // Sessions were Work's: their old addresses lead to Chat, where they are now.
283 route("-/work/sessions", "routes/workspace/work/sessions/moved.ts", { id: "routes/workspace/work/sessions/moved-list" }),
284 route("-/work/sessions/:id", "routes/workspace/work/sessions/moved.ts", { id: "routes/workspace/work/sessions/moved-session" }),
285 route("-/work/new", "routes/workspace/work/new.tsx"),
286 route("-/work/labels", "routes/workspace/work/labels.tsx"),
287 route("-/work/milestones", "routes/workspace/work/milestones.tsx"),
288 route("-/work/milestones/:number", "routes/workspace/work/milestone.tsx"),
289 // Projects: homes for bodies of work, each with its brief, people and
290 // items. The list (and making one), the live ones for the sidebar,
291 // and each project's Overview and Items.
292 route("-/work/projects", "routes/workspace/work/projects.tsx"),
293 route("-/work/projects.json", "routes/workspace/work/projects-json.ts"),
294 route("-/work/projects/:slug", "routes/workspace/work/project.tsx"),
295 route("-/work/projects/:slug/items", "routes/workspace/work/project-items.tsx"),
296 // Cycles: the current one (what Now is while cycles are on), planning
297 // the next, the sidebar's row, and each past one with its report.
298 route("-/work/cycle", "routes/workspace/work/cycle.tsx"),
299 route("-/work/cycle.json", "routes/workspace/work/cycle-json.ts"),
300 route("-/work/cycle/plan", "routes/workspace/work/cycle-plan.tsx"),
301 route("-/work/cycles", "routes/workspace/work/cycles-index.ts"),
302 route("-/work/cycles/:number", "routes/workspace/work/cycle.tsx", { id: "routes/workspace/work/cycle-number" }),
303 // Work items to choose from in a work item's pickers, and the plan's order for J and K.
304 route("-/work/items.json", "routes/workspace/work/items-json.ts"),
305 route("-/work/ref/:number", "routes/workspace/work/ref.ts"),
306 route("-/work/:number", "routes/workspace/work/item.tsx"),
307 route("-/today", "routes/workspace/moved.ts", { id: "routes/workspace/moved-today" }),
308 route("-/apps", "routes/workspace/apps.tsx"),
309 // Routines: standing work for @g1t, on a schedule or when something
310 // happens. Not on yet: the page shows what it will be, every control off.
311 route("-/routines", "routes/workspace/routines.tsx"),
312 // What Code's pages say to a member without Code.
313 route("-/code-access", "routes/workspace/code-access.tsx"),
314 route("-/security", "routes/workspace/security.tsx"),
315 route("-/security/patterns", "routes/workspace/security-patterns.tsx"),
316 route("-/security/bypass-requests", "routes/workspace/security-bypass.tsx"),
317 route("-/settings/security", "routes/workspace/security-settings.tsx"),
318 route("-/settings/audit", "routes/workspace/audit.tsx"),
319 route("-/settings/audit/export", "routes/workspace/audit-export.ts"),
320 route("-/settings/guardrails", "routes/workspace/guardrails.tsx"),
321 route("-/settings/rules", "routes/workspace/rules.tsx"),
322 route("-/settings/rules/insights", "routes/workspace/rules.tsx", { id: "routes/workspace/rules-insights" }),
323 route("-/settings/rules/:id", "routes/workspace/ruleset.tsx"),
324 // What the workspace will have across its repositories.
325 route("-/soon/:feature", "routes/workspace/soon.tsx"),
326 ]),
327 ]),
328 // `#12` read in a repository: where Markdown's `#12` leads, and, as JSON,
329 // the card over a `#12` in a commit message or on a timeline.
330 route(":owner/:repo/ref/:number", "routes/repo/ref-card.ts"),
331 // A repository's issues, labels and milestones moved to its workspace's
332 // Work: old links are sent on (routes/repo/moved-work.ts), before the
333 // repository's own pages.
334 route(":owner/:repo/issues", "routes/repo/moved-work.ts", { id: "routes/repo/moved-issues" }),
335 route(":owner/:repo/issues/new", "routes/repo/moved-work.ts", { id: "routes/repo/moved-issue-new" }),
336 route(":owner/:repo/issues/:number", "routes/repo/moved-work.ts", { id: "routes/repo/moved-issue" }),
337 route(":owner/:repo/labels", "routes/repo/moved-work.ts", { id: "routes/repo/moved-labels" }),
338 route(":owner/:repo/milestones", "routes/repo/moved-work.ts", { id: "routes/repo/moved-milestones" }),
339 route(":owner/:repo/milestones/:number", "routes/repo/moved-work.ts", { id: "routes/repo/moved-milestone" }),
340 // Why a line is the way it is, fetched by the blame view.
341 route(":owner/:repo/why/:hash", "routes/repo/why.ts"),
342 // Files of a large change with their lines, fetched as the diff view reaches them.
343 route(":owner/:repo/diff-files.json", "routes/repo/diff-files.ts"),
344 // Its branch names, for changing the branch a pull request merges into.
345 route(":owner/:repo/branches.json", "routes/repo/branch-names.ts"),
346 // An invitation to a repository, answered by someone who cannot see it yet.
347 route(":owner/:repo/invitations", "routes/repo/invitations.tsx"),
348 // The Files page's About as JSON, asked again while it is first worked out.
349 route(":owner/:repo/about.json", "routes/repo/about-json.ts"),
350 // Starring it, from the header's Star button.
351 route(":owner/:repo/star", "routes/repo/star.ts"),
352 // Bringing a fork's branch up to date with its parent's (components/fork-bar.tsx).
353 route(":owner/:repo/sync-fork", "routes/repo/sync-fork.ts"),
354 // Subscribing to its work items and pull requests, and watching it.
355 route(":owner/:repo/notifications", "routes/repo/notifications.ts"),
356 // A starter CI workflow, opened as a pull request (components/add-ci.tsx).
357 route(":owner/:repo/add-ci", "routes/repo/add-ci.ts"),
358 // A screenshot of a project's production, for its overview.
359 route(":owner/:repo/production.jpg", "routes/repo/production-screenshot.ts"),
360 // The same, of production deployed elsewhere, at its address.
361 route(":owner/:repo/production-elsewhere.jpg", "routes/repo/production-elsewhere.ts"),
362 // A file as it is, sent on to the usercontent origin (lib/usercontent.ts).
363 route(":owner/:repo/raw/:ref/*", "routes/repo/raw.ts"),
364 // A file's blame as JSON, fetched by its blame view (routes/repo/blob.tsx).
365 route(":owner/:repo/blame/:ref/*", "routes/repo/blame-data.ts"),
366 // A project: its overview first, its repository's code under Code. The
367 // 1:1 project of a repository has the repository's name, so every
368 // repository address below keeps working.
369 route(":owner/:repo", "routes/repo/layout.tsx", [
370 // Its pages fail inside its frame (routes/page-boundary.tsx).
371 layout("routes/page-boundary.tsx", { id: "routes/page-boundary/repo" }, [
372 index("routes/repo/overview.tsx"),
373 route("code", "routes/repo/code.tsx"),
374 route("tree/:ref/*", "routes/repo/tree.tsx"),
375 route("blob/:ref/*", "routes/repo/blob.tsx"),
376 route("archive/*", "routes/repo/archive.ts"),
377 route("commits", "routes/repo/commits.tsx"),
378 // Its tabs are paths: `branches/yours`, `branches/stale`, ….
379 route("branches/:tab?", "routes/repo/branches.tsx"),
380 route("tags", "routes/repo/tags.tsx"),
381 route("releases", "routes/repo/releases.tsx"),
382 route("releases/new", "routes/repo/release-new.tsx"),
383 route("releases/tag/*", "routes/repo/release.tsx"),
384 route("contributors", "routes/repo/contributors.tsx"),
385 route("activity", "routes/repo/activity.tsx"),
386 route("stargazers", "routes/repo/stargazers.tsx"),
387 // Forking it into a workspace, and the forks there are.
388 route("fork", "routes/repo/fork.tsx"),
389 route("forks", "routes/repo/forks.tsx"),
390 route("compare/*", "routes/repo/compare.tsx", { id: "routes/repo/compare-range" }),
391 route("compare", "routes/repo/compare.tsx"),
392 route("commit/:hash", "routes/repo/commit.tsx"),
393 // A check run reported on a commit: its report, annotations and buttons.
394 route("checks/:id", "routes/repo/check-run.tsx"),
395 route("pulls", "routes/repo/pulls.tsx"),
396 route("pulls/new", "routes/repo/pull-new.tsx"),
397 // Its tabs are paths: `pull/12/session`, `pull/12/files`.
398 route("pull/:number/:tab?", "routes/repo/pull.tsx"),
399 route("queue", "routes/repo/queue.tsx"),
400 route("usage", "routes/repo/usage.tsx"),
401 route("actions", "routes/repo/actions.tsx"),
402 route("actions/runs/:id", "routes/repo/actions-run.tsx"),
403 route("actions/runs/:id/artifacts/:name", "routes/repo/actions-artifact.ts"),
404 route("actions/jobs/:job/log", "routes/repo/actions-log.ts"),
405 route("actions/jobs/:job/log.txt", "routes/repo/actions-job-log-download.ts"),
406 route("actions/runs/:id/logs.zip", "routes/repo/actions-logs-download.ts"),
407 route("actions/workflows/:file/badge.svg", "routes/repo/actions-badge.ts"),
408 route("deployments", "routes/repo/deployments.tsx"),
409 route("deployments/:id", "routes/repo/deployment.tsx"),
410 // Observability: what the project's running software did (services/telemetry).
411 route("observability", "routes/repo/observability.tsx"),
412 route("observability/requests", "routes/repo/observability-requests.tsx"),
413 route("observability/requests/:id", "routes/repo/observability-request.tsx"),
414 route("observability/logs", "routes/repo/observability-logs.tsx"),
415 route("observability/traces", "routes/repo/observability-traces.tsx"),
416 route("observability/traces/:trace", "routes/repo/observability-trace.tsx"),
417 route("observability/errors", "routes/repo/observability-errors.tsx"),
418 route("observability/metrics", "routes/repo/observability-metrics.tsx"),
419 route("observability/settings", "routes/repo/observability-settings.tsx"),
420 // The live tail's socket, forwarded to the project's store.
421 route("observability/live", "routes/repo/observability-live.ts"),
422 // Security: an overview, then a page for each part. Old links to
423 // `security?tab=…` are sent on by the overview.
424 route("security", "routes/repo/security-overview.tsx"),
425 route("security/secret-scanning", "routes/repo/security-secrets.tsx"),
426 route("security/secret-scanning/patterns", "routes/repo/security-patterns.tsx"),
427 route("security/secret-scanning/:id", "routes/repo/security-secret.tsx"),
428 route("security/code-scanning", "routes/repo/security-code.tsx"),
429 route("security/code-scanning/setup", "routes/repo/security-code-setup.ts"),
430 route("security/code-scanning/:number", "routes/repo/security-code-alert.tsx"),
431 route("security/vulnerabilities", "routes/repo/security.tsx"),
432 route("security/dependency-graph", "routes/repo/security-graph.tsx"),
433 route("security/dependency-graph/sbom.json", "routes/repo/security-sbom.ts"),
434 route("security/dependency-updates", "routes/repo/security-updates.tsx"),
435 route("security/pulls/:number", "routes/repo/security-pull.tsx"),
436 route("security/settings", "routes/repo/security-settings.tsx"),
437 // Reporting: the policy's pull request, advisories, and private vulnerability reports.
438 route("security/policy/setup", "routes/repo/security-policy-setup.ts"),
439 route("security/advisories", "routes/repo/security-advisories.tsx"),
440 route("security/advisories/new", "routes/repo/security-advisory-edit.tsx", { id: "routes/repo/security-advisory-new" }),
441 route("security/advisories/:id", "routes/repo/security-advisory.tsx"),
442 route("security/advisories/:id/edit", "routes/repo/security-advisory-edit.tsx"),
443 route("security/reports", "routes/repo/security-reports.tsx"),
444 route("security/report", "routes/repo/security-report.tsx"),
445 route("settings", "routes/repo/settings.tsx"),
446 route("settings/repository", "routes/repo/settings-repository.tsx"),
447 route("settings/access", "routes/repo/settings-access.tsx"),
448 route("settings/keys", "routes/repo/settings-deploy-keys.tsx"),
449 route("settings/branches", "routes/repo/settings-branches.tsx"),
450 route("settings/rules", "routes/repo/settings-rules.tsx"),
451 route("settings/rules/insights", "routes/repo/settings-rules.tsx", { id: "routes/repo/settings-rules-insights" }),
452 route("settings/rules/:id", "routes/repo/settings-ruleset.tsx"),
453 route("settings/webhooks", "routes/repo/webhooks.tsx"),
454 route("settings/secrets", "routes/repo/secrets.tsx"),
455 route("settings/actions", "routes/repo/settings-actions.tsx"),
456 route("settings/environments", "routes/repo/settings-environments.tsx"),
457 route("settings/runners", "routes/repo/settings-runners.tsx"),
458 route("settings/deployments", "routes/repo/settings-deployments.tsx"),
459 route("settings/domains", "routes/repo/settings-domains.tsx"),
460 route("settings/guardrails", "routes/repo/settings-guardrails.tsx"),
461 // What the project will have: one page for each Soon in its menu.
462 route("soon/:feature", "routes/repo/soon.tsx"),
463 ]),
464 ]),
465 // Anything else: a 404 that still knows who is signed in.
466 route("*", "routes/not-found.tsx"),
467] satisfies RouteConfig;