Commit Graph
6 Commits
Author SHA1 Message Date
Alaister YoungandAlaister Young df798783e1 [FE-5108] (part 4) refactor(studio): migrate integrations, settings & observability off next/link (#54307)
Part 4 of a 6-PR stack migrating all `next/link` imports in
`apps/studio` onto TanStack Router's `Link` (or plain `<a>` for known
external URLs) and removing `compat/next/link.tsx`.

| Part | PR | Scope |
| --- | --- | --- |
| 1 | #54304 | `data/prefetchers/PrefetchableLink.tsx` and
`components/ui/**` |
| 2 | #54305 | `components/layouts/**` and top-level shell components |
| 3 | #54306 | Database, TableGridEditor, Storage, SQLEditor,
BranchManagement, Branching, Functions, Realtime |
| **4** | **#54307 ← this PR** | **Integrations, Settings,
Observability, LogDrains, Issues, Linter, Reports, QueryPerformance,
QuerySources, ConfigDrift, DiskManagement, Compute** |
| 5 | #54308 | Remaining `components/interfaces/**` (Org, Billing, Auth,
Support, Home, SignIn, ConnectSheet, etc.) |
| 6 | #54309 | Remove `compat/next/link.tsx` shim, Vite alias, and
update basePath tests/docs |

Migrates
`components/interfaces/{Integrations,Settings,Observability,LogDrains,Issues,Linter,Reports,QueryPerformance,QuerySources,ConfigDrift,DiskManagement,Compute}/`
off `next/link`.

**Changed:**

- Replaced `next/link` across all 72 files in Integrations, Settings,
Observability, LogDrains, Issues, Linter, Reports, QueryPerformance,
QuerySources, ConfigDrift, DiskManagement, and Compute interfaces
- Updated legacy permanent-redirect hrefs (`/settings/database` →
`/database/settings`, `/settings/vault/secrets` →
`/integrations/vault/secrets`, `/reports/database#database-size-report`
→ `/observability/database#database-size-report`) to canonical routes
- Flattened legacy nested `<Link><a>...</a></Link>` markup in
`DatabaseReadOnlyAlert.tsx` and dropped `passHref` in
`Integrations/Queues/QueueTab.tsx`
- Standardized external `target="_blank"` anchors with `rel="noreferrer
noopener"`, switched `ObservabilityOverviewFooter.tsx` to `InlineLink` +
`DOCS_URL`, and applied `InlineLinkClassName` to the typed billing links
in `DatabaseReadOnlyAlert.tsx` per review feedback
- Removed `vi.mock('next/link', ...)` from
`Settings/General/Project.test.tsx` and
`MobileIssuesNavigation.platform.test.tsx`

Addresses
[FE-5108](https://linear.app/supabase/issue/FE-5108/replace-the-nextlink-shim-with-tanstack-link)

## To test

- [ ] Navigate across Integrations (marketplace, cron, queues, wrappers,
Vercel/GitHub), Settings (database, infrastructure, read replicas,
logs), Observability, Issues, and Compute pages
- [ ] Verify Logs Preview → Logs Explorer links preserve multi-line SQL
queries in search params
- [ ] Verify billing and database-size links preserve query parameters
and hash fragments

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-12-01 17:02:11 +08:00
Ali WaseemandClaude Opus 5.5 e5aecf2931 fix(studio): make compute deploy snippets match the CLI (#53467)
## Problem

Following the Compute "copy as AI prompt" snippet word for word fails
against the current CLI (3.2.0):

1. `size = "2gb-1vcpu"` → `UnknownComputeSizeError`. config.toml takes
`2gb` / `4gb`; the CLI maps those to the API's `2gb-1vcpu` itself
(`apiSizeFor` in `apps/cli/src/shared/compute/compute-runtimes.ts`).
2. Nothing says to enable `[experimental] compute = true` /
`SUPABASE_EXPERIMENTAL_COMPUTE=1`, so the CLI fails with `Unknown
subcommand "compute"`. SupaSquad testers have hit the same error.
3. For the Dockerfile runtime the prompt read "a Dockerfile entrypoint
(Dockerfile)" and never mentioned the port.
5. Every prompt asked for an HTTP "Hello, world!" server, including
private instances. Private exposure has no inbound network access: a
private instance is a background worker (for example, a loop polling a
pgmq queue) and doesn't listen on any port. Deploying an HTTP server as
private is what produced the `listen tcp :8080: bind: address already in
use` error I hit. The call snippets also sent an `Authorization` header,
but public instances don't verify API keys.
4. The instance CLI commands suggest `supabase compute pull` (doesn't
exist) and `supabase compute logs --follow` (deprecated; there's no
`--follow` on the replacement).

I hit these deploying a Dockerfile hello-world from the snippet.

## Solution

- Write the CLI size (`2gb`) into the config.toml block. The API size
still drives the `# 2 GB · 1 vCPU` comment, and the deploy dialog is
unchanged.
- The prompt says to set `compute = true` under `[experimental]`, and to
link the project before `push`. The CLI snippet exports
`SUPABASE_EXPERIMENTAL_COMPUTE=1`, and the config.toml snippet has a
comment about it.
- The prompt branches on access. Public: serve plain HTTP on `$PORT`
(defaults to 8080) and add your own auth if needed. Private: run a
background worker and don't start an HTTP server. Dockerfile prompts say
"a Dockerfile" instead of the garbled entrypoint.
- Overview tab: "Listening port" shows `$PORT → 8080` for public and
"None (background worker)" for private, and "How to call" only renders
for public instances. The JS and Python call snippets drop the
`Authorization` header.
- The deploy dialog's access description explains both modes instead of
mentioning a publishable key.
- Drop `pull` and switch logs to `supabase logs --remote --service
compute --resource <name>` in both the overview and logs tabs.

Tests cover each of these in `computeInstanceSnippets.test.ts`.

Not in this PR: Studio's `RUNTIMES.node.entrypoint` is `node index.js`,
while the CLI scaffolds `index.mjs` exporting `{ fetch }` (same for deno
`main.ts`). The node/deno prompt may need a similar pass.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 16:42:11 +00:00
supabase-vercel-tedd[bot] 91b780c7d7 feat(studio): layout-shaped loading state for compute instance detail (#52453)
Replaces the three generic shimmer bars on the Compute instance detail
page with a placeholder that follows the loaded layout.

**Why**

While the instance loads, the page showed three full-width bars with no
header, tabs or sections. When the data arrived, the whole page jumped
into a different shape.

**Approach**

A new `ComputeInstanceDetailSkeleton` reuses the same page primitives as
the loaded view (`PageBreadcrumbs`, `PageHeader`, `PageNav`,
`PageContainer`, `PageSection`) and the existing `ShimmeringLoader`, so
widths, padding and breakpoints match the real page:

- Breadcrumbs: the static Compute link, with a placeholder for the
instance name
- Header: a 56px icon placeholder, a title placeholder and three
metadata placeholders (state, runtime, version)
- Tabs: four placeholders sized like the tab labels
- Overview: the static Instances, Container and Resources section
headings, the ready-count line, the 2/4-column instance count grid, and
the container and resource rows

No instance values are shown until the data loads. On a non-overview tab
(`?tab=logs`, etc.), the content area falls back to the same
`GenericSkeletonLoader` the logs tab already uses. Data fetching, error
handling, the "instance does not exist" state and the loaded view are
unchanged.

**Validation**

- New `ComputeInstanceDetail.platform.test.tsx`: holds the instance
request open, checks that the placeholder renders (section headings,
breadcrumb link, no instance name, no tabs, no row labels), then
releases it and checks that the header, tabs, instance counts and
container rows render and the placeholder is gone. The existing Compute
tests still pass.
- `eslint` on the changed files: clean. `pnpm --filter studio lint`: 0
errors.
- `pnpm --filter studio typecheck` (`tsc --noEmit`) ran out of memory in
the sandbox (exit 137) twice, so it was not run to completion.

Co-authored-by: supabase-vercel-tedd[bot] <336548405+supabase-vercel-tedd[bot]@users.noreply.github.com>
2026-10-28 15:56:23 +01:00
Joshen Lim 09a1f431bc Mass update for all lucide icon imports to use the component with Icon suffix (#51659)
## Context

This is largely just a mechanical change here:
Opting to use lucide icons with the `Icon` suffix across all icon
imports within `studio`
- so that it’s clearer which components are icons + reduces the
possibility of name collision with our own components
- e.g <User /> vs <UserIcon />

Also added a eslint rule for this:
<img width="1069" height="167" alt="image"
src="https://github.com/user-attachments/assets/7f36f443-5ca2-4bf6-8d22-86e774513bfc"
/>

And updated `AGENTS.md` as such:
```
Icons come from `lucide-react`, always imported with the `Icon` suffix (`import { CheckIcon, Trash2Icon } from 'lucide-react'`) — never the bare names (`Check`) or `Check as CheckIcon` aliases (lint-enforced).
```
2026-10-14 12:56:55 +02:00
Danny White 476d4a5851 refactor(ui): drop redundant Button variant="default" props (#50161)
## What kind of change does this PR introduce?

Mechanical cleanup on top of the Button default-variant change (#50160).

## What is the current behavior?

Many callsites still pass `variant="default"` even though that is now
the component default.

## What is the new behavior?

Removes redundant static `variant="default"` from legacy `Button` and
`ButtonTooltip` callsites. Keeps explicit defaults where they document
the API:

- `button-default.tsx` and `button-sizes.tsx` demos
- `DocsButton`, which pins neutral styling at the wrapper boundary

## To test

Studio:

- [Auth → Rate
Limits](https://studio-staging-2s957kwc4-supabase.vercel.app/dashboard/project/_/auth/rate-limits):
dirty the form so Cancel appears; Cancel stays neutral, Save stays green
- [Project Settings → API
Keys](https://studio-staging-2s957kwc4-supabase.vercel.app/dashboard/project/_/settings/api-keys):
`DocsButton` in the header actions stays neutral

Design system:

- [Design system →
Button](https://design-system-git-dnywh-dc924ac1-supabase.vercel.app/design-system/docs/components/button):
`button-default` / `button-sizes` still show explicit default styling;
Primary (green) is restricted to the Primary section (and `asChild`)

WWW:

- [www → Brand
assets](https://zone-www-dot-com-git-dnywh-dc924ac1-supabase.vercel.app/brand-assets):
Download logo kit / Download button kit stay neutral
2026-09-11 17:05:26 +10:00
Francesco Sansalvadore 0bf22ee6fc chore(studio): update product naming (#50208)
workers -> compute

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added the Compute experience for deploying, viewing, managing, and
monitoring compute instances.
- Added Compute navigation, instance detail pages, secrets, logs,
deployment dialogs, generated snippets, and CLI commands.
- Added filtering, status, availability, and data-loading support for
compute instances.

- **Updates**
- Updated labels, icons, links, feature controls, unified logs, and
secret-deletion messaging to use Compute terminology.
  - Compute routes now replace the previous Workers routes and pages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-10 16:26:48 +02:00