From c3d39f1d62dd1eae0be53a830521e9e45d5af280 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 4 Jul 2025 21:31:41 -0500 Subject: [PATCH] feat(web): improving stuff and things --- .../[consumerId]/app-consumer-index.tsx | 63 +++++---- .../app/app/consumers/app-consumers-index.tsx | 5 +- .../[project-slug]/app-project-index.tsx | 43 +++--- .../app/app/projects/app-projects-index.tsx | 5 +- apps/web/src/app/layout.tsx | 2 +- .../[project-slug]/marketplace-nav.tsx | 30 +++++ .../marketplace-public-project-detail.tsx | 127 +++++++++--------- apps/web/src/components/page-container.tsx | 3 + apps/web/src/components/ui/breadcrumb.tsx | 109 +++++++++++++++ apps/web/src/lib/developer-config.ts | 4 +- examples/ts-sdks/ai-sdk/bin/weather.ts | 3 +- examples/ts-sdks/mastra/bin/weather.ts | 4 +- pnpm-lock.yaml | 2 +- pnpm-workspace.yaml | 2 +- todo.md | 3 - 15 files changed, 281 insertions(+), 124 deletions(-) create mode 100644 apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-nav.tsx create mode 100644 apps/web/src/components/ui/breadcrumb.tsx diff --git a/apps/web/src/app/app/consumers/[consumerId]/app-consumer-index.tsx b/apps/web/src/app/app/consumers/[consumerId]/app-consumer-index.tsx index 7840ec39..6d886cfa 100644 --- a/apps/web/src/app/app/consumers/[consumerId]/app-consumer-index.tsx +++ b/apps/web/src/app/app/consumers/[consumerId]/app-consumer-index.tsx @@ -8,6 +8,7 @@ import { toast } from 'sonner' import { useAuthenticatedAgentic } from '@/components/agentic-provider' import { useConfettiFireworks } from '@/components/confetti' import { LoadingIndicator } from '@/components/loading-indicator' +import { PageContainer } from '@/components/page-container' import { Button } from '@/components/ui/button' import { toastError } from '@/lib/notifications' import { useQuery } from '@/lib/query-client' @@ -93,38 +94,42 @@ export function AppConsumerIndex({ consumerId }: { consumerId: string }) { }, [ctx, consumer]) return ( -
- {!ctx || isLoading ? ( - - ) : isError ? ( -

Error fetching customer subscription "{consumerId}"

- ) : !consumer ? ( -

Customer subscription "{consumerId}" not found

- ) : ( - <> -

+ {!ctx || isLoading ? ( + + ) : isError ? ( +

Error fetching customer subscription "{consumerId}"

+ ) : !consumer ? ( +

Customer subscription "{consumerId}" not found

+ ) : ( + <> +

- Subscription to {consumer.project.name} -

+ > + Subscription to {consumer.project.name} +

-
-
{JSON.stringify(consumer, null, 2)}
-
+
+
+                {JSON.stringify(consumer, null, 2)}
+              
+
- - - )} -
+ Manage Subscription + + + )} + + ) } diff --git a/apps/web/src/app/app/consumers/app-consumers-index.tsx b/apps/web/src/app/app/consumers/app-consumers-index.tsx index d1239661..2b663020 100644 --- a/apps/web/src/app/app/consumers/app-consumers-index.tsx +++ b/apps/web/src/app/app/consumers/app-consumers-index.tsx @@ -5,6 +5,7 @@ import { useCallback, useState } from 'react' import { useAuthenticatedAgentic } from '@/components/agentic-provider' import { AppConsumersList } from '@/components/app-consumers-list' +import { PageContainer } from '@/components/page-container' import { Button } from '@/components/ui/button' import { toastError } from '@/lib/notifications' @@ -31,7 +32,7 @@ export function AppConsumersIndex() { }, [ctx]) return ( - <> +

- + ) } diff --git a/apps/web/src/app/app/projects/[namespace]/[project-slug]/app-project-index.tsx b/apps/web/src/app/app/projects/[namespace]/[project-slug]/app-project-index.tsx index d54d8a8d..dda14803 100644 --- a/apps/web/src/app/app/projects/[namespace]/[project-slug]/app-project-index.tsx +++ b/apps/web/src/app/app/projects/[namespace]/[project-slug]/app-project-index.tsx @@ -2,6 +2,7 @@ import { useAuthenticatedAgentic } from '@/components/agentic-provider' import { LoadingIndicator } from '@/components/loading-indicator' +import { PageContainer } from '@/components/page-container' import { useQuery } from '@/lib/query-client' export function AppProjectIndex({ @@ -27,27 +28,29 @@ export function AppProjectIndex({ // TODO: show deployments return ( -
- {!ctx || isLoading ? ( - - ) : isError ? ( -

Error fetching project

- ) : !project ? ( -

Project "{projectIdentifier}" not found

- ) : ( - <> -

- {project.name} -

+ > + {project.name} +

-
-
{JSON.stringify(project, null, 2)}
-
- - )} - +
+
{JSON.stringify(project, null, 2)}
+
+ + )} + +
) } diff --git a/apps/web/src/app/app/projects/app-projects-index.tsx b/apps/web/src/app/app/projects/app-projects-index.tsx index 7640769e..e93a9f72 100644 --- a/apps/web/src/app/app/projects/app-projects-index.tsx +++ b/apps/web/src/app/app/projects/app-projects-index.tsx @@ -1,13 +1,14 @@ import { AppProjectsList } from '@/components/app-projects-list' +import { PageContainer } from '@/components/page-container' export function AppProjectsIndex() { return ( - <> +
- +
) } diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 367d6f82..e8cdd612 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -51,7 +51,7 @@ export default function RootLayout({
-
+
{children}
diff --git a/apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-nav.tsx b/apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-nav.tsx new file mode 100644 index 00000000..d2f04f03 --- /dev/null +++ b/apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-nav.tsx @@ -0,0 +1,30 @@ +import { + Breadcrumb, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbList, + BreadcrumbPage, + BreadcrumbSeparator +} from '@/components/ui/breadcrumb' + +export function MarketplacePublicProjectDetailNav({ + projectIdentifier +}: { + projectIdentifier: string +}) { + return ( + + + + Marketplace + + + + + + {projectIdentifier} + + + + ) +} diff --git a/apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-public-project-detail.tsx b/apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-public-project-detail.tsx index ee852f5d..2f1f755d 100644 --- a/apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-public-project-detail.tsx +++ b/apps/web/src/app/marketplace/projects/[namespace]/[project-slug]/marketplace-public-project-detail.tsx @@ -30,6 +30,7 @@ import { defaultAgenticApiClient } from '@/lib/default-agentic-api-client' import { toast, toastError } from '@/lib/notifications' import { useQuery } from '@/lib/query-client' +// import { MarketplacePublicProjectDetailNav } from './marketplace-nav' import { type MarketplacePublicProjectDetailTab, marketplacePublicProjectDetailTabsSet, @@ -200,7 +201,7 @@ export function MarketplacePublicProjectDetail({ }, [deployment]) return ( - +
{isLoading ? ( @@ -484,73 +485,79 @@ function ProjectHeader({ tab?: MarketplacePublicProjectDetailTab }) { return ( -
-
- {project.name} + <> + {/* */} -

- {project.name} -

+
+
+ {project.name} - - + {project.name} + + + - Subscribe to {project.identifier} - - -
- -
-
- {project.identifier} - - {/* TODO: */} + + Subscribe to {project.identifier} + +
- {project.lastPublishedDeployment?.homepageUrl && ( - - )} + {/* TODO: */} +
- {project.lastPublishedDeployment?.sourceUrl && ( - - )} + Homepage + + + )} + + {project.lastPublishedDeployment?.sourceUrl && ( + + )} +
-
+ ) } diff --git a/apps/web/src/components/page-container.tsx b/apps/web/src/components/page-container.tsx index e28c9a89..92d8054f 100644 --- a/apps/web/src/components/page-container.tsx +++ b/apps/web/src/components/page-container.tsx @@ -2,10 +2,12 @@ import { cn } from '@/lib/utils' export function PageContainer({ background = true, + compact = false, className, children }: { background?: boolean + compact?: boolean className?: string children: React.ReactNode }) { @@ -18,6 +20,7 @@ export function PageContainer({
diff --git a/apps/web/src/components/ui/breadcrumb.tsx b/apps/web/src/components/ui/breadcrumb.tsx new file mode 100644 index 00000000..d10ff194 --- /dev/null +++ b/apps/web/src/components/ui/breadcrumb.tsx @@ -0,0 +1,109 @@ +import { Slot } from '@radix-ui/react-slot' +import { ChevronRight, MoreHorizontal } from 'lucide-react' +import * as React from 'react' + +import { cn } from '@/lib/utils' + +function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) { + return