From 4ab1a6cbd22063db40ff8f5c84b969ce413f6d31 Mon Sep 17 00:00:00 2001 From: Sean Geoghegan Date: Tue, 1 Sep 2026 16:00:42 +0930 Subject: [PATCH 1/5] chore(docs): add Sean Geoghegan to humans.txt (#49802) ## 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? Adding myself to humans.txt ## What is the current behavior? Please link any relevant issues here. ## What is the new behavior? Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots. ## Summary by CodeRabbit * **Documentation** * Added Sean Geoghegan to the alphabetical team list in the project credits. --- apps/docs/public/humans.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/docs/public/humans.txt b/apps/docs/public/humans.txt index 964214306f51e..78de85cb5b91b 100644 --- a/apps/docs/public/humans.txt +++ b/apps/docs/public/humans.txt @@ -273,6 +273,7 @@ Sana Cordeaux Sasi Kanumuri Sara Read Satya Rohith Gannamanedi +Sean Geoghegan Sean Oliver Sean Romberg Sean Thompson From cd34776be155eb9960fc2e2147349c70c6ad3d35 Mon Sep 17 00:00:00 2001 From: Binita Dhakal <152636304+binitadkl@users.noreply.github.com> Date: Tue, 1 Sep 2026 01:32:18 -0500 Subject: [PATCH 2/5] fix(studio): honor MAINTENANCE_MODE in the TanStack runtime (#48616) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What kind of change does this PR introduce? Bug fix. ## What is the current behavior? Fixes #48559 (diagnosed by @ayaangazali) The TanStack Start runtime never applies maintenance mode. `matchRedirect` in `apps/studio/redirects.shared.ts` takes a `maintenanceMode` flag, and both other consumers wire it from the environment: - `apps/studio/next.config.ts` — `process.env.MAINTENANCE_MODE === 'true'` - `apps/studio/vercel.ts` — same The TanStack call site in `apps/studio/routes/__root.tsx` passed only `pathname`, `search`, `isPlatform` and `hash`, so `maintenanceMode` fell back to its `= false` default. With `MAINTENANCE_MODE=true` on a TanStack deploy that produced two wrong behaviors: 1. No path redirected to `/maintenance` — the app served normally during maintenance. 2. Because the flag read false, the "not in maintenance" branch still applied and sent `/maintenance` → `/`, making `routes/maintenance.tsx` unreachable. Mainly affects self-hosted / Node-server TanStack deploys; the platform deploy is covered by the Vercel edge layer, which does wire the flag. ## What is the new behavior? The TanStack runtime honors `MAINTENANCE_MODE` the same way the Next runtime and the edge config do. **Design note.** The issue asked whether this needs a new `NEXT_PUBLIC_` variable or server-side plumbing, since both would change deployment configuration for self-hosters. Neither is needed. `MAINTENANCE_MODE` is already a *build-time* variable in both existing consumers — Next bakes `redirects()` into `routes-manifest.json` during `next build`, and `vercel.ts` reads it while emitting `vercel.json`. Toggling maintenance has always required a rebuild, never just a server restart. And `vite.config.ts` isn't bound by Next's "only `NEXT_PUBLIC_`" rule: it controls `define` directly, and already re-exposes unprefixed `VERCEL_*` vars the same way. So the existing unprefixed variable is inlined at build time, giving exact parity with **no new env var and no config change for self-hosters**. Three changes: 1. `vite.config.ts` — inline `process.env.MAINTENANCE_MODE` into the bundle. Falls back to `''` rather than being left undefined, so the browser bundle never ends up with a bare `process.env` reference (the failure mode the file already guards against for the Sentry vars). 2. `routes/__root.tsx` — read it into `IS_MAINTENANCE_MODE` and pass it to `matchRedirect`. 3. `redirects.shared.test.ts` — 4 tests for the maintenance branches of `matchRedirect`, which had no coverage at all. `turbo.jsonc` already lists `MAINTENANCE_MODE` under the build task's `env`, so cache invalidation is correct for the Vite build too — no change needed. No README or docs change either, since the env contract is unchanged. ## Additional context Verified end-to-end, not just by unit test. **Browser repro** — built SPA served via `scripts/serve.js`, driven in headless Chromium: | `MAINTENANCE_MODE=true` | lands on | | | --- | --- | --- | | `/project/default` | `/maintenance` | fixes behavior 1 | | `/` | `/maintenance` | | | `/maintenance` | `/maintenance` | fixes behavior 2 | The maintenance page renders real content ("Under Maintenance — We are currently improving our services…"), so the route is genuinely reachable. | control, var unset | lands on | | | --- | --- | --- | | `/project/default` | `/project/default` | normal routing intact | | `/` | `/project/default` | root redirect intact | | `/maintenance` | `/project/default` | correctly bounces away | **Bundle inspection** — the flag compiles to a literal `true` with the variable set and `false` without it, confirming the define reaches the client. **Shell prerender** — checked explicitly, since the maintenance-on rule is a catch-all. Builds with `MAINTENANCE_MODE=true` prerender the SPA shell and pass the post-build smoke test; the prerenderer crawls `/` and the root `beforeLoad` redirect does not fire during shell generation, so no guard is required. **Checks** — 20 unit tests pass, typecheck 8/8, ESLint ratchet passes, Prettier clean. ## Summary by CodeRabbit - **New Features** - Added maintenance-mode routing for unavailable pages. - Preserves query parameters and URL fragments during redirects. - Allows access to maintenance and image paths while maintenance mode is active. - Automatically returns visitors to the home page when maintenance mode is disabled. - Maintenance behavior is controlled by the deployment configuration. - **Tests** - Added coverage for maintenance-mode redirects, URL preservation, and exceptions. Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> --- apps/studio/redirects.shared.test.ts | 59 ++++++++++++++++++++++++++++ apps/studio/routes/__root.tsx | 7 ++++ apps/studio/vite.config.ts | 13 ++++++ 3 files changed, 79 insertions(+) diff --git a/apps/studio/redirects.shared.test.ts b/apps/studio/redirects.shared.test.ts index 5667989470f00..fa08c3a640af0 100644 --- a/apps/studio/redirects.shared.test.ts +++ b/apps/studio/redirects.shared.test.ts @@ -157,3 +157,62 @@ describe('matchRedirect query/hash preservation', () => { ).toBeNull() }) }) + +describe('matchRedirect maintenance mode', () => { + it('sends every other path to /maintenance when enabled', () => { + expect( + matchRedirect({ + pathname: '/project/abc/editor', + search: {}, + isPlatform: true, + maintenanceMode: true, + }) + ).toEqual({ destination: '/maintenance', permanent: false }) + }) + + it('carries query and hash onto /maintenance', () => { + expect( + matchRedirect({ + pathname: '/project/abc/editor', + search: { a: '1' }, + isPlatform: true, + maintenanceMode: true, + hash: 'section', + }) + ).toEqual({ destination: '/maintenance?a=1#section', permanent: false }) + }) + + it('leaves /maintenance and /img reachable when enabled', () => { + expect( + matchRedirect({ + pathname: '/maintenance', + search: {}, + isPlatform: true, + maintenanceMode: true, + }) + ).toBeNull() + expect( + matchRedirect({ + pathname: '/img/supabase-logo.svg', + search: {}, + isPlatform: true, + maintenanceMode: true, + }) + ).toBeNull() + }) + + it('bounces /maintenance back to / when disabled', () => { + expect(matchRedirect({ pathname: '/maintenance', search: {}, isPlatform: true })).toEqual({ + destination: '/', + permanent: false, + }) + expect( + matchRedirect({ + pathname: '/maintenance', + search: {}, + isPlatform: true, + maintenanceMode: false, + }) + ).toEqual({ destination: '/', permanent: false }) + }) +}) diff --git a/apps/studio/routes/__root.tsx b/apps/studio/routes/__root.tsx index 4d1c42e7c4556..9c2e251ef9e81 100644 --- a/apps/studio/routes/__root.tsx +++ b/apps/studio/routes/__root.tsx @@ -139,6 +139,12 @@ const IS_NON_PROD_ENV = process.env.NEXT_PUBLIC_ENVIRONMENT === 'local' || process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging' +// Mirrors the `MAINTENANCE_MODE` reads in `next.config.ts` and `vercel.ts`. +// The var is unprefixed, so vite.config.ts inlines it explicitly (see the +// define there) rather than it arriving via the NEXT_PUBLIC_ sweep — that +// keeps the toggle a single build-time env var across all three runtimes. +const IS_MAINTENANCE_MODE = process.env.MAINTENANCE_MODE === 'true' + // Keep dev-only components out of the production bundle. const IS_DEV_TOOLBAR_ENABLED = IS_NON_PROD_ENV @@ -329,6 +335,7 @@ export const Route = createRootRouteWithContext()({ pathname: location.pathname, search: location.search as Record, isPlatform: IS_PLATFORM, + maintenanceMode: IS_MAINTENANCE_MODE, hash: location.hash, }) if (!match) return diff --git a/apps/studio/vite.config.ts b/apps/studio/vite.config.ts index a238efe54a371..b7bd19442e17f 100644 --- a/apps/studio/vite.config.ts +++ b/apps/studio/vite.config.ts @@ -602,6 +602,19 @@ export default defineConfig(({ command, mode }) => { } } + // `MAINTENANCE_MODE` gates the "redirect everything to /maintenance" rule. + // It's deliberately unprefixed, and the other two consumers both read it at + // BUILD time: `next.config.ts` reads it in `redirects()`, which Next bakes + // into `routes-manifest.json` during `next build`, and `vercel.ts` reads it + // while emitting `vercel.json`. So flipping maintenance has always meant a + // rebuild/redeploy, never just a server restart. Inline it here on the same + // terms so the isomorphic `beforeLoad` in `routes/__root.tsx` — which + // mirrors those rules for the TanStack runtime — can read it on the client + // too, without self-hosters having to set a second, NEXT_PUBLIC_-prefixed + // var. Falls back to `''` (not left undefined) so the browser bundle never + // ends up with a bare `process.env` reference. + publicEnvDefines['process.env.MAINTENANCE_MODE'] = JSON.stringify(env.MAINTENANCE_MODE ?? '') + // Sentry init (lib/sentry-client-options.ts, reached via router.tsx) reads // these at runtime in the browser. When a var is unset it gets no define // entry above, which would leave a literal `process.env.*` in the built From 6e39b17d3cadaf79c93ee212c2a149291412e95b Mon Sep 17 00:00:00 2001 From: Ayaan Gazali Date: Tue, 1 Sep 2026 00:02:32 -0700 Subject: [PATCH 3/5] Merge pull request #49543 from ayaangazali/docs/studio-tanstack-checklist-missing-routes docs(studio): add the 8 missing routes to the TanStack migration checklist --- apps/studio/TANSTACK_MIGRATION.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/studio/TANSTACK_MIGRATION.md b/apps/studio/TANSTACK_MIGRATION.md index e41b2b124dde4..0fdd44ca2006c 100644 --- a/apps/studio/TANSTACK_MIGRATION.md +++ b/apps/studio/TANSTACK_MIGRATION.md @@ -122,6 +122,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/_app/org/$slug/index.tsx` ← `pages/org/[slug]/index.tsx` - [x] A `routes/_app/org/$slug/apps.tsx` ← `pages/org/[slug]/apps.tsx` - [x] A `routes/_app/org/$slug/audit.tsx` ← `pages/org/[slug]/audit.tsx` +- [x] A `routes/_app/org/$slug/audit-log-drains.tsx` ← `pages/org/[slug]/audit-log-drains.tsx` (wraps in OrganizationSettingsLayout inline) - [x] A `routes/_app/org/$slug/billing.tsx` ← `pages/org/[slug]/billing.tsx` - [x] A `routes/_app/org/$slug/documents.tsx` ← `pages/org/[slug]/documents.tsx` - [x] A `routes/_app/org/$slug/general.tsx` ← `pages/org/[slug]/general.tsx` @@ -170,6 +171,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/project/$ref/database/functions.tsx` ← `pages/project/[ref]/database/functions.tsx` - [x] A `routes/project/$ref/database/indexes.tsx` ← `pages/project/[ref]/database/indexes.tsx` - [x] A `routes/project/$ref/database/migrations.tsx` ← `pages/project/[ref]/database/migrations.tsx` +- [x] A `routes/project/$ref/database/policies.tsx` ← `pages/project/[ref]/database/policies.tsx` - [x] A `routes/project/$ref/database/roles.tsx` ← `pages/project/[ref]/database/roles.tsx` - [x] A `routes/project/$ref/database/settings.tsx` ← `pages/project/[ref]/database/settings.tsx` - [x] A `routes/project/$ref/database/types.tsx` ← `pages/project/[ref]/database/types.tsx` @@ -192,7 +194,6 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/project/$ref/auth/overview.tsx` ← `pages/project/[ref]/auth/overview.tsx` - [x] A `routes/project/$ref/auth/users.tsx` ← `pages/project/[ref]/auth/users.tsx` -- [x] A `routes/project/$ref/auth/policies.tsx` ← `pages/project/[ref]/auth/policies.tsx` - [x] A `routes/project/$ref/auth/providers.tsx` ← `pages/project/[ref]/auth/providers.tsx` (sets `skipAuthLayout: true`, wraps in `AuthProvidersLayout` directly) - [x] A `routes/project/$ref/auth/mfa.tsx` ← `pages/project/[ref]/auth/mfa.tsx` - [x] A `routes/project/$ref/auth/hooks.tsx` ← `pages/project/[ref]/auth/hooks.tsx` @@ -258,6 +259,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/project/$ref/logs/dedicated-pooler-logs.tsx` ← `pages/project/[ref]/logs/dedicated-pooler-logs.tsx` - [x] A `routes/project/$ref/logs/edge-functions-logs.tsx` ← `pages/project/[ref]/logs/edge-functions-logs.tsx` - [x] A `routes/project/$ref/logs/edge-logs.tsx` ← `pages/project/[ref]/logs/edge-logs.tsx` +- [x] A `routes/project/$ref/logs/multigres-logs.tsx` ← `pages/project/[ref]/logs/multigres-logs.tsx` - [x] A `routes/project/$ref/logs/pg-upgrade-logs.tsx` ← `pages/project/[ref]/logs/pg-upgrade-logs.tsx` - [x] A `routes/project/$ref/logs/pgcron-logs.tsx` ← `pages/project/[ref]/logs/pgcron-logs.tsx` - [x] A `routes/project/$ref/logs/pooler-logs.tsx` ← `pages/project/[ref]/logs/pooler-logs.tsx` @@ -278,6 +280,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/project/$ref/observability/auth.tsx` ← `pages/project/[ref]/observability/auth.tsx` - [x] A `routes/project/$ref/observability/database.tsx` ← `pages/project/[ref]/observability/database.tsx` - [x] A `routes/project/$ref/observability/api-overview.tsx` ← `pages/project/[ref]/observability/api-overview.tsx` +- [x] A `routes/project/$ref/observability/connections.tsx` ← `pages/project/[ref]/observability/connections.tsx` - [x] A `routes/project/$ref/observability/edge-functions.tsx` ← `pages/project/[ref]/observability/edge-functions.tsx` - [x] A `routes/project/$ref/observability/postgrest.tsx` ← `pages/project/[ref]/observability/postgrest.tsx` - [x] A `routes/project/$ref/observability/query-insights.tsx` ← `pages/project/[ref]/observability/query-insights.tsx` @@ -298,6 +301,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/project/$ref/settings/addons.tsx` ← `pages/project/[ref]/settings/addons.tsx` - [x] A `routes/project/$ref/settings/api.tsx` ← `pages/project/[ref]/settings/api.tsx` (sets `skipSettingsLayout: true` — page is a useEffect redirect) - [x] A `routes/project/$ref/settings/dashboard.tsx` ← `pages/project/[ref]/settings/dashboard.tsx` +- [x] A `routes/project/$ref/settings/code-configuration.tsx` ← `pages/project/[ref]/settings/code-configuration.tsx` - [x] A `routes/project/$ref/settings/infrastructure/index.tsx` ← `pages/project/[ref]/settings/infrastructure.tsx` - [x] A `routes/project/$ref/settings/infrastructure/replica/$replicaId.tsx` ← `pages/project/[ref]/settings/infrastructure/replica/[replicaId].tsx` - [x] A `routes/project/$ref/settings/integrations.tsx` ← `pages/project/[ref]/settings/integrations.tsx` @@ -322,7 +326,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/project/$ref/sql/index.tsx` ← `pages/project/[ref]/sql/index.tsx` - [x] A `routes/project/$ref/sql/$id.tsx` ← `pages/project/[ref]/sql/[id].tsx` - [x] A `routes/project/$ref/sql/templates.tsx` ← `pages/project/[ref]/sql/templates.tsx` -- [x] A `routes/project/$ref/sql/quickstarts.tsx` ← `pages/project/[ref]/sql/quickstarts.tsx` +- [x] A `routes/project/$ref/sql/examples.tsx` ← `pages/project/[ref]/sql/examples.tsx` ### Project shell — `/editor/*` @@ -335,6 +339,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/project/$ref/explorer/index.tsx` ← `pages/project/[ref]/explorer/index.tsx` - [x] A `routes/project/$ref/explorer/notebook/$id.tsx` ← `pages/project/[ref]/explorer/notebook/[id].tsx` - [x] A `routes/project/$ref/explorer/chat/$id.tsx` ← `pages/project/[ref]/explorer/chat/[id].tsx` +- [x] A `routes/project/$ref/explorer/query/$id.tsx` ← `pages/project/[ref]/explorer/query/[id].tsx` ### Auth shell — `/sign-in`, `/sign-up`, etc. @@ -356,6 +361,7 @@ These are the layout-only TanStack files. Most hold a single product layout comp - [x] A `routes/redeem.tsx` ← `pages/redeem.tsx` (RedeemCreditsLayout) - [x] A `routes/logout.tsx` ← `pages/logout.tsx` - [x] A `routes/maintenance.tsx` ← `pages/maintenance.tsx` +- [x] A `routes/verify-email.tsx` ← `pages/verify-email.tsx` ### Error pages (handled at root) From 5d9f94e8cfdef7c3c8f0a4abc168ecb40bb0bf42 Mon Sep 17 00:00:00 2001 From: Jordi Enric <37541088+jordienr@users.noreply.github.com> Date: Tue, 1 Sep 2026 11:55:10 +0200 Subject: [PATCH 4/5] fix(workers): update CLI call instructions FE-4316 (#49808) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem The Workers overview showed deployment CLI instructions in the How to call section, while direct gateway calls do not require an API key. ## Fix Add a dedicated unauthenticated cURL snippet for the overview CLI tab and preserve the deployment CLI snippet in the deploy dialog. ## How to test - Open a Worker overview and select the CLI tab. - Expected result: the copied cURL request targets the gateway URL and has no Authorization header. - Open the deploy dialog. - Expected result: the deployment CLI commands remain unchanged. ## Summary by CodeRabbit - **New Features** - Added a cURL example for invoking Workers. - Updated the “How to call” section to display cURL, JavaScript, and Python examples. - cURL snippets now include the worker URL and request body. - **Bug Fixes** - Improved snippet URL handling and clarified authorization behavior in CLI examples. --- .../Workers/WorkerDetail/WorkerOverviewTab.tsx | 8 +++----- .../interfaces/Workers/WorkerSnippetTabs.tsx | 13 +++++++++++-- .../interfaces/Workers/workerSnippets.test.ts | 11 ++++++++--- .../components/interfaces/Workers/workerSnippets.ts | 9 ++++++++- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx b/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx index 39ee28eb50900..035bf74a74c6d 100644 --- a/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx +++ b/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx @@ -18,7 +18,7 @@ import { LISTENING_PORT, WORKERS_REGION_LABEL } from '../Workers.constants' import type { Worker } from '../Workers.types' import { formatSize, getRuntimeMeta } from '../Workers.utils' import { buildWorkerCliCommands } from '../workerSnippets' -import { WorkerSnippetTabs } from '../WorkerSnippetTabs' +import { WORKER_CALL_TABS, WorkerSnippetTabs } from '../WorkerSnippetTabs' import { CLI_NAME } from '@/lib/constants/workers' interface WorkerOverviewTabProps { @@ -215,9 +215,7 @@ export const WorkerOverviewTab = ({ worker }: WorkerOverviewTabProps) => { How to call - - Call the worker over its gateway URL. Pass your project API key as a bearer token. - + Call the worker over its gateway URL. @@ -229,7 +227,7 @@ export const WorkerOverviewTab = ({ worker }: WorkerOverviewTabProps) => { access: worker.access, instances: worker.declaredInstances, }} - tabs={['cli', 'js', 'python']} + tabs={WORKER_CALL_TABS} /> diff --git a/apps/studio/components/interfaces/Workers/WorkerSnippetTabs.tsx b/apps/studio/components/interfaces/Workers/WorkerSnippetTabs.tsx index 08f181338de2a..d97a36255e45d 100644 --- a/apps/studio/components/interfaces/Workers/WorkerSnippetTabs.tsx +++ b/apps/studio/components/interfaces/Workers/WorkerSnippetTabs.tsx @@ -7,12 +7,19 @@ import { buildWorkerSnippets, type WorkerSnippetInput } from './workerSnippets' import CopyButton from '@/components/ui/CopyButton' import { useProjectSettingsV2Query } from '@/data/config/project-settings-v2-query' -export type WorkerSnippetTab = 'ai' | 'config' | 'cli' | 'js' | 'python' +export type WorkerSnippetTab = 'ai' | 'config' | 'cli' | 'curl' | 'js' | 'python' + +export const WORKER_CALL_TABS = [ + 'curl', + 'js', + 'python', +] as const satisfies readonly WorkerSnippetTab[] const TAB_LABEL: Record = { ai: 'AI Prompt', config: 'config.toml', cli: 'CLI', + curl: 'cURL', js: 'JavaScript', python: 'Python', } @@ -21,13 +28,14 @@ const TAB_ICON: Record = { ai: Sparkles, config: FileCode, cli: Terminal, + curl: Terminal, js: FileCode, python: FileCode, } interface WorkerSnippetTabsProps { input: Omit - tabs?: [WorkerSnippetTab, ...WorkerSnippetTab[]] + tabs?: readonly [WorkerSnippetTab, ...WorkerSnippetTab[]] className?: string } @@ -45,6 +53,7 @@ export const WorkerSnippetTabs = ({ input, tabs = ['cli'], className }: WorkerSn ai: snippets.aiPrompt, config: snippets.configToml, cli: snippets.cli, + curl: snippets.curl, js: snippets.javascript, python: snippets.python, } diff --git a/apps/studio/components/interfaces/Workers/workerSnippets.test.ts b/apps/studio/components/interfaces/Workers/workerSnippets.test.ts index 7070d5f014db6..77f434a143731 100644 --- a/apps/studio/components/interfaces/Workers/workerSnippets.test.ts +++ b/apps/studio/components/interfaces/Workers/workerSnippets.test.ts @@ -11,16 +11,21 @@ const input = (overrides: Partial[0]> = { describe('buildWorkerSnippets', () => { it('points the invoke examples at the worker URL', () => { - const { javascript, python } = buildWorkerSnippets(input({ name: 'embed' })) + const { curl, javascript, python } = buildWorkerSnippets(input({ name: 'embed' })) const url = 'https://abcdefgh.supabase.co/workers/v1/embed' + expect(curl).toContain(`'${url}'`) expect(javascript).toContain(`'${url}'`) expect(python).toContain(`"${url}"`) }) it('leaves a placeholder invoke URL until the project settings resolve', () => { - const { javascript } = buildWorkerSnippets(input({ endpoint: undefined })) - expect(javascript).toContain('[YOUR WORKER URL]') + const { curl } = buildWorkerSnippets(input({ endpoint: undefined })) + expect(curl).toContain('[YOUR WORKER URL]') + }) + + it('does not require authorization for the CLI invoke example', () => { + expect(buildWorkerSnippets(input()).curl).not.toContain('Authorization') }) it('asks for the anon key to invoke a public worker and the service role key for a private one', () => { diff --git a/apps/studio/components/interfaces/Workers/workerSnippets.ts b/apps/studio/components/interfaces/Workers/workerSnippets.ts index de89c173050a4..7cc337d332c39 100644 --- a/apps/studio/components/interfaces/Workers/workerSnippets.ts +++ b/apps/studio/components/interfaces/Workers/workerSnippets.ts @@ -17,6 +17,7 @@ export interface WorkerSnippets { aiPrompt: string configToml: string cli: string + curl: string javascript: string python: string } @@ -46,6 +47,12 @@ export function buildWorkerSnippets(input: WorkerSnippetInput): WorkerSnippets { ...(input.access === 'private' ? [`# note: the CLI can only deploy public workers today`] : []), ].join('\n') + const curl = [ + `curl --request POST '${url}' \\`, + ` --header 'Content-Type: application/json' \\`, + ` --data '{"name":"world"}'`, + ].join('\n') + const configBlock = [ `[${CLI_NAME}.${name}]`, `runtime = "${runtime}"`, @@ -102,7 +109,7 @@ export function buildWorkerSnippets(input: WorkerSnippetInput): WorkerSnippets { `print(res.json())`, ].join('\n') - return { aiPrompt, configToml, cli, javascript, python } + return { aiPrompt, configToml, cli, curl, javascript, python } } export interface WorkerCliCommand { From 911a6c248287da048f211f5b584bab434ac1a6af Mon Sep 17 00:00:00 2001 From: Jordi Enric <37541088+jordienr@users.noreply.github.com> Date: Tue, 1 Sep 2026 11:55:28 +0200 Subject: [PATCH 5/5] fix(workers): rename image version label FE-4317 (#49810) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem The Workers UI exposed the internal image terminology in the displayed version label. ## Fix Rename the Worker detail header and Container setting label to Version while preserving the underlying API field. ## How to test - Open a Worker detail page with an image version. - Expected result: the header reads Version and the Container row label reads Version. ## Summary by CodeRabbit * **Style** * Updated worker details labels from “Image” and “Image version” to “Version” for clearer, more consistent terminology. --- .../components/interfaces/Workers/WorkerDetail/WorkerDetail.tsx | 2 +- .../interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerDetail.tsx b/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerDetail.tsx index 88e8de4d71b45..cca4bac374e18 100644 --- a/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerDetail.tsx +++ b/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerDetail.tsx @@ -118,7 +118,7 @@ export const WorkerDetail = () => { {worker.imageVersion !== undefined && ( - Image {worker.imageVersion} + Version {worker.imageVersion} )} diff --git a/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx b/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx index 035bf74a74c6d..dc38d030041a5 100644 --- a/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx +++ b/apps/studio/components/interfaces/Workers/WorkerDetail/WorkerOverviewTab.tsx @@ -156,7 +156,7 @@ export const WorkerOverviewTab = ({ worker }: WorkerOverviewTabProps) => { {worker.imageVersion !== undefined && ( - + {worker.imageVersion}