mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
cli/ref-doc
38161
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
27ff49c145 |
Stop re-deriving notebook update diffs after completion (#49399)
## Summary
- Fixes false-negative "This update can't be applied" warning for
completed notebook updates (FE-4243)
- When `state='output-available'` (tool completed), skips notebook fetch
and diff derivation
- Renders compact "Notebook updated: {name}" instead of a phantom/failed
diff
- `UnapplyableNotebookUpdateNotice` now accepts and forwards
`footerAction` prop, preserving "Open notebook" link
- Different warning copy for terminal confirm states
(success/error/denied): "Preview unavailable / notebook has changed"
instead of "can't be applied"
- Preserves diff derivation for non-completed states
(output-denied/error)
This is PR 1 of a 3-PR stack; PRs 2-3 restore the full diff preview for
completed updates (requires server snapshot).
Towards FE-4243
## Test plan
- [x] All 15 tests in NotebookProposalRenderer.test.tsx pass
- [x] Typecheck clean
- [x] ESLint clean
- [x] Regression tests added: completed updates with missing target
cells (auto & manual approval)
- [x] Confirms denied/error states still derive against live content
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added clearer status handling for AI-generated notebook updates.
- Completed updates now show a confirmation with the notebook name when
available.
- Update actions and footer controls now adapt to the proposal’s current
state.
- **Bug Fixes**
- Improved messaging when notebook changes prevent an update preview
from being reconstructed.
- Preserved accurate previews for denied or failed updates using the
notebook’s latest content.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
c7e8373bce |
Scoped PAT: Fix projects handling when user has more than 100 projects (#49393)
## Problem Some users have more than 100 projects and our current UI has the following issues: 1. The project selector only loads the first 100 making it impossible to see more 2. The review step and the token permissions view only loads the first 100 so we may display invalid warnings about missing projects However, we currently don't have an API route to fetch many projects by their refs in a single call. ## Solution 1. Make sure we load more projects when scrolling down in the project selector 2. When below 100 project, show the admonition for missing resources. Anyone above for the time being won't see these message and we display the project refs instead of their names <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved scoped access-token setup with paginated project loading and an easier scrolling project selector. - Organization and project access are now displayed as separate, clearer access indicators. - Access details show project information when available, with a fallback reference when details cannot be loaded. - **Bug Fixes** - Updated resource warnings to better reflect deleted resources and large project lists. - Improved multi-select list handling for more reliable interactions. - Preserved the name of inaccessible organizations when displaying lost access. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
dd534d229b |
docs(studio): instruct the notebook agent to use list_databases (#49334)
## Summary - Adds a bullet to `NOTEBOOKS_PROMPT` instructing the assistant to call `list_databases` before setting a `database_cell`'s `database_identifier`, mirroring the existing `list_tables` schema-validation instruction immediately above it. Part 5/6 of the stack for FE-4225 (expose valid database identifiers to the notebook AI agent). Stacked on #49333. This is the last piece that makes the assistant actually *use* the tool and schema field wired up earlier in the stack, rather than just having them available. ## Test plan - [x] `pnpm --filter studio exec tsc --noEmit` passes - [x] `prettier --check` passes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved notebook database configuration by ensuring database identifiers are selected from available databases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
21fccb0ecd |
fix(www): name the /features page button controls (#49343)
Closes FE-4097 https://github.com/user-attachments/assets/bc7cad1a-763e-469f-8a3b-e4d23bed94d9 _See bottom left of screen for screen reader captions._ ## Problem Two controls in the shared `/features/[slug]` template have no accessible name. Both live in the template, so both fire on all 79 feature pages. * The feature list dropdown trigger contains only a `List` icon. `button-name`, critical. * The breadcrumb back chevron wraps only a `ChevronLeft`. `link-name`, serious. ## Solution * Name both with `sr-only` text, matching the sibling prev and next controls in the same component and the theme switcher in the site header. * Label the product pill with its destination. It announced only "vector", with no indication it filters the catalog. Not an axe finding, since the product name already supplies a name. The label keeps the visible word so it satisfies WCAG 2.5.3 Label in Name. * Fix a stray `className="` inside the `iconClassName` string literal, which dropped the icons' width class. * Add `cursor-pointer` to `buttonClassName`. Tailwind 4 no longer sets a pointer cursor on buttons, so the middle control behaved differently from its two anchor siblings. This line belongs to FE-4227 and sits here only to keep two open PRs off adjacent lines of the same file. ## Manual testing 1. Open [/features/ai-integrations](https://zone-www-dot-com-git-www-features-chrome-access-1aef01-supabase.vercel.app/features/ai-integrations) using a Screenreader. 2. Tab through the three round controls at top right. They announce "Previous feature", "Browse all features", "Next feature". **Note:** The order of the elements is strange; captured in a separate ticket. 3. Tab to the round back control at top left. It announces "Back to all features". 4. Tab to the product pill beside it. It announces "All vector features", and the visible word "vector" is unchanged. 5. Hover each of the three round controls. All show a pointer cursor. 6. Run axe on the page. `button-name` and `link-name` report zero elements. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
61b2a18724 |
fix(docs): stop rendering empty troubleshooting error-code pills (#49344)
Closes DOCS-1281 ## Problem Two defects in the "Related error codes" list, both from the page diverging from what `Troubleshooting.utils.ts` already does. * **Empty pills.** `formatError` returns an empty string when an error has neither an HTTP status code nor a code. The page renders the pill anyway, giving a link with no text whose `href` ends in `errorCodes=` with no value. So it is both an unnamed link and a pill filtering on nothing. * **Duplicate pills.** The same formatted code renders once per underlying error object, so one entry shows seven identical "500 unexpected_failure" pills. Measured on production, across the 59 entries that render the section: | | Count | | -- | -- | | Entries with an empty pill | 23 | | Empty pills | 33 | | Entries with duplicate pills | 4 | | Redundant pills | 9 | The guard also evaluated to `0` rather than `false` for an empty array, which React renders as a literal "0". ## Solution * Derive the formatted codes once, drop the empties, and dedupe. An entry whose every code formats empty no longer renders a heading and rule with nothing under them. * Call `formatError` once per code instead of twice per pill, and key on the code now that codes are unique. * Fix the same `0`-rendering guard on the keywords section. `Troubleshooting.utils.ts` already filters on `error?.http_status_code || error?.code` at lines 69 and 150, and already dedupes by formatted code at lines 72 to 79. This brings the page in line with the sidebar and filter list rather than introducing a new pattern. `formatError` itself is unchanged. It also produces grouping and sort keys in `Troubleshooting.utils.ts` and `Troubleshooting.ui.tsx`, so changing its return contract would reach well beyond this fix. ## Manual testing Compare each page against production, which still shows both defects. 1. Open [dashboard-errors-when-managing-users on production](https://supabase.com/docs/guides/troubleshooting/dashboard-errors-when-managing-users-N1ls4A). It shows 8 pills: seven identical "500 unexpected_failure" and one empty. 2. Open [the same page on the preview](https://docs-git-docs-troubleshooting-empty-error-pills-supabase.vercel.app/docs/guides/troubleshooting/dashboard-errors-when-managing-users-N1ls4A). One "500 unexpected_failure" pill remains. 3. Open [prisma-error-management on production](https://supabase.com/docs/guides/troubleshooting/prisma-error-management-Cm5P_o). It shows 6 empty pills. 4. Open [the same page on the preview](https://docs-git-docs-troubleshooting-empty-error-pills-supabase.vercel.app/docs/guides/troubleshooting/prisma-error-management-Cm5P_o). The section is gone, because every code on that entry formats empty. 5. Run axe on either preview page. `link-name` reports zero elements. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved troubleshooting displays by formatting and deduplicating error values. * Removed empty or invalid error entries from the rendered results. * Related error-code links now appear only when valid error codes are available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
ee59d28240 |
fix(studio): reject unknown database_identifier before writing a notebook (#49333)
## Summary - `create_notebook`/`update_notebook` now validate every `database_cell`'s `database_identifier` against the project's real database list (`getReadReplicas`) before writing, throwing an assistant-actionable `NotebookToolError` (same pattern as the existing `expected_updated_at` mismatch check) when it doesn't match. - Only fetches the database list when a cell actually sets `database_identifier` — no added cost for the common case. - `update_notebook` validates only the cells its own operations introduce (`insert_cell`/`replace_cell`), not the whole resulting notebook — otherwise an unrelated, untouched pre-existing cell whose replica was removed after the fact would block updates that never touch it. Part 4/6 of the stack for FE-4225 (expose valid database identifiers to the notebook AI agent). Stacked on #49332. This closes the gap that PR 3 reopened: a model can no longer invent an identifier that silently breaks a cell — it now gets a retryable error naming `list_databases` (added in #49328) as the way to find a real one. ## Test plan - [x] `create_notebook`/`update_notebook` reject an unknown `database_identifier` with `NotebookToolError` + `exposeToAssistant: true` - [x] Both succeed when the identifier matches a real database - [x] `create_notebook` never calls the databases endpoint when no cell sets `database_identifier` - [x] `update_notebook` succeeds without validating or fetching databases when no operation introduces a database_cell, even if an untouched existing cell carries a now-invalid identifier - [x] `pnpm --filter studio exec tsc --noEmit` passes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a database-listing tool that provides database identifiers and metadata, including primary-database status. * Database results now return only the relevant fields. * **Bug Fixes** * Added validation to prevent notebooks from referencing unknown databases. * Create and update actions now provide clear errors for invalid database identifiers. * Updates validate newly added or replaced cells while preserving existing, untouched cells. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7b04fc7d09 |
revert(studio): reinstate database_identifier on the agent notebook schema (#49332)
## Summary - Reverts #49326's temporary mitigation, which stripped `database_identifier` from the agent-facing notebook cell schema (`agentCellSchema`) because the assistant had no legitimate source of truth for valid read-replica identifiers. - The previous PR in this stack (#49328) added the `list_databases` tool, so that source of truth now exists — `database_cell`s can carry `database_identifier` again. Part 3/6 of the stack for FE-4225 (expose valid database identifiers to the notebook AI agent). Stacked on #49328. ## Test plan - [x] Existing schema/preview tests (reverted alongside the mitigation) pass - [x] `pnpm --filter studio exec tsc --noEmit` passes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * AI-generated notebook database cells now support database identifiers. * Notebook previews display the associated database source, including transitions between primary and replica databases. * **Bug Fixes** * Improved database metadata handling to preserve identifiers when updating notebook cells. * Database information is now shown only when available, preventing inaccurate or missing metadata displays. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
144c2eadb6 |
fix(studio): expose notebook diff validation errors for auto-retry (#49331)
## Summary - Automatically deny notebook tool proposals with specific error reasons when client-side diff validation fails (e.g., unknown cell ID) - Enables the AI Assistant to see the actual failure reason and retry automatically instead of requiring manual user intervention - Exposes the same `describeNotebookOperationError` helper used server-side for consistent error messaging - Adds `denyWithReason()` to manual tool approval handlers for flexible denial messaging ## Test plan - Run `pnpm --filter studio exec vitest run apps/studio/components/ui/AIAssistantPanel/Confirm.utils.test.ts` to verify denyWithReason tests - Run `pnpm --filter studio exec vitest run apps/studio/components/ui/AIAssistantPanel/NotebookProposalRenderer.test.tsx` to verify auto-deny behavior, Skip fallback, and no re-fire after approval is already handled - Confirm no regressions in existing notebook tool approval flows ## Manual testing - Get assistant to create a notebook. - Open the notebook and manually delete a cell yourself. - Ask the assistant to delete the cell you just deleted. - Assistant should automatically recover from the error. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit * **New Features** * Notebook proposals now display clear success, error, and denial outcomes. * Tool errors for SQL, Edge Functions, and notebooks now appear in their respective result views. * Output links are supported in notebook proposal results. * Approval panels remain visible after completed actions with standardized status messages. * **Bug Fixes** * Specific denial reasons are preserved instead of showing a generic skipped message. * Unapplyable notebook updates are automatically denied with an explanation. * Prevented duplicate denial responses after approval decisions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d8563cfc6a |
fix(studio): require full authentication for the support form (#49318)
The support form was exempted from the highest AAL check (since the original MFA rollout in #16813) so that users stuck on the MFA challenge could still file a ticket. The platform API now rejects AAL1 sessions with `403 Insufficient AAL: MFA required`, so for those users the form is simply broken — it renders an error toast and the submit would fail too. This requires AAL2 on `/support/new`, so an AAL1 session gets redirected to the MFA challenge and returns to the form afterwards, and removes the links to the support form from the MFA screen. A dedicated flow for users who can't get past MFA to reach us is being worked on separately and should be out soon! Fixes FE-4218 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added an “Email support” action for multi-factor authentication issues, with a prefilled subject line. - Provided clearer guidance when authentication factors cannot be retrieved. - **Bug Fixes** - Improved authentication error handling based on the session’s assurance level. - Reduced confusing permission and error messages for lower-assurance sessions. - Updated support page access to use standard authentication behavior for a more consistent sign-in experience. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
eabe06be5b | typo fix: placehoder -> placeholder (#43451) | ||
|
|
0f730de9e0 |
feat(studio): add list_databases tool for the AI assistant (#49328)
## Summary
- Adds a `list_databases` tool to the notebook AI tools
(`getNotebookTools`), returning `{ identifier, is_primary, region,
status }` for the project's primary and any read replicas, via
`getReadReplicas`.
- Registers `list_databases` in `tool-filter.ts` (opt-in validation
schema + SCHEMA category), and adds a mock fixture in `mock-tools.ts`
for evals.
Part 2/6 of the stack for FE-4225 (expose valid database identifiers to
the notebook AI agent). Stacked on #49327. A later PR in the stack
reinstates `database_identifier` on the agent-facing notebook schema and
requires the agent to call this tool first.
## Test plan
- [x] New test coverage in `notebook-tools.test.ts` for
`list_databases`, including `is_primary` computation
- [x] Existing exact-tool-set assertion updated
- [x] `pnpm --filter studio exec tsc --noEmit` passes
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added an AI notebook tool for listing a project’s databases.
* Results include each database’s identifier, region, status, and
whether it is the primary database.
* Supports projects with read replicas.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
22e2370b35 | docs(self-hosted): add poolers how-to guide (#49303) | ||
|
|
7a2e237892 |
Add update_notebook evals; fix prompt gaps they surfaced (#49324)
## Summary - Add `update_notebook` eval cases (insert/replace/delete/move, a combined delete+insert, and guard/safety cases) mirroring the existing `create_notebook` cases, targeting the notebooks already seeded in the mock tool harness. - Fix two behavior gaps in `NOTEBOOKS_PROMPT`/`LIMITATIONS_PROMPT` that these cases surfaced when run live: the assistant asking the user for a notebook id instead of resolving it via `list_notebooks`, and the destructive-operations warning rule not being connected to SQL written into notebook cells. - Soften the destructive-SQL case's `correctAnswer` to match `update_notebook`'s real approval-gated behavior — a warning accompanying the reported change is acceptable, not only one strictly preceding the tool call. ## Test plan - [x] `pnpm run typecheck` (apps/studio) — clean - [x] `pnpm exec prettier --check` on both changed files — clean - [x] `evals/scorer.test.ts`, `evals/transcript.test.ts`, `evals/trace-utils.test.ts` — 21/21 pass - [x] Ran the new eval cases live against OpenAI (bypassing the Braintrust proxy) via Braintrust MCP; confirmed via trace inspection that the prompt fix resolved the id-resolution gap (Tool Usage 0% → 100% across 3 trials) and that the assistant now includes an explicit irreversibility warning when destructive SQL is written into a notebook cell <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved notebook creation and editing support across SQL, query, chart, and time-range cells. - Added clearer handling for saved notebooks, recurring requests, and one-time SQL execution. - Enhanced validation for database cells and notebook configuration. - **Bug Fixes** - Improved safeguards and warnings for destructive queries, including saved notebook queries. - Better handling of missing tables and notebooks. - More precise notebook cell updates and tool usage validation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
75a722c4e4 |
chore(studio): update self-hosted MCP server to 0.11.0 (#49379)
## Summary - Update `apps/studio` to `@supabase/mcp-server-supabase` `^0.11.0` and add its required `@modelcontextprotocol/server` `^2.0.0` peer. - Keep `@modelcontextprotocol/sdk` `^1.29.0` for Studio's existing transports. `@supabase/mcp-utils` resolves transitively to `0.7.0`, so it remains indirect. [AI-1107](https://linear.app/supabase/issue/AI-1107/2b-update-self-hosted-remote-mcp-server) ## Testing - Five focused MCP test files passed, 47 tests total. - Studio production build passed with `SKIP_ASSET_UPLOAD=1`. - A real `POST` initialize request to the built self-hosted `/api/mcp` endpoint returned HTTP 200 with `serverInfo.version` `0.11.0`. - Studio typecheck still reports one pre-existing error in unchanged `packages/ui-patterns/src/McpUrlBuilder/components/InstructionBlocks.tsx:20`: `string` is not assignable to `StaticImageData`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Improvements** - Improved compatibility with the latest MCP server capabilities. - Refreshed the Supabase MCP integration for a more up-to-date experience. - Verified that the available MCP tools remain consistent after the update. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
31497ba127 |
feat(studio): add permission presets to scoped pat creation form (#49381)
## 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? This adds a quick presets selector to scoped pat permissions. No access, read-only and full access. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added permission presets for scoped access tokens: No access, Read-only, and Full access. * Added a selector to quickly configure permissions across resources. * Displays “Custom” when individual permissions differ from a preset. * Shows warnings and guidance for high-risk full-access permissions. * Automatically uses read-only access for resources that do not support write permissions. * **Tests** * Added coverage for preset selection, application, warnings, ordering, and custom configurations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
f0cb024139 |
feat(studio): preserve assistant tool previews after completion (#49352)
<img width="2337" height="1005" alt="image" src="https://github.com/user-attachments/assets/08298850-715e-4b31-866d-186d73266305" /> ## 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? Assistant execution feedback improvement. ## Stack context Builds on #49351. ## What is the current behavior? When an Assistant query, notebook, Edge Function deployment, or log query completes or fails, the preview can be replaced by a terse text result. ## What is the new behavior? - Retains the original query, log-query, notebook, and Edge Function preview after the tool resolves. - Replaces confirmation actions with a success, error, or skipped footer state. - Keeps the Open notebook action available after a successful notebook creation or update. ## To test 1. Ask the Assistant to run a valid SQL query, approve it, and confirm the query cell remains visible with a Query executed footer. 2. Trigger a failed SQL or log query and confirm the original preview remains visible with an error footer and error result. 3. Ask the Assistant to create or update a notebook, approve it, and confirm the preview remains visible with a completed footer and Open notebook action. 4. Skip any approval and confirm the preview remains visible with a skipped footer instead of being replaced by plain text. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Assistant actions now show clear success, error, or denied-status messages. * Completed actions retain relevant previews and provide follow-up actions, such as opening a created notebook. * SQL, log-query, Edge Function, and notebook errors appear within their respective result views. * Status updates are announced more clearly as actions progress and complete. * **Bug Fixes** * Preserved submitted tool details when execution fails or original input is unavailable. * Improved handling of failed and denied operations across assistant workflows. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
502e0f9b09 |
Add isReadOnly flag into QueryEditor component (#49378)
## Context `QueryEditor` component is being used in the Assistant Chat currently and needs to be read only in this context specifically <img width="1251" height="564" alt="image" src="https://github.com/user-attachments/assets/97d7ce9c-59bc-4acb-a105-e70361b6729e" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Enhancements** * Added read-only support for query editors, allowing query content to be viewed without making changes. * Assistant-generated queries are now displayed in a non-editable mode to prevent accidental modifications. * Read-only editors also prevent applying suggested SQL changes, helping preserve the original query while it is being reviewed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
12a8e31fa6 |
chore(studio): render Sign in with ChatGPT unconditionally (#49375)
<!-- ccr-slack-attribution --> _Requested by **Ivan Vasilov** · [Slack thread](https://supabase.slack.com/archives/C0161K73J1J/p1787296019236949?thread_ts=1787296019.236949&cid=C0161K73J1J)_ ## 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? Chore / feature-flag cleanup. ## What is the current behavior? The "Sign in with ChatGPT" button on `/sign-in` and `/sign-up` sits behind three gates in `useEnabledIdentityProviders`: 1. the static `dashboard_auth:sign_in_with_chatgpt` feature flag, AND 2. either the `ShowSignInWithChatGptButton` ConfigCat flag, OR 3. the `SIGN_IN_CHATGPT_ENABLED` (`siwc-enabled`) localStorage opt-in, flipped by a shareable `?siwc-enabled=1` link via `useSiwcQueryParamOptIn`. The ConfigCat flag resolves client-side, so on a fresh load the button is absent for the first render and appears once the flag comes back. That pushes the rest of the sign-in options down and produces a visible layout shift on the sign-in page. ## What is the new behavior? ChatGPT is gated only by its static `dashboard_auth:sign_in_with_chatgpt` feature flag, which is resolved synchronously from `enabled-features.json`. The button renders on the first paint, with no async re-layout. Removed: - the `useFlag('ShowSignInWithChatGptButton')` call and the `chatgptLocalStorageEnabled || chatGptConfigCatFlagEnabled` branch in `apps/studio/hooks/misc/useEnabledIdentityProviders.ts` - `LOCAL_STORAGE_KEYS.SIGN_IN_CHATGPT_ENABLED` and its `LOCAL_STORAGE_KEYS_ALLOWLIST` entry in `packages/common/constants/local-storage.ts` - `apps/studio/hooks/misc/useSiwcQueryParamOptIn.ts` and its callers in `pages/sign-in.tsx` / `pages/sign-up.tsx` — its only job was writing that localStorage flag - the tests that covered the two removed rollout gates The static `dashboard_auth:sign_in_with_chatgpt` kill switch is untouched. ## Additional context The `ShowSignInWithChatGptButton` ConfigCat flag is reported as 100% enabled (per Joshen Lim in the linked thread). The repo contains no default value, allowlist, or env gate for it — the live value lives only in ConfigCat, so that number is not verifiable from here. Once this merges the flag is unreferenced and should be **archived in ConfigCat by a human**; nothing in ConfigCat was changed as part of this PR. Verification notes: `packages/common` typechecks clean (`tsc --noEmit`) and all touched files pass the repo's Prettier config. Studio's `typecheck`, `lint`, and `vitest` could not be run here — `pnpm install` fails in this environment because `npm.jsr.io` (needed for studio's `@std/path` dependency) is not reachable through the network allowlist, so `apps/studio/node_modules` was never installed. CI should be treated as the first real run of those checks. --- _Generated by [Claude Code](https://claude.ai/code/session_01M21SPvwf6FSthomX4Lj3ZC)_ Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
29e47821f5 |
fix(realtime): add pg changes pool to realtime settings (#49256)
## 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 — adds a new Realtime setting to configure the Postgres Changes connection pool size. ## What is the current behavior? The Realtime settings page only exposes the connection pool used for Realtime Authorization (`connection_pool`). The pool that Realtime uses for Postgres Changes is not surfaced anywhere in the dashboard, so projects that need to tune it have no self-serve way to do so — the only option is to contact support. ## What is the new behavior? The Realtime settings page now includes a **Postgres Changes connection pool size** field: - Reads `postgres_changes_pool` from the project's Realtime config, falling back to a default of `2` when no override is stored. - Validates input from `1` through `20` (`MAX_POSTGRES_CHANGES_POOL`), and submits the value as a number in the config `PATCH` payload. - Docs (`apps/docs/content/guides/realtime/settings.mdx`) are expanded with sizing guidance for both connection pools, plus limits, resource-usage notes, and the operational error codes to look for. <img width="1160" height="166" alt="Screenshot 2026-08-19 at 13 59 04" src="https://github.com/user-attachments/assets/fd3ee29e-e9bf-438b-970f-8008ec57020f" /> ## Additional context The named `RealtimeConfigResponse` / `UpdateRealtimeConfigBody` schemas in the generated `api-types` package do not carry `postgres_changes_pool` yet, so both the query and mutation types extend the generated schema locally — the same pattern already used elsewhere in `apps/studio/data/`. Once the platform OpenAPI spec ships the field and `api-types` is regenerated, those two local intersections can be dropped. Covered by component tests in `RealtimeSettings.test.tsx` for both the fetch and save paths. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a Realtime setting to configure the Postgres Changes connection pool size. * Connection pools support 1–20 connections, with a default of 2. * Saving the setting now applies the configured value correctly. * **Documentation** * Expanded Realtime Settings guidance with configuration limits, resource usage, channel access, payload and presence limits, plan ceilings, spend-cap restrictions, and operational error codes. * Added guidance for sizing authorization and Postgres Changes connection pools. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> |
||
|
|
aa3643f39d |
fix(studio): restrict geolocated default region to provider regions (#49141)
Follow-up to #49131. For `AWS_NIMBUS` orgs, the new-project form's Region trigger could show a region that wasn't in the dropdown at all (e.g. "Southeast Asia (Singapore)" while the list only offered "East US (North Virginia)"). The geolocation-based default region (`useDefaultRegionQuery`) picked the nearest region from **all** AWS regions and seeded it into `dbRegion` unvalidated, ignoring the provider's restricted region list. **Changed:** - `getDefaultRegionOption` now computes the nearest region only over the provider's available regions (new `getDefaultRegionCandidateKeys` helper). The flag-based restricted pool (`defaultRegionRestrictedPool`) narrows within that set and is ignored if the intersection would be empty. - The form's default-region selection is extracted into `resolveDefaultDbRegion` (`ProjectCreation.utils.ts`): High Availability region first, then the recommended smart region, then the geolocated default — used only when the provider actually offers that region — falling back to the provider's static default. - `getAvailableRegions` takes an injectable `environment` param (same pattern as `getHighAvailabilityRegionCode`) so the prod-only Nimbus region list is unit-testable. **Added:** - Unit tests for `getDefaultRegionCandidateKeys` (provider clamping incl. Nimbus on prod, restricted-pool intersection, empty-intersection fallback), `getAvailableRegions` across environments, and `resolveDefaultDbRegion` (branch priority plus the fallback when the geolocated region isn't offered). ## To test - Emulate a Nimbus org locally by setting `"infra:cloud_providers": ["AWS_NIMBUS"]` in `apps/studio/hooks/custom-content/custom-content.json`, then open the new-project form: the Region trigger must show the same region the dropdown offers (locally that's only Southeast Asia (Singapore)). To reproduce the original mismatch path, stub `https://www.cloudflare.com/cdn-cgi/trace` to return `loc=US` — the trigger should still be clamped to the provider's region rather than showing a US region - Block or fail the Cloudflare trace request: the trigger should fall back to the provider's static default region, not sit blank or loading - Restore the normal provider list: the smart-region flow ("General regions" + "Specific regions" with Recommended badges) is unaffected — the geolocation request doesn't even fire on that path — and toggling High Availability still transitions the region list cleanly <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **Bug Fixes** - Region suggestions now respect the selected cloud provider and deployment environment. - Project creation avoids unavailable geolocated regions and falls back to a supported provider default. - Restricted region pools now fall back reliably to available provider regions. - AWS Nimbus selection reflects the active environment while preserving high-availability and smart-region behavior. - **Tests** - Added coverage for provider-specific, environment-specific, restricted, and fallback region selection scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
4778ae66e0 |
Flush notebook cache in valtio and react query whenever closing notebook tab (#49369)
## Context Opting to flush the notebook cache within the Valtio store (nootebook-store) and react query whenever we close the notebook tab in the explorer. Mainly to ensure that whenever we re-open the notebook again, the notebook content isn't stale and we refetch the notebook content from the API <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Closing a saved notebook tab now removes it from the session and clears its cached content. - Notebooks with unsaved changes are preserved when their tabs close. - **Tests** - Added coverage for saved and unsaved notebook tab cleanup behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
86105ca5ec |
feat(studio): align assistant message parts (#49351)
<img width="2252" height="1228" alt="image" src="https://github.com/user-attachments/assets/5c1165ae-cb65-4495-97dd-427b30ceaefc" /> ## 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? Studio UI improvement. ## Stack context Builds on #49350. ## What is the current behavior? The Assistant conversation uses one outer width constraint. This leaves query and notebook previews too narrow, separates consecutive generic tool rows, and leaves message actions aligned to the far left. ## What is the new behavior? - Gives Assistant query cells and notebook previews a `max-w-6xl` container. - Keeps text and other regular message parts at their existing `max-w-3xl` width. - Keeps consecutive generic tool rows such as Reasoned and Ran load_knowledge compact. - Aligns message action rows with regular message content. ## To test 1. In the Assistant, produce a response containing text plus a SQL query or notebook preview. Confirm the preview is wide while regular text remains at the normal width. 2. Produce a response that reasons and runs consecutive non-preview tools. Confirm those rows remain close together with their separators. 3. Hover an Assistant response and confirm copy, rating, and branch actions align with the regular message content. 4. Hover a user message and confirm edit and delete actions use the same alignment. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Improved AI Assistant message layout with centered, consistent content widths. - Expanded notebooks, SQL results, and query-related content where additional space is helpful. - Improved alignment and spacing for actions, tool outputs, loading states, errors, and disclaimers. - Improved query editor visibility when switching between cells. - Loading indicators now respect reduced-motion preferences. - **Tests** - Added coverage for message layouts, tool grouping, and notebook preview sizing. <!-- 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> |
||
|
|
f208743432 |
fix(www): changelog md negotiation slug-set gate (#49357)
Bare-URL `Accept: text/markdown` negotiation never fires on changelog entries authored after the GitHub-discussions backfill: the middleware gate `/^changelog\/\d+/` only matches legacy numeric slugs (from `legacy_gh_discussion` frontmatter), so agents that signal markdown via Accept get HTML on every new entry. I found this in the independent review round on #48475; pre-existing, not introduced there. **Changed:** - **Non-legacy entries negotiate markdown**: `generateMdContent.mjs` now lists `public/changelog/*.md` (written moments earlier by `generateStaticContent.mjs` in the same `content:build:core` chain) and emits a `CHANGELOG_PAGES` set into the generated module; the middleware regex becomes a set lookup, so negotiation coverage derives from the exact static files served and can't drift from what's published. - **Unknown and deep changelog paths stop negotiating**: the old regex prefix-matched paths like `changelog/100/bar` and nonexistent numeric slugs, rewriting them to missing `.md` files (404 under a markdown Accept); they now pass through to the dynamic route's canonicalizing 308/404. - **Build guard**: zero collected changelog slugs on Vercel fails the build (today a zero-entry changelog fetch ships empty output with a green build), and a shape assertion fails the build if collected slugs ever lose the `changelog/` prefix the middleware matches on. Locally without `CHANGELOG_SYNC_APP_*` secrets it warns and changelog negotiation is off, matching the absent content. - **`/changelog` index gated the same way**: the index slug is emitted into the set only when `public/changelog.md` was generated, replacing the hardcoded `slug === 'changelog'` branch; locally without secrets the index no longer rewrites to a nonexistent file. **Note:** script order in `content:build:core` is load-bearing (static content generation must precede md content generation); the Vercel guard turns a reorder into a loud build failure instead of a silent empty gate. ## To test Tested on the Vercel preview (`zone-www-dot-com` deployment of head `f451da3`): - [x] `curl -sI -H "Accept: text/markdown" <preview>/changelog` and `curl -sI <preview>/changelog.md`: got 200 `text/markdown` (index via the generated gate) - [x] `curl -sI -H "Accept: text/markdown" <preview>/changelog/pipelines`: got 200 `text/markdown` (prod today returns `text/html`) - [x] Same curl against the legacy numeric slug `48235-migration-of-...`: got 200 `text/markdown` (no regression) - [x] `curl -sI -H "Accept: application/json" <preview>/changelog/pipelines`: got 406 (prod today returns 200 HTML) - [x] Explicit `.md` fetches for both slug shapes (`/changelog/pipelines.md`, `/changelog/48235-....md`): got 200 `text/markdown` - [x] `curl -sI -H "Accept: text/markdown" <preview>/changelog/does-not-exist-xyz`: got a 404 HTML passthrough from the dynamic route, not a 406 - [x] `pnpm test middleware.test.ts` in `apps/www` at head: 41/41 pass (36 pre-existing + 5 new). No CI job runs the www vitest suite, so this local run is the only oracle for the new tests. ## Linear - fixes GROWTH-1062 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved changelog page handling, including markdown versions of published entries. - Added content negotiation for supported changelog formats, with clear responses for unsupported requests. - **Bug Fixes** - Prevented unpublished numeric-prefix pages from being treated as published. - Fixed deep links under published changelog entries. - **Reliability** - Changelog availability is now detected automatically, with improved validation during content generation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1d47a3190b |
Debounce notebook search (#49368)
## Context Sets up debouncing for notebooks search in the explorer so that we're not hammering the API when searching <img width="281" height="178" alt="image" src="https://github.com/user-attachments/assets/1fa2d633-7f7f-4891-87cc-aa90a5062bb7" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved notebook search responsiveness by delaying searches until 500 ms after typing stops. * Empty searches now update immediately. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d93defe1e0 |
feat(studio): refine notebook query cell layout (#49350)
<img width="2326" height="1257" alt="image" src="https://github.com/user-attachments/assets/d0f63793-ff58-4f48-971f-0622d375b3c7" /> ## 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? Studio UI improvement. ## What is the current behavior? Explorer notebook query cells can extend beyond the intended reading width, and saved notebooks open with SQL code expanded. ## What is the new behavior? - Caps Explorer notebook query cells at `max-w-6xl`. - Hides SQL code by default in saved notebooks. - Keeps SQL visible by default for new notebooks. ## To test 1. Open a saved Explorer notebook with query cells. Confirm each cell is capped at the wider notebook width and its SQL editor is initially collapsed. 2. Expand a saved query cell and confirm the existing SQL and result remain available. 3. Create a new notebook, add a query cell, and confirm its SQL editor is initially visible. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added controls to show or hide SQL for individual query cells. * Query visibility is preserved when switching notebook tabs or reopening them. * New notebooks display SQL by default, while saved notebooks can hide SQL editors. * Expanded the query editor width for improved readability. * **Bug Fixes** * Prevented visibility settings from affecting notebook save status or unrelated cells. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
da1a3ae948 |
fix(studio): thread auth headers through getReadReplicas (#49327)
## Summary - `getReadReplicas` now accepts an optional `headers?: HeadersInit` param, forwarded to the underlying `get()` call — mirrors `getContentById`/`getNotebook`. - Pure plumbing: no behavior change for existing (browser/cookie-auth) callers. Part 1/6 of the stack for FE-4225 (expose valid database identifiers to the notebook AI agent). This PR lets a server-side AI tool call `getReadReplicas` with the request's bearer token in a later PR in the stack. ## Test plan - [x] `getReadReplicas` unit test verifying the header is forwarded on the outgoing request - [x] `pnpm --filter studio exec tsc --noEmit` passes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved read-replica data requests by forwarding authorization headers correctly. * Maintained existing request cancellation and error-handling behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9a3500aad2 |
Set up infinite loading for notebooks (#49321)
## Context Sets up infinite loading for notebooks with the `InfiniteListDefault` component Also adds the notebook and chats count on the explorer home nav <img width="275" height="137" alt="image" src="https://github.com/user-attachments/assets/c3f16e8f-f520-4107-a188-43b1abcca043" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Explorer navigation now displays accurate notebook and chat counts. * Notebook lists support infinite scrolling, loading indicators, and improved active-state styling. * Notebook navigation remains available as additional items load. * **Bug Fixes** * Corrected default markdown cell formatting by removing unintended leading spaces from headings and notes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> |
||
|
|
6779bf52e1 |
Joshenlim/fe 4208 explorer templates need to be properly set up (#49322)
## Context Set up Explorer templates properly for notebooks and chat. Tried (with the help of Claude) to come up with templates that are generic enough for most projects to sort of pick up and use, or even pick up to study how notebooks are meant to be used. Feel free to play around on the preview to check out the content of each template! 🙂 <img width="768" height="232" alt="image" src="https://github.com/user-attachments/assets/590893c4-9772-437d-980f-05ea62ffef81" /> <img width="1918" height="955" alt="image" src="https://github.com/user-attachments/assets/2114e73e-dc44-403d-a998-e87c8d328516" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added ready-to-use chat templates for sample data, security policies, and notebook creation. * Added notebook templates for database health, user growth, and error investigation workflows. * Explorer cards now dynamically create chats and notebooks from selected templates. * Templates include guided prompts, queries, logs, charts, and relevant notebook content. * **Bug Fixes** * Improved generated log cell identifiers for more reliable notebook creation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
417b0fe13e |
feat(studio): show read replicas moved notice on Replication (#49355)
## What kind of change does this PR introduce? Feature / communication. Resolves [PIPE-1008](https://linear.app/supabase/issue/PIPE-1008/communicate-read-replica-move-changelog-leftover-ui-docs). ## What is the current behavior? Database → Replication is now Pipelines-only. The “Read replicas have moved” callout only appears inside the New destination sheet, so users who land on Replication looking for replicas can miss it. Getting-started already points create at Infrastructure but does not say the management surface moved. ## What is the new behavior? Replication shows the moved callout at the top of the page (flag-gated), with a _Go to Infrastructure_ CTA. The same callout remains in the destination-type sheet. Getting-started adds a short note that management moved from Replication to Infrastructure. This Admonition is dismissible, with its state stored in local storage. | Before | After | | --- | --- | | <img width="1024" height="759" alt="64555" src="https://github.com/user-attachments/assets/7084bd51-2f48-4a83-ac2a-89bdd3f23804" /> | <img width="1024" height="759" alt="Replication Database Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/9b26c23a-1b44-4711-919b-c7000f155190" /> | ## To test `infrastructure:read_replicas` on by default. 1. Open [Database → Replication](https://studio-staging-git-danny-pipe-1008-replication-moved-notice-supabase.vercel.app/dashboard/project/_/database/replication) (preview URL once deployed). Confirm the note “Read replicas have moved” and Go to Infrastructure. 2. Click the CTA: lands on Settings → Infrastructure. 3. Open New destination: callout still appears under the type selector. 4. Docs preview: getting-started Creating a Read Replica section shows the move note. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a callout informing users that read replicas are now managed through Infrastructure. * Added a direct link to the Infrastructure page from database replication settings. * Added the option to dismiss the callout, with dismissal saved per project. * Displayed the callout on the replication page and destination selection view. * **Bug Fixes** * Updated callout visibility behavior to respect project settings and prior dismissal. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6ac5bf6b86 |
feat(studio): point replica deep links at Infrastructure and recommend compute (#48921)
## What kind of change does this PR introduce? Feature. Stack 5 of 5 (tip) for [PIPE-1007](https://linear.app/supabase/issue/PIPE-1007/move-read-replicas-out-of-replication-into-infrastructure). ## What is the current behavior? Selectors still open Replication with `destinationType=Read+Replica`. Compute eligibility actions leave the add-replica flow without carrying a recommended size into the Infrastructure form. ## What is the new behavior? DatabaseSelector and the SQL submenu open Infrastructure `?addReplica=true`. Change to Small/XL compute waits for the sheet to close, pre-selects that size, then focuses and scrolls the Infrastructure form to Compute without shifting the page footer. ## Additional context Last stack PR. [#49043](https://github.com/supabase/supabase/pull/49043) has merged. Please review, but do not merge until 2→4 are also approved. Then merge [#49044](https://github.com/supabase/supabase/pull/49044) → [#49045](https://github.com/supabase/supabase/pull/49045) → [#49046](https://github.com/supabase/supabase/pull/49046) → this PR in succession, and drop the `do-not-merge` labels. Update the read replicas getting-started doc in the same sitting so it points only at Infrastructure (it currently also links Database → Replication). Remaining stack: [#49044](https://github.com/supabase/supabase/pull/49044) → [#49045](https://github.com/supabase/supabase/pull/49045) → [#49046](https://github.com/supabase/supabase/pull/49046) → this PR ## To test `infrastructure:read_replicas` is an enabled-feature, on by default. There is no Feature Preview or ConfigCat switch. You should already see the Infrastructure Read replicas section. If you do not, your profile lists `infrastructure:read_replicas` in `disabled_features`. 1. [Infrastructure](https://studio-staging-git-dnywh-choreread-replicas-in-829a4b-supabase.vercel.app/dashboard/project/_/settings/infrastructure): topology, Read replicas, Scaling. 2. Add read replica. If blocked on compute, Change to Small compute: sheet closes, Small is selected and focused, the price footer is dirty, and no blank page gap appears. 3. From the SQL editor database selector, Add replica should open Infrastructure, not Replication. |
||
|
|
bb086a84b8 |
feat(studio): remove read replicas from Replication (#49046)
## What kind of change does this PR introduce? Feature. Stack 4 of 5 for [PIPE-1007](https://linear.app/supabase/issue/PIPE-1007/move-read-replicas-out-of-replication-into-infrastructure). Contributes to PIPE-1008. ## What is the current behavior? Database / Replication lists, creates, and diagrams read replicas alongside pipelines. ## What is the new behavior? Replication is pipelines-only. No replica rows, type, or diagram nodes. `?destinationType=Read+Replica` redirects to Infrastructure. A short callout points create-mode users at the new home. ## Additional context Please review, but do not merge until [#48921](https://github.com/supabase/supabase/pull/48921) is ready to follow immediately. The flag is already on, so this PR is the user-facing cutover off Replication. ## To test `infrastructure:read_replicas` is an enabled-feature, on by default. There is no Feature Preview or ConfigCat switch. You should already see the Infrastructure Read replicas section. If you do not, your profile lists `infrastructure:read_replicas` in `disabled_features`. Open [Database / Replication](https://studio-staging-git-danny-pipe-1007-04-cut-from-77ef95-supabase.vercel.app/dashboard/project/_/database/replication?destinationType=Read+Replica). You should land on Infrastructure with the add-replica sheet, not a replica destination type. The Replication page itself should be pipelines-only. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added guidance directing users to Infrastructure to create read replicas. * Added automatic redirection for legacy read-replica links. * **Updates** * Replication destinations now focus exclusively on external analytics and pipeline destinations. * Updated destination selection, empty states, descriptions, and diagrams to reflect the streamlined experience. * Removed read replicas from the replication destination list and related creation flow. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Jeremias Menichelli <jmenichelli@gmail.com> |
||
|
|
7fd7ace118 |
feat(studio): add Infrastructure replica detail route and redirects (#49045)
## What kind of change does this PR introduce? Feature. Stack 3 of 5 for [PIPE-1007](https://linear.app/supabase/issue/PIPE-1007/move-read-replicas-out-of-replication-into-infrastructure). ## What is the current behavior? Replica detail lives at `/database/replication/replica/:id`. ## What is the new behavior? Detail moves to `/settings/infrastructure/replica/:id`. Old URLs redirect. List and diagram View/Manage replica links follow. ## Additional context Stacked on [#49044](https://github.com/supabase/supabase/pull/49044). Please review, but do not merge. Merge 2→5 in succession once they are all reviewed, so users never sit on a split create/list vs detail path. Replication still lists and creates replicas until [#49046](https://github.com/supabase/supabase/pull/49046). ## To test `infrastructure:read_replicas` is an enabled-feature, on by default. There is no Feature Preview or ConfigCat switch. You should already see the Infrastructure Read replicas section. If you do not, your profile lists `infrastructure:read_replicas` in `disabled_features`. From [Infrastructure](https://studio-staging-git-danny-pipe-1007-03-detail-redirects-supabase.vercel.app/dashboard/project/_/settings/infrastructure), open View replica on a row. Confirm you land on `/settings/infrastructure/replica/:id`. If you have an old bookmark, `/database/replication/replica/:id` should redirect there. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added read replica management to Infrastructure settings, including replica creation, status monitoring, details, restart, and removal actions. * Added eligibility guidance and estimated pricing details during replica setup. * Added support for topology and replica information within infrastructure configuration. * **Improvements** * Legacy database replication links now permanently redirect to the corresponding Infrastructure pages. * Added clearer empty, loading, error, and transition states for read replica management. * **Tests** * Expanded coverage for replica navigation, redirects, eligibility warnings, and empty states. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e9abda6c79 |
feat(studio): add read replicas section on Infrastructure (#49044)
## What kind of change does this PR introduce? Feature. Stack 2 of 5 for [PIPE-1007](https://linear.app/supabase/issue/PIPE-1007/move-read-replicas-out-of-replication-into-infrastructure). ## What is the current behavior? Settings / Infrastructure only covers compute and disk. ## What is the new behavior? Adds topology, a Read replicas list, and the add-replica sheet on Infrastructure. Still gated on `infrastructure:read_replicas`. | Before | After | | --- | --- | | <img width="1279" height="1323" alt="Infrastructure Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/34e7b414-a326-415b-984c-00ae0000f46e" /> | <img width="1279" height="1323" alt="Infrastructure Settings Chisel Toolshed Supabase" src="https://github.com/user-attachments/assets/547cd7ac-435e-45d1-80ad-2f35476f579f" /> | ## Additional context [#49043](https://github.com/supabase/supabase/pull/49043) is merged. This PR targets `master`. Please review, but do not merge. `infrastructure:read_replicas` is already on, so merging this alone would show replicas on both Infrastructure and Replication. Merge 2→5 ([#49045](https://github.com/supabase/supabase/pull/49045), [#49046](https://github.com/supabase/supabase/pull/49046), [#48921](https://github.com/supabase/supabase/pull/48921)) in succession once they are all reviewed. Replica detail still uses the old Replication URL until #49045. ## To test `infrastructure:read_replicas` is an enabled-feature, on by default in `enabled-features.json`. There is no Feature Preview or ConfigCat switch. On this preview you should already see it: Settings → Infrastructure shows topology and a Read replicas section. If those are missing, your profile lists `infrastructure:read_replicas` in `disabled_features` (from `/platform/profile`), and you cannot flip it in the UI. Open [Settings / Infrastructure](https://studio-staging-git-danny-pipe-1007-02-infra-section-supabase.vercel.app/dashboard/project/_/settings/infrastructure). Confirm the topology, Read replicas section, and Add read replica sheet. Replication should still list replicas too. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added infrastructure topology visibility to project infrastructure settings. * Added read replica management, including status monitoring, empty states, creation flow, documentation access, and discard-change confirmation. * Infrastructure settings now include read replicas alongside compute and disk configuration. * Added flexible placement for supplemental disk overview and scaling content. * **Bug Fixes** * Simplified project configuration rendering for more reliable display. * **Tests** * Added coverage for enabled and disabled read replica states. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
fb4c3ec6d4 |
feat(studio): add dev toolbar launcher to account settings menu (#49285)
## What kind of change does this PR introduce? Feature ## What is the current behavior? The dev toolbar is only discoverable via `window.devToolbar()` in the browser console, or by having your email on the `devToolbarDefaultOn` ConfigCat flag. Once enabled, Studio shows a floating trigger button. ## What is the new behavior? In local and staging Studio, the account/settings dropdown (avatar menu) includes a **Local tools** section above **Theme** with a **Dev toolbar** checkbox toggle. - **On**: shows the floating orb (persists via localStorage, same as `window.devToolbar()`) - **Off**: hides the orb and dismisses the toolbar Open the panel itself via the orb once it is visible. Production builds are unchanged (`isAvailable` is false and the menu item is hidden). | After | | --- | | <img width="226" height="204" alt="CleanShot 2026-08-20 at 12 46 38@2x" src="https://github.com/user-attachments/assets/c846b119-626d-48f5-9a02-aef4d006326c" /> | | <img width="558" height="1024" alt="CleanShot 2026-08-20 at 12 47 04@2x" src="https://github.com/user-attachments/assets/4b3dd22b-537b-4874-821d-c202033c4ad7" /> | ## Manual testing Run `pnpm dev:studio` and open http://localhost:8082. 1. **Find the entry point:** top-right avatar/settings menu → **Local tools** → **Dev toolbar** (above **Theme**). Should not appear in production builds. 2. **Turn it on:** check **Dev toolbar**. A green floating orb should appear (default bottom-right). 3. **Open the panel:** click the orb. The **Dev Toolbar** sheet should open with Events and Flags tabs. 4. **Event count:** navigate around Studio (e.g. open a project, switch pages). The orb badge should increment and stay readable in light and dark mode. 5. **Turn it off:** reopen the avatar menu and uncheck **Dev toolbar**. The orb and panel should disappear. 6. **Close vs hide:** with the toolbar on, open the sheet and use **Close** (X). The orb should remain; only the sheet closes. Optional: confirm `window.devToolbar()` in the browser console still enables the orb. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a Local tools option to enable the development toolbar when available. * Toolbar activation and dismissal preferences now persist between sessions. * Added clearer event-count badges with responsive sizing for larger counts. * **Improvements** * Simplified toolbar controls by removing the separate hide option. * Improved toolbar availability handling across local and production environments. * **Tests** * Expanded coverage for activation, persistence, visibility, and event-count badges. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Danny White <dnywh@users.noreply.github.com> Co-authored-by: Sean Oliver <882952+seanoliver@users.noreply.github.com> |
||
|
|
10c425ad0b | feat(www): markdown copy/ask affordances (#48475) | ||
|
|
e605178a63 |
feat(studio): render assistant log query results (#49293)
<img width="1510" height="862" alt="image" src="https://github.com/user-attachments/assets/f7157bad-9b23-4d73-a9aa-2a7a7c179318" /> ## 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 and bug fix. ## What is the current behavior? `query_logs` can return rows to the assistant, but the chat UI does not hydrate those rows into the query result by default. The query only becomes visible after clicking **Run query**, even though the same SQL and time range work when rerun manually. ## What is the new behavior? - Renders `query_logs` tool output through a dedicated logs message part using the shared assistant query cell. - Parses the exact MCP untrusted-data envelope into the initial query result, without changing what the assistant model receives. - Preserves the logs source and time range for manual reruns. - Infers a useful table or chart presentation from the returned rows while retaining explicit display settings. - Adds focused tests for MCP result parsing, timestamps, errors, query source handling, and visualization inference. ## How to test 1. Check out this PR and run Studio against a project that has recent logs. Generate some project activity first, such as an API request, if needed. 2. Open the AI Assistant and ask: `Show log counts by minute for the last 15 minutes and summarize any spikes.` 3. Wait for `query_logs` to finish. Verify the query cell appears with results already populated; do not click **Run query** first. 4. Verify the aggregate result opens as a chart, then switch to the table view and confirm the underlying rows are present. 5. Click **Run query** and verify the query runs successfully again using the same logs source and 15-minute time range. 6. Ask: `Show the 20 most recent log entries from the last 15 minutes.` Verify this non-aggregate result opens as a table with rows already populated. 7. Confirm the assistant's written summary agrees with the displayed rows and does not report zero rows when results are visible. ## Additional context This is the top PR in stack #49294 and depends on the back-end knowledge change in #49292. Verified with 59 focused tests across assistant context, Studio/MCP tools, query display, and logs result parsing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added AI Assistant support for querying and displaying application logs. * Added automatic visualization selection, including charts for time-based and categorical data. * Added source-aware query handling with dedicated titles, time ranges, and result displays. * Added clearer loading, parsing, and error states for log queries. * **Bug Fixes** * Improved handling of streamed results, source changes, and query display updates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
aa2897f712 |
feat(studio): teach assistant to query ClickHouse logs (#49292)
## 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 and bug fix. ## What is the current behavior? The assistant can call `query_logs`, but it is not given the ClickHouse schema and query-writing guidance it needs. It also lacks a current UTC reference for producing the absolute timestamps required by the tool, which can lead to valid queries being run against the wrong time range and reported as returning zero rows. ## What is the new behavior? - Adds a dedicated `logs` knowledge topic backed by the shared ClickHouse schema and query guidance. - Requires the assistant to load that knowledge before using `query_logs`. - Includes the current UTC time in project context so relative requests can be converted to correct absolute tool parameters. - Covers the new knowledge flow and context with focused tests and updates the assistant eval expectation. ## How to test 1. Check out this PR and run Studio against a project that has recent logs. Generate some project activity first, such as an API request, if needed. 2. Open the AI Assistant and ask: `Show log counts by minute for the last 15 minutes and summarize any spikes.` 3. Expand the assistant's tool activity and verify it loads the `logs` knowledge topic before calling `query_logs`. 4. Inspect the `query_logs` input and verify: - `iso_timestamp_start` and `iso_timestamp_end` are absolute UTC timestamps ending in `Z`. - The timestamps cover approximately the requested 15-minute window. - The SQL uses ClickHouse syntax, includes a `LIMIT`, and does not put the time range in the SQL `WHERE` clause. 5. Verify the assistant's summary reflects the rows returned by `query_logs` instead of reporting zero rows when results are present. ## Additional context This is the bottom PR in stack #49294. The front-end visualization is added separately in #49293. Verified with 59 focused tests across assistant context, Studio/MCP tools, query display, and logs result parsing. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added AI-assisted project log querying through the `query_logs` tool. - Added logs knowledge guidance for time ranges, schema discovery, query limits, and concise result summaries. - Project context now includes the current UTC timestamp to improve relative time-range interpretation. - Improved notebook assistance with safer table verification and appropriate handling of log queries. - **Bug Fixes** - Prevented incorrect SQL timestamp filtering and enabled cross-service searches without requiring a source filter. - Added validation for supported knowledge topics. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
70715790b8 |
chore(www): unpublish and redirect the legacy launch week pages (#49335)
Closes [FE-4226](https://linear.app/supabase/issue/FE-4226/unpublish-and-redirect-legacy-launch-week-pages) ## 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? Content removal. ## What is the current behavior? `/launch-week/x`, `/launch-week/12`, `/launch-week/13`, and `/launch-week/14` are still published. Each one carries its own page component and a ticket flow for a launch week that ended. The accessibility scan flags them, and they hold no SEO value. This follows #49281, which took down `/launch-week/6` on the same pattern. ## What is the new behavior? - Delete the `/launch-week/x`, `/12`, `/13`, and `/14` page routes. - Redirect each path to its recap blog post, matching the destinations agreed in `#team-marketing`. - Point the Launch Week 12, 13, and 14 blog summary components at `/launch-week` instead of their deleted pages. `LWXSummary` already does this. - Drop the `disableStickyNav` and `showLaunchWeekNavMode` checks in `Nav` that only matched the deleted routes. - Drop the Launch Week X branches in `useDarkLaunchWeeks` and `_app`. | Source | Destination | | --- | --- | | `/launch-week/x` | `/blog/launch-week-x-best-launches` | | `/launch-week/12` | `/blog/launch-week-12-top-10` | | `/launch-week/13` | `/blog/launch-week-13-top-10` | | `/launch-week/14` | `/blog/launch-week-14-top-10` | ## Additional context `/launch-week/7` and `/launch-week/8` stay published. Neither has a recap post to redirect to, so they need a destination decision before they come down. The `components/LaunchWeek/{X,12,13,14}` trees stay. `BlogPostRenderer` imports the summary component from each one, and those summaries read the same `Releases/data` modules the deleted pages used. The stage and nav components under those directories are now unreachable, so they need their own dead-code audit. Assets under `public/images/launchweek/` are untouched, same as #49281. ## Manual testing Preview: https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app 1. Open [/launch-week/x](https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app/launch-week/x). It returns a 308 and lands on `/blog/launch-week-x-best-launches`. 2. Open [/launch-week/12](https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app/launch-week/12). It returns a 308 and lands on `/blog/launch-week-12-top-10`. 3. Open [/launch-week/13](https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app/launch-week/13). It returns a 308 and lands on `/blog/launch-week-13-top-10`. 4. Open [/launch-week/14](https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app/launch-week/14). It returns a 308 and lands on `/blog/launch-week-14-top-10`. 5. On each of those blog posts, the launch week summary card header links to `/launch-week`. 6. Open [/launch-week](https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app/launch-week), [/launch-week/7](https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app/launch-week/7), and [/launch-week/8](https://zone-www-dot-com-git-www-redirect-legacy-launch-weeks-supabase.vercel.app/launch-week/8). All still load. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
717927f4f2 |
fix(studio): AI assistant notebooks no longer set an invalid database_identifier (#49326)
## Summary - The AI assistant's `create_notebook`/`update_notebook` tools could set a `database_cell`'s `database_identifier` to a value that doesn't correspond to any real database, because no tool exposes a project's actual read-replica identifiers to the model. - An unresolvable `database_identifier` silently breaks the cell: `QueryEditor`'s connection-string lookup fails to find a match, and running the cell fails with `Unable to run query: Connection string is missing` — even though the exact same SQL runs fine when pasted into a manually-created cell (which never sets this field). - Fix: strip `database_identifier` from the agent-facing schema (`agentCellSchema` in `notebook-schema.ts`) entirely, so the model can no longer emit it at all. **This is a temporary fix** until we wire in real read-replica support for the AI assistant (e.g. a tool exposing a project's valid replica identifiers) — the field can be reintroduced once the model has a legitimate source of truth to pull a valid identifier from. - Updated tests that relied on agent cells carrying `database_identifier` to reflect the new behavior, and added a regression test asserting `agentNotebookSchema` rejects a `database_cell` with that field set. Resolves FE-4224 ## Test plan - [x] `notebook-schema.test.ts`, `notebook-operations.test.ts`, `notebook-tools.test.ts`, `AssistantNotebookPreview.test.tsx`, `AssistantNotebookPreview.utils.test.ts` all pass - [x] `tsc --noEmit` clean - [x] Prettier clean on touched files <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved handling of database notebook cells when database metadata is unavailable. * Cells without database identifiers now display “No metadata” instead of an incorrect replica identifier. * Prevented invalid database identifiers from being accepted in agent-generated notebook content. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ebd616fa90 |
fix(studio): auto-retry notebook updates on stale/invalid conflicts (#49323)
## Summary
- **Removed dead client-side refresh UI** in
`NotebookProposalRenderer.tsx` and its test — the diff preview is always
computed from live data, so the check was redundant with the tool's
server-side re-validation
- **Added typed `NotebookToolError`** in `notebook-tools.ts` with
structured metadata (`{ exposeToAssistant: boolean }`) validated by a
zod schema with a literal discriminant tag (`tag:
'notebook_tool_error'`) — tracks the two retryable failures: staleness
conflict and invalid operations (unknown cell id)
- **Encoded errors in `generate-v4.ts` onError** — the one place in the
pipeline that holds the live `Error` before it becomes a string in the
persisted message
- **Extracted and fixed message history filter** into new
`generate-assistant-response.utils.ts` — any tool-error whose
`errorText` decodes against the `NotebookToolError` schema is let
through (with `errorText` rewritten to plain prose so the model sees the
message, not JSON), while other errors stay filtered as before
Net effect: the assistant detects the specific, actionable rejection
reason and retries on its own with no dead button or human intervention
needed.
## Test plan
- Existing unit tests in `NotebookProposalRenderer.test.tsx` pass (dead
button test removed)
- New unit tests in `notebook-tools.test.ts` cover encode/decode
round-trips and error discrimination
- New unit tests in `generate-assistant-response.utils.test.ts` cover
message history filtering with all error states
- `pnpm typecheck` is clean
- `pnpm --filter studio run lint:ratchet` passes (no new ESLint
warnings)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Notebook update errors now provide clearer, structured explanations to
the AI assistant.
* Assistant responses preserve relevant notebook error details while
filtering invalid or temporary tool states.
* **Bug Fixes**
* Improved handling of stale notebook revisions and invalid notebook
update operations.
* Notebook proposal rendering proceeds without an unnecessary refresh
step.
* **Tests**
* Expanded coverage for notebook errors, message filtering,
serialization, and error handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
5d3b84945e |
fix(studio): derive switch-to-preview refs from the branch (FE-4219) (#49320)
"Switch to preview" in the delete flow read its refs from the selected project, so on the branching overview `parent_project_ref` was undefined and the handler bailed with a `console.error` — persistent branches couldn't be deleted. Both refs now come from the `branch` prop, and the not-ready state shows on the confirm button instead of the console. Covered by a new MSW test that fails against the old code. Fixes FE-4219 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved switching branches to Preview mode by using the selected branch’s project information. * Prevented confirmation when no branch is available. * Preserved success notifications and modal closing after a successful switch. * **Tests** * Added coverage for successful updates, API failures, error feedback, request details, and disabled confirmation states. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ebd399ff87 |
fix(www): use li instead of ol in launch week summary lists (#49279)
Closes [FE-4096](https://linear.app/supabase/issue/FE-4096/launch-week-summary-lists-ol-inside-ul-link-where-li-belongs-6-copies) ## 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? Accessibility bug fix. ## What is the current behavior? The launch week summary card renders at the bottom of launch week blog posts. Its two lists are invalid HTML in six copies of the component. - Each entry is an `<ol>` nested directly inside a `<ul>`. Only `<li>` is a valid child of `<ul>`. - The `<Link>` sits inside the `<ol>` rather than inside an `<li>`, so there are no list items at all. Screen readers announce a list of empty items wrapping nested lists instead of a flat list of links. ## What is the new behavior? - Swap every `<ol>` for an `<li>` in the six summary components: LW X, 11, 12, 13, 14, and 15. - Class names and keys carry over unchanged. No visual change. ## Additional context The blog posts stay published. This is a markup fix only. ## Manual testing 1. Open [the Launch Week 15 top 10 post](https://zone-www-dot-com-git-www-fix-lw-summary-lists-supabase.vercel.app/blog/launch-week-15-top-10) on the deploy preview. 2. Scroll to the Launch Week 15 summary card below the article. It shows a Main Stage list and a Build Stage list. 3. Inspect either list. Every direct child of the `<ul>` is an `<li>`, and no `<ol>` appears inside. 4. Repeat on [the Launch Week 12 Wasm FDW post](https://zone-www-dot-com-git-www-fix-lw-summary-lists-supabase.vercel.app/blog/postgres-foreign-data-wrappers-with-wasm) for the Launch Week 12 card. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
6edef9f067 |
chore(www): unpublish the Launch Week 6 page (#49281)
Closes [FE-4100](https://linear.app/supabase/issue/FE-4100/www-remove-httpssupabasecomlaunch-week6) ## 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? Content removal. ## What is the current behavior? `/launch-week/6` is still published. Launch Week 6 ran in December 2022. The page carries its own 1,085-line component, two CSS modules, and a Supabase client that reads the `lw6_creators` and `lw6_tickets` tables. ## What is the new behavior? - Delete the `/launch-week/6` page, its CSS modules, its day data, and its types. - Redirect `/launch-week/6` to `/blog/launch-week-6-wrap-up`, which holds the same content. - Drop the Launch Week 6 card from the archive section on `/launch-week/8`, leaving Launch Week 7. ## Additional context Scope is Launch Week 6 only. Whether the other launch week pages come down is still open with marketing. Assets under `public/images/launchweek/` are untouched. Several are shared across launch weeks, so they need their own audit. ## Manual testing 1. Open [https://zone-www-dot-com-git-www-remove-launchweek-supabase.vercel.app/launch-week/6](https://zone-www-dot-com-git-www-remove-launchweek-supabase.vercel.app/launch-week/6) on the deploy preview. It returns a 308 and lands on `/blog/launch-week-6-wrap-up`. 2. Open [the Launch Week 7 page](https://zone-www-dot-com-git-www-remove-launchweek-supabase.vercel.app/launch-week/7). It still loads. 3. Open [the Launch Week 8 page](https://zone-www-dot-com-git-www-remove-launchweek-supabase.vercel.app/launch-week/8) and scroll to "Previous Launch Weeks". Only the Launch Week 7 card shows. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
7d28bcc26b |
joshenlim/fe 4204 notebooks intellisense toggle (#49300)
## Context Adds an intellisense toggle for explorer notebooks similar to SQL editor + have QueryEditor render definitions via `useAddDefinition` <img width="259" height="162" alt="image" src="https://github.com/user-attachments/assets/278fdabd-1a24-4769-972e-1bce29060463" /> So intellisense will be running in the QueryEditor if intellisense is enabled + source selected is database, otherwise will not run. <img width="982" height="411" alt="image" src="https://github.com/user-attachments/assets/19497aa0-36fc-49ab-853d-cb938b5b18e7" /> Also updated `useAddDefinition` logic to flush the table columns + functions cache in react query - For context in the past we had users run into browser performance issues when definitions were loaded if their database is really big - Hence why we originally added this intellisense toggle - But we previously also required users to refresh the browser after disabling intellisense, as a manual way to flush the cache - So this change should remove the need to refresh the browser after disabling intellisense <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added PostgreSQL IntelliSense with definitions, formatting, and code completions in SQL editors. * Added a notebook option to enable or disable IntelliSense, with the preference saved between sessions. * Improved the notebook’s empty-state appearance. * **Bug Fixes** * Improved IntelliSense cleanup and prevented duplicate registrations when disabled. * Improved query execution state handling while background IntelliSense data loads. * **Tests** * Added coverage for shared registration, cleanup, preference persistence, and IntelliSense-related query handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9738035fec |
Hook up recently updated list (#49296)
## Context As per PR title: recently updated list just comprises of notebooks and chats Note: known API issue that save a notebook doesn't update its `updated_at` value, so you'll notice that if you save a notebook it doesn't move up the recently updated list <img width="281" height="270" alt="image" src="https://github.com/user-attachments/assets/f637a593-09a7-4df4-85b7-43637f04738d" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a home view displaying recently updated notebooks and chats. * Recent items are sorted by update time and limited to five entries. * Added relative timestamps in minutes, hours, or days. * Chat entries open directly, while notebook entries link to their explorer view. * Added an empty state when no recent items are available. * **Bug Fixes** * Excluded unsupported chat types from recent-item results. * Improved handling of unavailable timestamps. * **Tests** * Added coverage for sorting, filtering, limits, and relative-time formatting. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e7c3cad8de |
feat(evals): add notebook eval cases and forbiddenTools scorer capability (#49104)
## Summary - Added ~11 new eval cases for Notebooks AI assistant evals, including: basic notebook cell creation, multi-cell composition (markdown+database+log), log cell time ranges, row_limit defaults, chart config, destructive SQL safety warnings, and hallucination guards for nonexistent tables - Extended `toolUsageScorer` with deterministic `forbiddenTools` field to score both required and forbidden tool usage, enabling eval cases to assert tool choice (e.g., `execute_sql` vs `create_notebook`) without LLM-as-judge - Extended SQL validators (`sqlSyntaxScorer`/`sqlIdentifierQuotingScorer`) to validate SQL inside `create_notebook` database cells (log cells deliberately excluded as they use ClickHouse dialect) - Fixed two real assistant issues in `NOTEBOOKS_PROMPT`: (a) reuse `CLICKHOUSE_LOGS_COMPLETION_INSTRUCTIONS` and schema section to prevent incorrect BigQuery-style SQL in logs queries, (b) require schema verification before writing `database_cell` to prevent queries against nonexistent tables Resolves FE-4087 ## Test plan - All 11 new eval cases run live against OpenAI via Braintrust; traces inspected and validated - Existing unit tests, lint, and typecheck pass <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for creating notebooks with database, Markdown, chart, and log cells. * Improved handling of reusable notebook requests versus one-off SQL queries. * Added guidance for modern ClickHouse SQL and absolute log time ranges. * **Bug Fixes** * Improved SQL validation, row-limit enforcement, and destructive-query safety. * Prevented invalid or nonexistent-table queries from being accepted. * Improved validation of notebook cell types and tool usage. * Improved handling of ClickHouse log queries and database-cell SQL. * Improved evaluation reliability by limiting concurrent test execution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2e65e82ef4 |
docs(platforms): query logs via the ClickHouse endpoint (#49299)
The `logs.all` Management API endpoint runs BigQuery SQL and is being
retired next month. The Platforms guide was the only hand-written doc
still pointing at it.
Repoints the debugging example at `GET
/v1/projects/{ref}/analytics/endpoints/logs`, which serves the same data
as a single `logs` table keyed by `source`, with structured fields in
the `log_attributes` map, and converts the query to the ClickHouse
dialect.
Verified by running the example's exact SQL and curl shape against a
real project on the OTEL logs endpoint: 100 rows, with `status_code` and
`path` populated.
The generated API specs still list `logs.all`; those regenerate from the
platform side.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Documentation**
- Updated the Supabase for Platforms integration guide’s
debugging-projects example.
- Revised the example to use the analytics logs endpoint and unified
logs table.
- Added ClickHouse SQL filtering for edge logs, structured log
attributes, and HTTP errors.
- Improved the example’s alignment with current log query and analytics
capabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
6c6ac567b1 |
feat(studio): workers list behind the workers flag (FE-4188) (#49193)
## What
The Workers list page at `/project/[ref]/workers`, behind
`useFlag('workers')`. Reads `GET /v2/projects/{ref}/workers`.
- Sidebar and command-menu entries, both hidden when the flag is off
- Name search, state and access filters, pagination
- Read-only
Gating, in order: flag off redirects to the project home; a 404 from the
API means the project is outside the alpha allow-list ("not enabled for
this project"); a 403 means the caller lacks the permission
(`NoPermission`); anything else is an `AlertError`.
`parseWorker` in `data/workers/workers.utils.ts` is the only place the
API shape becomes the view model. It validates with zod, so a drifted
response fails the query instead of half-rendering a row.
## How to test
Only on the **Mockamaster** project in staging — it is the one project
in the alpha allow-list, and standing a worker up anywhere else is
involved right now.
1. Staging dashboard → Mockamaster → **Compute** in the sidebar
2. Expect the `dashboard-test` worker: state `Active`, runtime Deno,
private, US West, 2 GB · 1 vCPU · 1 inst
3. Open any other project's `/workers` URL → "Compute is not enabled for
this project"
4. Turn the `workers` flag off → the sidebar entry disappears and the
URL redirects to the project home
Closes FE-4188
|
||
|
|
01d12e83c1 |
docs: migrate logs queries to ClickHouse and link to the SQL Editor (#49273)
The 47 BigQuery-era logs queries across these 20 pages error on the
ClickHouse-backed logs engine ("Backend error! Retry your query."). This
converts them per the rules in `apps/studio/lib/ai/clickhouse-logs.ts`
and repoints every Logs Explorer link at the SQL Editor with the query
source set to **Logs**, since the Logs Explorer is being retired. Also
fixes two stale PostgreSQL 12 links in the tables guide.
Each of the 14 prefilled links was verified to decode back to exactly
the SQL shown on its page. One caveat for review:
`response.headers.proxy_status` in `postgrest-error-codes.mdx` is
unverified — it isn't in the published field reference, and the test
project had no `edge_logs` traffic to confirm against.
Fixes DOCS-1331
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Documentation**
- Updated database, storage, API, and Edge Function logging guides to
use the SQL Editor and current Logs interface.
- Replaced legacy Log Explorer and BigQuery examples with current query
syntax and structured log fields.
- Refreshed troubleshooting queries for error diagnosis, filtering,
aggregation, and performance analysis.
- Improved examples with clearer source filters, status handling,
request details, joins, and result limits.
- Updated PostgreSQL documentation links and clarified how API error
codes appear in responses.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
|
||
|
|
344656edc5 |
fix(auth): add limits to session timouts and reuse inverval (#49312)
Currently, sessions timeouts and reuse interval inputs accepted any values. This PR caps: - absolute session timeout to 1 year - inactivity timeout to 1 year - refresh token reuse interval to 300 seconds Since these maximums are introduced _after_ some projects have values that exceed the new limits, we allow the users to save the form if their values exceed the max but are unchanged. However, if they decide to change the value, it must fit within the limits. <img width="1195" height="402" alt="Screenshot 2026-08-20 at 15 45 49" src="https://github.com/user-attachments/assets/192420e8-4878-4e4b-9d82-0d1cc4074728" /> <img width="1194" height="512" alt="Screenshot 2026-08-20 at 15 46 06" src="https://github.com/user-attachments/assets/bb333c54-daa3-46ac-b144-96263428f4d7" /> <img width="1168" height="323" alt="Screenshot 2026-08-20 at 15 46 35" src="https://github.com/user-attachments/assets/ae38fcf6-bc73-453f-a61b-2d6f2d0ecfee" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Added clear maximum-value guidance for session and refresh-token settings. * Existing projects with previously configured values above new limits can retain those values while making unrelated changes. * Removed session-related settings from the protection authentication form. * **Bug Fixes** * Improved validation for session timeouts, JWT expiration, and refresh-token reuse intervals. * Added clearer validation messages and support for reducing previously over-limit values. * **Tests** * Expanded coverage for boundary values, invalid inputs, saved settings, and submitted configuration updates. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |