Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(frontend): Page-specific titles (#9995)

Reinier van der Leer45578136e3a0
diff --git a/autogpt_platform/autogpt_libs/README.md b/autogpt_platform/autogpt_libs/README.md
index e2d6a5e67e..6b929f2a4b 100644
--- a/autogpt_platform/autogpt_libs/README.md
+++ b/autogpt_platform/autogpt_libs/README.md
@@ -1,3 +1,3 @@
# AutoGPT Libs
-This is a new project to store shared functionality across different services in NextGen AutoGPT (e.g. authentication)
+This is a new project to store shared functionality across different services in the AutoGPT Platform (e.g. authentication)
diff --git a/autogpt_platform/frontend/src/app/(platform)/build/page.tsx b/autogpt_platform/frontend/src/app/(platform)/build/page.tsx
index ac5d9aca0d..e4a001819f 100644
--- a/autogpt_platform/frontend/src/app/(platform)/build/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/build/page.tsx
@@ -6,7 +6,7 @@ import FlowEditor from "@/components/Flow";
import { useOnboarding } from "@/components/onboarding/onboarding-provider";
import { useEffect } from "react";
-export default function Home() {
+export default function BuilderPage() {
const query = useSearchParams();
const { completeStep } = useOnboarding();
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/page.tsx b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/page.tsx
index 5609e26f4b..9b98c328bb 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/agents/[id]/page.tsx
@@ -72,6 +72,13 @@ export default function AgentRunsPage(): React.ReactElement {
useOnboarding();
const [copyAgentDialogOpen, setCopyAgentDialogOpen] = useState(false);
+ // Set page title with agent name
+ useEffect(() => {
+ if (agent) {
+ document.title = `${agent.name} - Library - AutoGPT Platform`;
+ }
+ }, [agent]);
+
const openRunDraftView = useCallback(() => {
selectView({ type: "run" });
}, []);
diff --git a/autogpt_platform/frontend/src/app/(platform)/library/page.tsx b/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
index 1dfcc2f697..5fa9804b12 100644
--- a/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/library/page.tsx
@@ -1,4 +1,5 @@
import Link from "next/link";
+import { Metadata } from "next/types";
import {
ArrowBottomRightIcon,
@@ -11,11 +12,15 @@ import LibraryActionSubHeader from "@/components/library/library-action-sub-head
import LibraryActionHeader from "@/components/library/library-action-header";
import LibraryAgentList from "@/components/library/library-agent-list";
+export const metadata: Metadata = {
+ title: "Library - AutoGPT Platform",
+ description: "Your collection of Agents on the AutoGPT Platform",
+};
+
/**
* LibraryPage Component
* Main component that manages the library interface including agent listing and actions
*/
-
export default function LibraryPage() {
return (
<main className="container min-h-screen space-y-4 pb-20 sm:px-8 md:px-12">
diff --git a/autogpt_platform/frontend/src/app/(platform)/marketplace/page.tsx b/autogpt_platform/frontend/src/app/(platform)/marketplace/page.tsx
index 1336c71f05..b434567e45 100644
--- a/autogpt_platform/frontend/src/app/(platform)/marketplace/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/marketplace/page.tsx
@@ -102,9 +102,9 @@ async function getStoreData() {
// FIX: Correct metadata
export const metadata: Metadata = {
- title: "Marketplace - NextGen AutoGPT",
+ title: "Marketplace - AutoGPT Platform",
description: "Find and use AI Agents created by our community",
- applicationName: "NextGen AutoGPT Store",
+ applicationName: "AutoGPT Marketplace",
authors: [{ name: "AutoGPT Team" }],
keywords: [
"AI agents",
@@ -118,22 +118,22 @@ export const metadata: Metadata = {
follow: true,
},
openGraph: {
- title: "Marketplace - NextGen AutoGPT",
+ title: "Marketplace - AutoGPT Platform",
description: "Find and use AI Agents created by our community",
type: "website",
- siteName: "NextGen AutoGPT Store",
+ siteName: "AutoGPT Marketplace",
images: [
{
url: "/images/store-og.png",
width: 1200,
height: 630,
- alt: "NextGen AutoGPT Store",
+ alt: "AutoGPT Marketplace",
},
],
},
twitter: {
card: "summary_large_image",
- title: "Marketplace - NextGen AutoGPT",
+ title: "Marketplace - AutoGPT Platform",
description: "Find and use AI Agents created by our community",
images: ["/images/store-twitter.png"],
},
diff --git a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/api_keys/page.tsx b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/api_keys/page.tsx
index 87f3d58b4e..0d1b05e882 100644
--- a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/api_keys/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/api_keys/page.tsx
@@ -1,5 +1,8 @@
+import { Metadata } from "next/types";
import { APIKeysSection } from "@/components/agptui/composite/APIKeySection";
+export const metadata: Metadata = { title: "API Keys - AutoGPT Platform" };
+
const ApiKeysPage = () => {
return (
<div className="w-full pr-4 pt-24 md:pt-0">
diff --git a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/credits/page.tsx b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/credits/page.tsx
index 5ca249f489..8574b02aef 100644
--- a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/credits/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/credits/page.tsx
@@ -1,5 +1,5 @@
"use client";
-import { useEffect, useState, useCallback } from "react";
+import { useEffect, useState } from "react";
import { Button } from "@/components/ui/button";
import useCredits from "@/hooks/useCredits";
import { useBackendAPI } from "@/lib/autogpt-server-api/context";
diff --git a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/page.tsx b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/page.tsx
index 14874dfa54..92df380cfe 100644
--- a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/page.tsx
@@ -1,4 +1,5 @@
import * as React from "react";
+import { Metadata } from "next/types";
import { ProfileInfoForm } from "@/components/agptui/ProfileInfoForm";
import BackendAPI from "@/lib/autogpt-server-api";
import { CreatorDetails } from "@/lib/autogpt-server-api/types";
@@ -17,6 +18,8 @@ async function getProfileData(api: BackendAPI) {
}
}
+export const metadata: Metadata = { title: "Profile - AutoGPT Platform" };
+
export default async function Page({}: {}) {
const api = new BackendAPI();
const { profile } = await getProfileData(api);
diff --git a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/settings/page.tsx b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/settings/page.tsx
index 428b98b077..21898fe0ca 100644
--- a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/settings/page.tsx
+++ b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/settings/page.tsx
@@ -4,8 +4,9 @@ import SettingsForm from "@/components/profile/settings/SettingsForm";
import getServerUser from "@/lib/supabase/getServerUser";
import { redirect } from "next/navigation";
import { getUserPreferences } from "./actions";
+
export const metadata: Metadata = {
- title: "Settings",
+ title: "Settings - AutoGPT Platform",
description: "Manage your account settings and preferences.",
};
diff --git a/autogpt_platform/frontend/src/app/layout.tsx b/autogpt_platform/frontend/src/app/layout.tsx
index 5017a8366a..6579144c99 100644
--- a/autogpt_platform/frontend/src/app/layout.tsx
+++ b/autogpt_platform/frontend/src/app/layout.tsx
@@ -18,7 +18,7 @@ const poppins = Poppins({
});
export const metadata: Metadata = {
- title: "NextGen AutoGPT",
+ title: "AutoGPT Platform",
description: "Your one stop shop to creating AI Agents",
};
diff --git a/autogpt_platform/frontend/src/components/Flow.tsx b/autogpt_platform/frontend/src/components/Flow.tsx
index 8210b9966c..ece3239580 100644
--- a/autogpt_platform/frontend/src/components/Flow.tsx
+++ b/autogpt_platform/frontend/src/components/Flow.tsx
@@ -149,6 +149,13 @@ const FlowEditor: React.FC<{
// It stores the dimension of all nodes with position as well
const [nodeDimensions, setNodeDimensions] = useState<NodeDimension>({});
+ // Set page title with or without graph name
+ useEffect(() => {
+ document.title = savedAgent
+ ? `${savedAgent.name} - Builder - AutoGPT Platform`
+ : `Builder - AutoGPT Platform`;
+ }, [savedAgent]);
+
useEffect(() => {
if (params.get("resetTutorial") === "true") {
localStorage.removeItem(TUTORIAL_STORAGE_KEY);
diff --git a/autogpt_platform/frontend/src/tests/title.spec.ts b/autogpt_platform/frontend/src/tests/title.spec.ts
index c80123cb7f..46933ccb28 100644
--- a/autogpt_platform/frontend/src/tests/title.spec.ts
+++ b/autogpt_platform/frontend/src/tests/title.spec.ts
@@ -4,5 +4,5 @@ test("has title", async ({ page }) => {
await page.goto("/");
// Expect a title "to contain" a substring.
- await expect(page).toHaveTitle(/NextGen AutoGPT/);
+ await expect(page).toHaveTitle(/AutoGPT Platform/);
});