From 5918a69398f8ab302dc5590b81ac2d8e12031248 Mon Sep 17 00:00:00 2001 From: Anthony Lio Date: Fri, 18 Sep 2026 21:54:31 +0300 Subject: [PATCH] feat(docs): agent prompt block (#50565) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What kind of change does this PR introduce? docs ui polish for the prompt panel on the docs homepage and in the quickstarts ## What is the current behavior? agent prompt renders as one run on paragraph steps read as "1. ... 2. ... 3. ..." inline making it hard to read ## What is the new behavior? - sets prompt bodies as markdown for easier readability - adds long prompts collapse - removes panel tab icons - uses panel code block ui - makes active tab has an underline on first paint `home` | state | preview | | -------|------| | before | image | | after | image | `quickstart` | state | preview | | -------|------| | before | image | | after | image | ## Summary by CodeRabbit * **New Features** * Prompts now support Markdown formatting, inline code chips, expandable content, and improved hover-reveal behavior. * Code-copy controls support customizable labels and clearer screen-reader announcements. * Prompt tabs and panels have updated styling, spacing, and active-content handling. * **UI Improvements** * Setup and agent prompts now use consistent Markdown-rendered presentation. * Prompt headings now display “Agent Prompt.” * Home page setup code blocks use a more compact layout. --- .../components/HomePageCover.constants.ts | 6 +- apps/docs/components/HomePageCover.tsx | 30 +-- apps/docs/features/ui/AgentSetup.tsx | 7 +- apps/docs/features/ui/AiPrompt.tsx | 16 +- .../ui/CodeBlock/CodeBlock.client.tsx | 18 +- apps/docs/features/ui/PromptPanel.tsx | 171 ++++++++++-------- .../markdown-schema/AiPrompt.test.ts | 2 +- .../internals/markdown-schema/AiPrompt.ts | 2 +- apps/docs/layouts/HomeLayout.tsx | 3 +- 9 files changed, 140 insertions(+), 115 deletions(-) diff --git a/apps/docs/components/HomePageCover.constants.ts b/apps/docs/components/HomePageCover.constants.ts index 14065615029..582a51fbf2a 100644 --- a/apps/docs/components/HomePageCover.constants.ts +++ b/apps/docs/components/HomePageCover.constants.ts @@ -6,4 +6,8 @@ export const setupCommand = { export const setupCommands = [setupCommand.installCli, setupCommand.installPlugin].join('\n') -export const setupPrompt = `Help me get set up with Supabase. Do the following: 1. Install the Supabase CLI as a project dev dependency with \`${setupCommand.installCli}\`, so the version is pinned per project. 2. Install the Supabase Plugin with \`${setupCommand.installPlugin}\`. 3. Review my project and determine whether Supabase is already initialized. If it is not initialized, run \`${setupCommand.initialize}\`. 4. Suggest the most relevant next steps.` +export const setupPrompt = `Help me get set up with Supabase. Do the following: +1. Install the Supabase CLI as a project dev dependency with \`${setupCommand.installCli}\`, so the version is pinned per project. +2. Install the Supabase Plugin with \`${setupCommand.installPlugin}\`. +3. Review my project and determine whether Supabase is already initialized. If it is not initialized, run \`${setupCommand.initialize}\`. +4. Suggest the most relevant next steps.` diff --git a/apps/docs/components/HomePageCover.tsx b/apps/docs/components/HomePageCover.tsx index b818ff79e4e..998b8b66236 100644 --- a/apps/docs/components/HomePageCover.tsx +++ b/apps/docs/components/HomePageCover.tsx @@ -4,45 +4,31 @@ import { Prompt, PromptContent, PromptCopy, + PromptMarkdown, PromptPanel, PromptTitle, } from '~/features/ui/PromptPanel' import { isFeatureEnabled } from 'common' -import { Sparkles, Terminal } from 'lucide-react' import { type ReactNode } from 'react' import { getCustomContent } from '../lib/custom-content/getCustomContent' import DocsCoverLogo from './DocsCoverLogo' -import { setupCommand, setupCommands, setupPrompt } from './HomePageCover.constants' +import { setupCommands, setupPrompt } from './HomePageCover.constants' const fullGettingStartedEnabled = isFeatureEnabled('docs:full_getting_started') function SetupPrompt({ cliCode }: { cliCode: ReactNode }) { return ( - - }>AI Prompt + + Agent Prompt {setupPrompt} - Help me get set up with Supabase. Do the following: 1. Install the Supabase CLI as a - project dev dependency with{' '} - - {setupCommand.installCli} - - , so the version is pinned per project. 2. Install the Supabase Plugin with{' '} - - {setupCommand.installPlugin} - - . 3. Review my project and determine whether Supabase is already initialized. If it is not - initialized, run{' '} - - {setupCommand.initialize} - - . 4. Suggest the most relevant next steps. + {setupPrompt} - }>CLI + CLI {setupCommands} {cliCode} @@ -56,8 +42,8 @@ const HomePageCover = ({ title, cliCode }: { title: string; cliCode: ReactNode } return (
-
-
+
+