[pull] master from supabase:master - #1180
Merged
Merged
Conversation
## 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 -->
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>
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>
…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 -->
…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 -->
…_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 -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )