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.
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 1 | import { data } from "react-router"; |
| 2 | ||
| 3 | import type { Route } from "./+types/tab-soon"; | |
| 4 | import { page } from "../../lib/meta"; | |
| 5 | import { roadmapItem } from "../../lib/roadmap"; | |
| 6 | import { getViewer, roleIn } from "../../lib/session.server"; | |
| Billing: credits with a kind and expiry, discounts instead of comped, and safer charging | 7 | import { pagePath } from "../../lib/workspace-nav"; |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 8 | import { SoonView } from "../repo/soon"; |
| 9 | ||
| Merge branch 'worktree-agent-ad7c6d88d93adc817' | 10 | /** The page is the last part of the address: `-/insights`. */ |
| Billing: credits with a kind and expiry, discounts instead of comped, and safer charging | 11 | const tabOf = (pathname: string) => pagePath(pathname).split("/").pop() ?? ""; |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 12 | |
| 13 | export function meta({ params, ...args }: Route.MetaArgs) { | |
| 14 | const item = roadmapItem(tabOf(args.location.pathname)); | |
| 15 | return page(args, { | |
| 16 | title: `${item?.title ?? "Soon"} · ${params.owner} · g1t`, | |
| 17 | description: item ? `Soon on g1t: ${item.summary}` : null, | |
| 18 | }); | |
| 19 | } | |
| 20 | ||
| 21 | export function loader({ params, context, request }: Route.LoaderArgs) { | |
| Merge branch 'worktree-agent-ad7c6d88d93adc817' | 22 | // For the workspace's members, as its People and Teams are. |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 23 | if (!roleIn(getViewer(context), params.owner)) throw data(null, { status: 404 }); |
| 24 | const item = roadmapItem(tabOf(new URL(request.url).pathname)); | |
| 25 | if (!item || item.section !== "Workspace") throw data(null, { status: 404 }); | |
| 26 | return { item }; | |
| 27 | } | |
| 28 | ||
| Merge branch 'worktree-agent-ad7c6d88d93adc817' | 29 | /** A page of the workspace's that is coming: Insights. */ |
| Navigation: the workspace's own page with tabs, pins and recent in the sidebar | 30 | export default function WorkspaceTabSoon({ loaderData, params }: Route.ComponentProps) { |
| 31 | return <SoonView item={loaderData.item} base={`/${params.owner}/-`} newProject={`/new?workspace=${params.owner}`} />; | |
| 32 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.