mirror of
https://github.com/supabase/supabase.git
synced 2026-09-22 13:37:53 +08:00
4aa34f556a
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? - We made the Next step copy a bit more generic so it doesn't read like it's pointing you back to Inspector UI. - Added CTA on key stored screen to send you to Edge Function Secrets directly. - Tidies up footer area to always be centrally aligned across all states. ### 1. Enable the feature flag ### 2. Preview states via URL Mock mode is enabled automatically in local/staging. Navigate to `/mcp/secrets` with a `state` query param: http://localhost:8082/mcp/secrets?state=<state> States that need no other params: | `state` value | What it shows | | ----------------- | --------------------------------------- | | `loading` | Loading skeleton | | `expired` | Link expired | | `cancelled` | Request cancelled | | `paused` | Storing keys paused | | `wrong-account` | Signed in as the wrong account | | `error` | Generic failure | States that need a real project —ame=<KEY_NAME>`: | `state` value | What it sh | | -------------------- | ---------------------- | | `form` | The "st | | `stored` | Success | | `stored-timeout` | Successopped waiting | | `already-stored` | Key was already stored, nothing to do | Example: http://localhost:8082/mcp/secretsJECT_REF&name=OPENAI_API_KEY ### 3. What to check - [ ] `stored` / `already-stored`tions secrets"** button linking to `/project/<ref>/functions/secrets - [ ] States without a project re `paused`, `error`) don't show that button - [ ] Footer text is centered on - [ ] `wrong-account` → **Switch its footer is centered - [ ] The provider-dashboard link` state, use a `name` like`OPENAI_API_KEY` or `RESEND_API_Khint) is centered too <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a project-specific link to Edge Functions secrets from the MCP setup screen when a project is available. * Added a separator to distinguish the secrets link from the remaining setup guidance. * **Improvements** * Updated completion guidance to tell users to return to their agent and confirm the setup is finished. * Standardized interstitial footer content with centered guidance and consistent provider dashboard instructions. * **Tests** * Added coverage for displaying the project-specific secrets link and hiding it when no project is associated. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Ali Waseem <waseema393@gmail.com>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
import { Skeleton } from 'ui'
|
|
|
|
import { InterstitialLayout, SupabaseLogo } from '@/components/layouts/InterstitialLayout'
|
|
|
|
export const InterstitialShell = ({
|
|
title,
|
|
subtitle,
|
|
children,
|
|
}: {
|
|
title: ReactNode
|
|
subtitle: ReactNode
|
|
children: ReactNode
|
|
}) => (
|
|
<InterstitialLayout
|
|
logo={<SupabaseLogo />}
|
|
title={title}
|
|
description={subtitle}
|
|
descriptionClassName="text-foreground-light"
|
|
>
|
|
<div className="flex flex-col gap-6 px-6 pb-6">{children}</div>
|
|
</InterstitialLayout>
|
|
)
|
|
|
|
export const InterstitialShellSkeleton = ({ children }: { children: ReactNode }) => (
|
|
<InterstitialShell
|
|
title={<Skeleton className="h-[18px] w-40" />}
|
|
subtitle={
|
|
<div className="flex flex-col items-center gap-1.5">
|
|
<Skeleton className="h-3.5 w-full" />
|
|
<Skeleton className="h-3.5 w-3/4" />
|
|
</div>
|
|
}
|
|
>
|
|
{children}
|
|
</InterstitialShell>
|
|
)
|
|
|
|
export const InterstitialFooter = ({ children }: { children: ReactNode }) => (
|
|
<p className="text-center text-xs text-foreground-light">{children}</p>
|
|
)
|