Skip to content

Commit 355219a

Browse files
authored
feat(frontend): fix tab titles (#11432)
## Changes πŸ—οΈ Add some missing page titles, most importantly the missing one the new runs page. ## Checklist πŸ“‹ ### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run the app - [x] Page titles are there
1 parent 1ab66ea commit 355219a

File tree

6 files changed

+45
-31
lines changed

6 files changed

+45
-31
lines changed

β€Žautogpt_platform/frontend/src/app/(platform)/build/page.tsxβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"use client";
22

3-
import { useOnboarding } from "@/providers/onboarding/onboarding-provider";
43
import FlowEditor from "@/app/(platform)/build/components/legacy-builder/Flow/Flow";
4+
import { useOnboarding } from "@/providers/onboarding/onboarding-provider";
55
// import LoadingBox from "@/components/__legacy__/ui/loading";
66
import { GraphID } from "@/lib/autogpt-server-api/types";
7+
import { ReactFlowProvider } from "@xyflow/react";
78
import { useSearchParams } from "next/navigation";
89
import { useEffect } from "react";
9-
import { Flow } from "./components/FlowEditor/Flow/Flow";
1010
import { BuilderViewTabs } from "./components/BuilderViewTabs/BuilderViewTabs";
1111
import { useBuilderView } from "./components/BuilderViewTabs/useBuilderViewTabs";
12-
import { ReactFlowProvider } from "@xyflow/react";
12+
import { Flow } from "./components/FlowEditor/Flow/Flow";
1313

1414
function BuilderContent() {
1515
const query = useSearchParams();

β€Žautogpt_platform/frontend/src/app/(platform)/library/agents/[id]/components/AgentRunsView/AgentRunsView.tsxβ€Ž

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
"use client";
22

3+
import { Button } from "@/components/atoms/Button/Button";
34
import { Breadcrumbs } from "@/components/molecules/Breadcrumbs/Breadcrumbs";
45
import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";
5-
import { useAgentRunsView } from "./useAgentRunsView";
6+
import { PlusIcon } from "@phosphor-icons/react";
7+
import { useEffect } from "react";
68
import { AgentRunsLoading } from "./components/AgentRunsLoading";
9+
import { EmptyAgentRuns } from "./components/EmptyAgentRuns/EmptyAgentRuns";
10+
import { RunAgentModal } from "./components/RunAgentModal/RunAgentModal";
711
import { RunsSidebar } from "./components/RunsSidebar/RunsSidebar";
812
import { SelectedRunView } from "./components/SelectedRunView/SelectedRunView";
913
import { SelectedScheduleView } from "./components/SelectedScheduleView/SelectedScheduleView";
10-
import { EmptyAgentRuns } from "./components/EmptyAgentRuns/EmptyAgentRuns";
11-
import { Button } from "@/components/atoms/Button/Button";
12-
import { RunAgentModal } from "./components/RunAgentModal/RunAgentModal";
13-
import { PlusIcon } from "@phosphor-icons/react";
14+
import { useAgentRunsView } from "./useAgentRunsView";
1415

1516
export function AgentRunsView() {
1617
const {
@@ -26,6 +27,12 @@ export function AgentRunsView() {
2627
handleClearSelectedRun,
2728
} = useAgentRunsView();
2829

30+
useEffect(() => {
31+
if (agent) {
32+
document.title = `${agent.name} - Library - AutoGPT Platform`;
33+
}
34+
}, [agent]);
35+
2936
if (error) {
3037
return (
3138
<ErrorCard

β€Žautogpt_platform/frontend/src/app/(platform)/library/page.tsxβ€Ž

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
"use client";
22

3-
import { environment } from "@/services/environment";
43
import { useEffect } from "react";
54
import FavoritesSection from "./components/FavoritesSection/FavoritesSection";
65
import LibraryActionHeader from "./components/LibraryActionHeader/LibraryActionHeader";
76
import LibraryAgentList from "./components/LibraryAgentList/LibraryAgentList";
87
import { LibraryPageStateProvider } from "./components/state-provider";
98

10-
/**
11-
* LibraryPage Component
12-
* Main component that manages the library interface including agent listing and actions
13-
*/
149
export default function LibraryPage() {
1510
useEffect(() => {
16-
const appEnv = environment.getAppEnv();
17-
console.log("branch", process.env.NEXT_PUBLIC_PREVIEW_STEALING_DEV);
18-
console.log("appEnv", appEnv);
11+
document.title = "Library – AutoGPT Platform";
1912
}, []);
13+
2014
return (
2115
<main className="pt-160 container min-h-screen space-y-4 pb-20 pt-16 sm:px-8 md:px-12">
2216
<LibraryPageStateProvider>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
"use client";
22

3+
import { useEffect } from "react";
34
import { MainDashboardPage } from "./components/MainDashboardPage/MainDashboardPage";
45

56
export default function Page() {
7+
useEffect(() => {
8+
document.title = "Creator Dashboard – AutoGPT Platform";
9+
}, []);
10+
611
return <MainDashboardPage />;
712
}

β€Žautogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsxβ€Ž

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
"use client";
2-
import { Button } from "@/components/atoms/Button/Button";
3-
import { useRouter } from "next/navigation";
4-
import { useCallback, useContext, useEffect, useMemo, useState } from "react";
5-
import { useToast } from "@/components/molecules/Toast/use-toast";
6-
import { IconKey, IconUser } from "@/components/__legacy__/ui/icons";
7-
import { Trash2Icon } from "lucide-react";
8-
import { KeyIcon } from "@phosphor-icons/react/dist/ssr";
92
import { providerIcons } from "@/app/(platform)/library/agents/[id]/components/AgentRunsView/components/CredentialsInputs/CredentialsInputs";
10-
import { CredentialsProvidersContext } from "@/providers/agent-credentials/credentials-provider";
3+
import { IconKey, IconUser } from "@/components/__legacy__/ui/icons";
4+
import LoadingBox from "@/components/__legacy__/ui/loading";
115
import {
126
Table,
137
TableBody,
@@ -16,17 +10,27 @@ import {
1610
TableHeader,
1711
TableRow,
1812
} from "@/components/__legacy__/ui/table";
19-
import { CredentialsProviderName } from "@/lib/autogpt-server-api";
13+
import { Button } from "@/components/atoms/Button/Button";
2014
import { Dialog } from "@/components/molecules/Dialog/Dialog";
15+
import { useToast } from "@/components/molecules/Toast/use-toast";
16+
import { CredentialsProviderName } from "@/lib/autogpt-server-api";
2117
import { useSupabase } from "@/lib/supabase/hooks/useSupabase";
22-
import LoadingBox from "@/components/__legacy__/ui/loading";
18+
import { CredentialsProvidersContext } from "@/providers/agent-credentials/credentials-provider";
19+
import { KeyIcon } from "@phosphor-icons/react/dist/ssr";
20+
import { Trash2Icon } from "lucide-react";
21+
import { useRouter } from "next/navigation";
22+
import { useCallback, useContext, useEffect, useMemo, useState } from "react";
2323

2424
export default function UserIntegrationsPage() {
2525
const { supabase, user, isUserLoading } = useSupabase();
2626
const router = useRouter();
2727
const providers = useContext(CredentialsProvidersContext);
2828
const { toast } = useToast();
2929

30+
useEffect(() => {
31+
document.title = "Integrations – AutoGPT Platform";
32+
}, []);
33+
3034
const [confirmationDialogState, setConfirmationDialogState] = useState<
3135
| {
3236
open: true;

β€Žautogpt_platform/frontend/src/app/(platform)/profile/(user)/settings/page.tsxβ€Ž

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
"use client";
2+
import { SettingsForm } from "@/app/(platform)/profile/(user)/settings/components/SettingsForm/SettingsForm";
3+
import { useTimezoneDetection } from "@/app/(platform)/profile/(user)/settings/useTimezoneDetection";
24
import {
35
useGetV1GetNotificationPreferences,
46
useGetV1GetUserTimezone,
57
} from "@/app/api/__generated__/endpoints/auth/auth";
6-
import { SettingsForm } from "@/app/(platform)/profile/(user)/settings/components/SettingsForm/SettingsForm";
8+
import { Text } from "@/components/atoms/Text/Text";
79
import { useSupabase } from "@/lib/supabase/hooks/useSupabase";
8-
import { useTimezoneDetection } from "@/app/(platform)/profile/(user)/settings/useTimezoneDetection";
9-
import * as React from "react";
10-
import SettingsLoading from "./loading";
1110
import { redirect } from "next/navigation";
12-
import { Text } from "@/components/atoms/Text/Text";
11+
import { useEffect } from "react";
12+
import SettingsLoading from "./loading";
1313

1414
export default function SettingsPage() {
1515
const {
@@ -33,6 +33,10 @@ export default function SettingsPage() {
3333

3434
const { user, isUserLoading } = useSupabase();
3535

36+
useEffect(() => {
37+
document.title = "Settings – AutoGPT Platform";
38+
}, []);
39+
3640
if (preferencesLoading || isUserLoading || timezoneLoading) {
3741
return <SettingsLoading />;
3842
}

0 commit comments

Comments
Β (0)