diff --git a/apps/webservice/next.config.js b/apps/webservice/next.config.js index 03de3b80c..143972219 100644 --- a/apps/webservice/next.config.js +++ b/apps/webservice/next.config.js @@ -26,7 +26,7 @@ const config = { experimental: { turbo: {}, - reactCompiler: true, + reactCompiler: false, optimizePackageImports: ["googleapis"], }, diff --git a/apps/webservice/package.json b/apps/webservice/package.json index 68b0fd7b6..40f22a015 100644 --- a/apps/webservice/package.json +++ b/apps/webservice/package.json @@ -102,7 +102,6 @@ "@types/uuid": "^10.0.0", "@xterm/addon-webgl": "^0.18.0", "atlassian-openapi": "^1.0.21", - "babel-plugin-react-compiler": "19.0.0-beta-40c6c23-20250301", "dotenv-cli": "catalog:", "eslint": "catalog:", "jiti": "^1.21.7", diff --git a/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/agents/AgentCard.tsx b/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/job-agents/AgentCard.tsx similarity index 100% rename from apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/agents/AgentCard.tsx rename to apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/job-agents/AgentCard.tsx diff --git a/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/agents/_hooks/useJobStats.ts b/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/job-agents/_hooks/useJobStats.ts similarity index 100% rename from apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/agents/_hooks/useJobStats.ts rename to apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/job-agents/_hooks/useJobStats.ts diff --git a/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/agents/page.tsx b/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/job-agents/page.tsx similarity index 87% rename from apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/agents/page.tsx rename to apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/job-agents/page.tsx index 93810760e..0b7d78a92 100644 --- a/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/agents/page.tsx +++ b/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/job-agents/page.tsx @@ -17,21 +17,23 @@ import { Sidebars } from "~/app/[workspaceSlug]/sidebars"; import { api } from "~/trpc/server"; import { AgentCard } from "./AgentCard"; -export const generateMetadata = async (props: { +export const generateMetadata = async ({ + params, +}: { params: { workspaceSlug: string }; }): Promise => { - try { - const workspace = await api.workspace.bySlug(props.params.workspaceSlug); - return { - title: `Agents | ${workspace?.name ?? props.params.workspaceSlug} | Ctrlplane`, - description: `Manage deployment agents for the ${workspace?.name ?? props.params.workspaceSlug} workspace.`, - }; - } catch { - return { + const { workspaceSlug } = params; + + return api.workspace + .bySlug(workspaceSlug) + .then((workspace) => ({ + title: `Agents | ${workspace?.name ?? workspaceSlug} | Ctrlplane`, + description: `Manage deployment agents for the ${workspace?.name ?? workspaceSlug} workspace.`, + })) + .catch(() => ({ title: "Agents | Ctrlplane", description: "Manage and monitor deployment agents in Ctrlplane.", - }; - } + })); }; export default async function AgentsPage(props: { diff --git a/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/page.tsx b/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/page.tsx index 0cfa682fe..3e2f22196 100644 --- a/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/page.tsx +++ b/apps/webservice/src/app/[workspaceSlug]/(app)/(deploy)/(sidebar)/systems/page.tsx @@ -4,21 +4,23 @@ import { notFound } from "next/navigation"; import { api } from "~/trpc/server"; import { SystemsPageContent } from "./SystemsPageContent"; -export const generateMetadata = async (props: { +export const generateMetadata = async ({ + params, +}: { params: { workspaceSlug: string }; }): Promise => { - try { - const workspace = await api.workspace.bySlug(props.params.workspaceSlug); - return { - title: `Systems | ${workspace?.name ?? props.params.workspaceSlug} | Ctrlplane`, - description: `Manage and deploy systems for the ${workspace?.name ?? props.params.workspaceSlug} workspace.`, - }; - } catch { - return { + const { workspaceSlug } = params; + + return api.workspace + .bySlug(workspaceSlug) + .then((workspace) => ({ + title: `Systems | ${workspace?.name ?? workspaceSlug} | Ctrlplane`, + description: `Manage and deploy systems for the ${workspace?.name ?? workspaceSlug} workspace.`, + })) + .catch(() => ({ title: "Systems | Ctrlplane", description: "Manage and deploy your systems with Ctrlplane.", - }; - } + })); }; export default async function SystemsPage(props: { diff --git a/apps/webservice/src/app/[workspaceSlug]/(app)/insights/page.tsx b/apps/webservice/src/app/[workspaceSlug]/(app)/insights/page.tsx index a9f78923c..2d4aa9e3c 100644 --- a/apps/webservice/src/app/[workspaceSlug]/(app)/insights/page.tsx +++ b/apps/webservice/src/app/[workspaceSlug]/(app)/insights/page.tsx @@ -19,22 +19,24 @@ import { WorkspaceResources } from "./overview-cards/WorkspaceResources"; import { ResourceTypeBreakdown } from "./ResourceTypeBreakdown"; import { SystemHealthOverview } from "./SystemHealthOverview"; -export const generateMetadata = async (props: { +export const generateMetadata = async ({ + params, +}: { params: { workspaceSlug: string }; }): Promise => { - try { - const workspace = await api.workspace.bySlug(props.params.workspaceSlug); - return { - title: `Insights | ${workspace?.name ?? props.params.workspaceSlug} | Ctrlplane`, - description: `Analytics and performance metrics for the ${workspace?.name ?? props.params.workspaceSlug} workspace.`, - }; - } catch { - return { + const { workspaceSlug } = params; + + return api.workspace + .bySlug(workspaceSlug) + .then((workspace) => ({ + title: `Insights | ${workspace?.name ?? workspaceSlug} | Ctrlplane`, + description: `Analytics and performance metrics for the ${workspace?.name ?? workspaceSlug} workspace.`, + })) + .catch(() => ({ title: "Insights | Ctrlplane", description: "Analytics and performance metrics for your Ctrlplane workspace.", - }; - } + })); }; type Props = { diff --git a/apps/webservice/src/app/urls.ts b/apps/webservice/src/app/urls.ts index ef6c7d854..9bf4b8203 100644 --- a/apps/webservice/src/app/urls.ts +++ b/apps/webservice/src/app/urls.ts @@ -50,10 +50,10 @@ const workspace = (slug: string) => { }; const workspaceJobAgents = (slug: string) => { - const base = [slug, "agents"]; + const base = [slug, "job-agents"]; return { baseUrl: () => buildUrl(...base), - integrations: () => buildUrl(...base, "integrations"), + integrations: () => workspaceSettingsIntegrations(slug), }; }; diff --git a/apps/webservice/src/components/form/job-agent/JobAgentSelector.tsx b/apps/webservice/src/components/form/job-agent/JobAgentSelector.tsx index 85b823810..df605b64e 100644 --- a/apps/webservice/src/components/form/job-agent/JobAgentSelector.tsx +++ b/apps/webservice/src/components/form/job-agent/JobAgentSelector.tsx @@ -53,7 +53,7 @@ export const JobAgentSelector: React.FC<{ onChange={onChange} />