mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
create-pull-request/patch
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f2876c7787 |
chore(studio): upgrade the TanStack dependency set (#51067)
TanStack Start 1.169 is the stable release. This moves the shared catalog to Start 1.169.2 and Router 1.170.44, the newest matching pair that clears the 72-hour release-age gate, and updates Studio React Query and its devtools to 5.104.3. The ui-library TanStack auth blocks switch to `.validator()` because Start 1.169 removes `.inputValidator()`. **Changed:** - `pnpm-workspace.yaml` – `@tanstack/react-router` `^1.170.44` and `@tanstack/react-start` `^1.169.2`, so Router, Start, router-core, and the Start plugin install as one set - `pnpm-lock.yaml` – react-router 1.170.44, react-start 1.169.2, router-core 1.171.37, router-plugin 1.168.46, start-plugin-core 1.171.53, history 1.162.5, and Studio React Query 5.104.3 - `apps/studio/package.json` – `@tanstack/react-query` and `@tanstack/react-query-devtools` `~5.104.3`, `@tanstack/react-router-devtools` `^1.167.2` - `apps/ui-library/registry/default/blocks/password-based-auth-tanstack/routes/auth/confirm.ts` – `createServerFn` uses `.validator()` - `apps/ui-library/registry/default/blocks/social-auth-tanstack/routes/auth/oauth.ts` – `createServerFn` uses `.validator()` - `apps/ui-library/tests/sign-up-redirect.test.tsx` – the server-function mock follows the `validator` chain - `apps/ui-library/public/r/password-based-auth-tanstack.json` – registry JSON regenerated from the block - `apps/ui-library/public/r/social-auth-tanstack.json` – registry JSON regenerated from the block - `apps/ui-library/content/docs/tanstack/password-based-auth.mdx` – note that the block requires `@tanstack/react-start` 1.168.25 or later, since `.validator()` is missing from earlier Start versions - `apps/ui-library/content/docs/tanstack/social-auth.mdx` – note that the block requires `@tanstack/react-start` 1.168.25 or later, since `.validator()` is missing from earlier Start versions - `apps/studio/server.ts` – correct the header comment: `wrapFetchWithSentry` only adds a span, trace meta tags, and a flush, and request errors are captured by the Sentry middleware in `start.ts` **Removed:** - `minimumReleaseAgeExclude` pins for: - `@tanstack/react-router@1.170.41` - `@tanstack/react-start-client@1.168.39` - `@tanstack/react-start-rsc@0.1.59` - `@tanstack/react-start-server@1.167.46` - `@tanstack/react-start@1.168.60` - `@tanstack/react-store@0.11.2` - `@tanstack/router-core@1.171.34` - `@tanstack/router-generator@1.167.40` - `@tanstack/router-plugin@1.168.42` - `@tanstack/start-client-core@1.170.34` - `@tanstack/start-plugin-core@1.171.49` - `@tanstack/start-server-core@1.169.39` - `@tanstack/start-storage-context@1.167.36` - `@tanstack/store@0.11.2` ## To test - TanStack Studio, open a project home – the shell loads with no router error - TanStack Studio, open a table, switch schema, then Back and Forward – the table id follows history, and Forward returns to the later table - TanStack Studio, run a query in the SQL Editor – results render - TanStack Studio, open Project Settings – the general settings page renders - Next Studio, repeat home, Table Editor, SQL Editor, and Settings – the same pages render - ui-library TanStack password and social auth blocks, follow a sign-up confirm and OAuth confirm link – the server function accepts the search params through `.validator()` and redirects --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
a9c594a820 |
chore(library): rename mcp-server block to mcp (#50999)
Renames the `mcp-server` Library block to `mcp`. Installing it now creates `supabase/functions/mcp`, so the server is served at `/functions/v1/mcp`. - Block, Edge Function folder, and docs page renamed (`/docs/headless/mcp`) - Headless App block now installs its tools into `supabase/functions/mcp` and configures `[functions.mcp]` - Links in the BYO MCP and MCP authentication guides updated - Permanent redirects keep `/r/mcp-server.json` and `/docs/headless/mcp-server` working - `public/r` rebuilt <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Updates** * The MCP Server block is now named `mcp` across its documentation, installation links, and setup instructions. * Updated function endpoints and deployment commands to use `/mcp`. * Added permanent redirects from the previous `mcp-server` documentation and install URLs to their new locations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
19d7233580 |
feat(ui-library): add headless app block for TanStack Start (#49579)
## 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? Feature — a new UI Library block. Stacked on #49573 (already in main) Fixes AI-1064 ## What is the new behavior? Adds `headless-app-tanstack`: customers sign in, authorize an MCP client, and use the product through agent tool calls. It composes the existing Password-Based Auth, OAuth Consent, and MCP Server blocks. - `/agents` provides a copyable connection prompt, lists OAuth authorizations, and lets customers revoke access. - The shared MCP runtime exposes `whoami` plus example task CRUD tools. Tools use the caller's Supabase client, with database grants and RLS enforcing ownership. - A root-level `supabase/` directory supplies local Auth/OAuth configuration, a declarative tasks schema, and Edge Function files, including `.env.example`. - Docs cover local setup, signing keys, migrations, environment configuration, deployment, and extending the tools. `/example/headless-app` previews the sign-in, consent, connect, and connected states. Shared block fixes make a fresh install work: - Explicit public URL resolution fixes OAuth discovery in local Edge Runtime when middleware runtime detection fails. Both external OAuth access tokens and ordinary authenticated app session tokens remain supported; embedded agents do not need an additional consent flow. - Registry targets keep backend files outside `src/`, and generated consumer routes omit source-only TypeScript suppressions. - Signup respects `auth.email.enable_confirmations`; sign-in/signup preserve the return destination. Missing consent IDs retain the existing error state without serializing `null` into the URL. ## How to test Use the UI Library on **staging** and follow the block pages' instructions. 1. Open the **Headless App** block page for TanStack Start. Install it into a fresh app and follow the setup instructions through connecting an MCP client. 2. Sign up, open `/agents`, and use the connection prompt to authorize a client. Call `whoami`, then create, list, update, and delete a task. 3. Confirm the client appears on `/agents`. Revoke access and verify it disappears and token refresh fails. An existing access token can continue working until it expires. 4. Follow the **MCP Server** block page's embedded-agent instructions using an authenticated app session. Confirm tools work without another OAuth consent flow and `whoami` returns `client_id: null`. 5. With a second user, confirm each user can only access their own tasks. Check that signup behaves correctly for the configured email-confirmation setting. 6. Check the Headless App preview states and run the installed app's typecheck and production build. ## Validation performed Fresh local installation and browser/SDK verification passed: 26 live MCP/Data API checks, 10 Deno tests, and 7 connection-page component tests. Also passed UI Library typecheck, targeted lint, registry/Markdown builds, and fresh consumer typecheck/production build. Both OAuth and ordinary app session authentication were exercised. Hosted deployment and consuming the confirmation-email link were not tested. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a TanStack Headless App example with sign-in, OAuth consent, MCP connection, and connected-agent screens. - Added task management tools for listing, creating, updating, and deleting tasks through MCP. - Added connected-agent management, including server URL and prompt copying, refresh, and access revocation. - Added a new Headless App registry block and documentation. - **Bug Fixes** - Preserved intended destinations through sign-up, email confirmation, and protected-route login redirects. - Improved OAuth discovery URL handling across forwarded-host deployments. - **Documentation** - Updated setup, environment, deployment, and Supabase CLI guidance for headless apps and MCP servers. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Saxon Fletcher <SaxonF@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: repro <repro@local> Co-authored-by: Raúl Barroso <code@raulb.dev> |