Commit Graph

82 Commits

Author SHA1 Message Date
Jordi Enric
18b273cde0 fix(studio): hide Postgres Version Upgrade logs behind a flag (#48007)
## Problem

The legacy Logs Explorer's Postgres Version Upgrade page (Database
Operations section) shows no results for most users. pg_upgrade_logs
rows aren't tagged with the project attribute the shared logs endpoint
scopes on, only a host field, so the project-scoped query returns
nothing even though the data exists.

## Fix

Hides the Database Operations sidebar section behind a new
showPostgresUpgradeLogs feature flag (default off), following the same
pattern as showMultigresLogs. The page route itself is untouched, only
the sidebar entry point is gated.

## How to test

- With the flag off, open the legacy Logs Explorer sidebar and confirm
the Database Operations section and Postgres Version Upgrade item are
gone
- With the flag on, confirm the section and item render as before

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

## Summary by CodeRabbit

* **New Features**
* Added conditional access to Postgres Version Upgrade logs based on
feature availability.
* Failed Postgres upgrade notifications now show a “View logs” option
only when supported.

* **Bug Fixes**
* Prevented unsupported Postgres upgrade log links and navigation
options from appearing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-17 10:07:00 +02:00
Jordi Enric
bac4814123 fix(logs): color regressions from design system update (#47676)
## Summary
- Fix unreadable "Large ranges may result in memory errors" warning text
in the Logs date picker — a stray `text-warning-foreground` class (dark
ink) was winning over `text-warning` on the dark `bg-warning-300` fill.
- Fix "Search collections..." sidebar wrapper background mismatch —
`bg-background-200` now resolves to the elevated `--card` surface
instead of `--background`, so it no longer matches the sidebar's
`bg-dash-sidebar`.
- Fix the Unified Logs "Live" toggle button rendering blue text instead
of white when active — a leftover `border-info text-info` override was
fighting the `primary` variant's own text color, now that `--info`
resolves to a more distinct blue.

All three are contrast/color regressions surfaced by the recent
design-system color token changes.

## Test plan
- [ ] Open a project's Logs Explorer, pick a large date range, confirm
the warning text is readable
- [ ] Check the Logs sidebar "Search collections..." box background
matches the rest of the sidebar in both light and dark mode
- [ ] Toggle "Live" mode in Unified Logs and confirm the button text is
white/legible on the green background

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

## Summary by CodeRabbit

* **Style**
  * Updated the large-range warning banner appearance in Logs settings.
* Refined the Logs sidebar header background styling for a more
consistent look.
* Simplified the DataTable live button styling behavior by removing
conditional class composition while preserving the existing live-mode
visuals.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-07 13:37:37 +02:00
Gildas Garcia
c6fc456910 chore: cleanup duplicate exports studio (#47387)
## Problem

Knip reports many duplicate exports (both named and default). Besides,
we're moving away from default exports and even have an eslint rule to
enforce it on new code.

## Solution

- Cleanup those exports
- Update imports when necessary

No functional changes. If it builds, it's fine
2026-06-29 15:46:16 +02:00
Joshen Lim
e938016141 Chore/minor logs explorer nudges (#47391)
## Context

Just minor nits i noticed with the logs explorer

## Changes involved
- Add a tooltip to the + button here - wasn't clear what this was doing
<img width="306" height="90" alt="image"
src="https://github.com/user-attachments/assets/8fa18544-9ed3-413f-9816-1e8e760cc0c2"
/>
- Clear query params when deleting a saved query that you're currently
on (reset back to default state)
- Saving a logs query should use the value that's in the monaco editor

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

* **New Features**
* Added a tooltip-enhanced “New query” action in the logs sidebar to
make navigation to the query explorer clearer.

* **Bug Fixes**
* After deleting a saved query, the logs page now clears the related URL
query parameters when the deleted item is currently open.
* Saving an existing query now uses the latest SQL from the editor,
ensuring the stored query text is up to date.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-29 19:18:43 +08:00
Joshen Lim
2bac064adf Joshen/fe 3697 progressively default opt in to unified logs (#47296)
## Context

We're progressively opting in users to use the new Unified Logs UI 🙂🙏

## Changes involved

- [ ] Removed flag for controlling visibility of unified logs feature
preview
- [ ] Added flag for controlling default opt in behaviour of unified
logs
- [ ] Small tweak to Unified Logs banner is default opted in (Just show
"New" and more info CTA)
- Disabling, then enabling again will thereafter show the existing "Go
back to old logs CTA"
<img width="290" height="166" alt="image"
src="https://github.com/user-attachments/assets/a2c46ce1-63c3-490c-bc7d-fc1254982dbe"
/>


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

* **New Features**
* Unified Logs preview now derives default opt-in state from a new
default-opt-in flag and exposes `isDefaultOptIn`.

* **Bug Fixes**
* Removed eligibility-based gating so the “Beta” badge and Unified Logs
banner render consistently across logs screens.
* Unified Logs banner was refactored to handle enable/disable and
navigation internally, while remaining shown unconditionally.

* **Tests**
* Updated mocks and assertions to reflect the revised preview/banner
enablement and dismissal logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-06-25 21:45:40 +08:00
Jordi Enric
587607d335 feat(unified-logs): restore card-style sidebar banners (#47028)
## Problem

When [#46812](https://github.com/supabase/supabase/pull/46812) was
scoped down to "sidebar visual changes only", Kemal's UI redesign of the
Unified Logs sidebar banners was unintentionally reverted back to the
older full-bleed strip layout. The shared `UnifiedLogsBanner` component
survived, but his actual visual design did not.

This PR brings back just Kemal's banner UI changes, with nothing else
from that branch.

## Changes

- **promo variant** (`LogsSidebarMenuV2`): bordered card with a "New"
badge, an "Introducing unified logs" heading, and an "Enable preview"
button + "More information" tooltip button
- **utility variant** (`FilterSideBar`): bordered card for the "Go back
to old logs" action with a "Switch back" tooltip button
- Restore the `mx-4 mt-4` placement in both consumers

Adapted to the current `Button` `variant` API (the original used the
now-removed `type` prop).

## Testing

- `pnpm lint --filter=studio`
- Visual check of the Logs sidebar for an account eligible for Unified
Logs (promo card) and one already on Unified Logs (utility card)

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

## Summary by CodeRabbit

* **New Features**
  * Added a "New" badge indicator to the logs interface.

* **Style**
  * Redesigned the unified logs banner with a new card-based layout.
* Updated the "Go back to old logs" option with improved visual
presentation and tooltip guidance.
* Adjusted spacing and alignment of the banner component for better
visual hierarchy.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: kemal <hello@kemal.earth>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:29:49 +00:00
Gildas Garcia
96d43099bb chore: refactor Button API so that it can be used a standard button (#46880)
## Problem

Our `<Button>` component breaks the default `button` contract by
redefining the `type` prop to set its variant (`primary`, `default`,
etc) instead of the button type (`submit`, `button`, etc).
This is confusing and forces to write more code when using it with
shadcn components that expect/inject the standard button props.

## Solution

- rename the `type` prop to `variant`
- rename the `htmlType` prop to `type`
- propagate the changes where necessary
- format code

## How to test

As this is just prop renaming, if it builds it's ok

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-06-16 23:59:58 +02:00
Jordi Enric
a10bc9a88a feat(unified-logs): compact toggle banner and ArrowDown selects first log (#46812)
Visual cleanup of the Logs sidebar (unified logs):

- Restyle the "Go back to old logs" and "Try Unified Logs" banners as
full-bleed bordered strips (no card), with an icon-only switch-back
button and a tooltip
- Add a "Beta" badge next to the "Logs" sidebar title
- Rename the product from "Logs & Analytics" to "Logs"

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

* **New Features**
* Added Unified Logs banner with “Try Unified Logs” and “More
information” actions, plus a “Go back to old logs” utility layout.
  * Show a **“Beta”** badge for Unified Logs eligibility.

* **UX Updates**
* Updated the Logs experience to consistently display under the
**“Logs”** product layout.

* **Tests / Documentation**
* Updated end-to-end checks and examples to expect the **“Logs”**
heading text exactly.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: kemal <hello@kemal.earth>
2026-06-16 10:50:52 +00:00
Jordi Enric
a7dda67549 feat(studio): add Multigres logs collection for HA projects (#46499)
## Problem

High availability (Multigres) projects don't expose Multigres service
logs in the Studio logs UI, so users on HA projects have no entry point
to inspect them.

## Fix

Add a `Multigres` logs collection, gated behind the `multigresLogs`
ConfigCat flag **and** the project's `high_availability` flag
(`useShowMultigresLogs`):

- New `Multigres` entry in the logs sidebar `Collections`, linking to a
new `multigres-logs` page that queries the `multigres_logs` table.
- Wire `multigres_logs` through the logs constants, types, table SQL,
query type, and service labels.
- Row formatting: parse the JSON `event_message` and render `level`
through `SeverityFormatter` and `msg` through `TextFormatter`, matching
the other service collections (instead of dumping raw JSON).
- `WARN` severity is now styled like `WARNING` (amber), since Multigres
emits `level: WARN`.
- Log detail drawer: parse the JSON `event_message` and spread its keys
onto the log so each field (level, msg, query, error, connection_id,
etc.) renders as its own collapsible row.
- Single-log query omits the `metadata` column for `multigres_logs` (the
table has no such column), fixing an `INVALID_ARGUMENT` error when
opening the detail drawer.
- Event chart: parse the level out of `event_message` via `JSON_VALUE`
so error/warning bars are counted (the table has no top-level level
column).
- Add the `multigres_logs` source schema to the Field Reference drawer,
same gating.

## Why a feature flag

`high_availability` is an existing product feature that predates
Multigres, so existing HA projects could otherwise see a broken
collection querying a `multigres_logs` table they don't have. Requiring
the `multigresLogs` flag ships the feature dark and decouples rollout
from HA status. The flag must be created in ConfigCat before enabling;
until then `useFlag` returns false and the feature stays hidden.

## How to test

- Enable the `multigresLogs` flag (or override locally) and open a
project where `high_availability` is `true`.
- Navigate to `Logs`. Confirm a `Multigres` entry appears under
`Collections` (after `Replication`).
- Open it: the page loads at `/project/<ref>/logs/multigres-logs` and
queries `multigres_logs`.
- Confirm rows show a colored severity pill (including amber `WARN`) and
a readable message rather than raw JSON.
- Confirm the chart counts error/warning bars correctly.
- Click a row: the detail drawer shows each parsed field as its own row,
with no error.
- Open the Field Reference drawer and confirm `Multigres` is listed as a
source.
- With the flag off, or on a non-HA project, confirm the collection and
Field Reference source are both hidden.


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

* **New Features**
* Multigres added as a dedicated log source with its own Logs page,
sidebar entry, and query type.
* Log list and preview now parse Multigres payloads to surface
timestamp, severity, and formatted message.
* Multigres integrated into charting, prompt labels, and field-reference
UI (hidden unless enabled).
* New hook controls showing Multigres UI only when feature flag + HA
project condition are met.
* **Bug Fixes**
  * Severity rendering treats "WARN" the same as "WARNING".
* **Tests**
  * Unit tests added for Multigres parsing and the show-Multigres hook.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 12:00:19 +02:00
Andrey A.
16a09b7ff9 fix(self-hosted): improve UI copy, cards, and timestamp display for edfn (#46175) 2026-05-21 12:10:24 +02:00
Gildas Garcia
0713a1efc1 chore: remove shadcn suffix for Input, Textarea, Alert and Collapsible (#45867)
## Problem

Now that we migrated old components to their new shadcn alternatives, we
don't need the `_Shadcn_` suffix anymore.

## Solution

Remove it

<img width="659" height="609" alt="image"
src="https://github.com/user-attachments/assets/2d7271a9-066a-4dcc-92fe-729b106d2c2f"
/>
2026-05-15 14:55:37 +02:00
Jordi Enric
4e98217500 fix(studio): remove Supabase logo from Logs sidebar items (#45787)
## Summary

- Removes the `SupaIcon` component (inline Supabase SVG logo) from
`LogsSidebarMenuV2.tsx`
- Removes the `icon` prop from the Collections and Database operations
sidebar items
- Makes `icon` optional in `LogsSidebarItem` so the span is only
rendered when an icon is provided

Closes FE-3203

## Test plan

- [ ] Navigate to Logs & Analytics in Studio
- [ ] Confirm Collections and Database operations sidebar items no
longer show the Supabase logo
- [ ] Confirm Saved Queries items still show the SQL editor icon
(unaffected)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

## Summary by CodeRabbit

* **Refactor**
  * Updated the logs sidebar component to make icon display optional.
* Removed icons from sidebar items in the logs navigation to streamline
the interface presentation.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45787)

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-05-11 10:04:12 +00:00
Ivan Vasilov
56de26fe22 chore: Migrate the monorepo to use Tailwind v4 (#45318)
This PR migrates the whole monorepo to use Tailwind v4:
- Removed `@tailwindcss/container-queries` plugin since it's included by
default in v4,
- Bump all instances of Tailwind to v4. Made minimal changes to the
shared config to remove non-supported features (`alpha` mentions),
- Migrate all apps to be compatible with v4 configs,
- Fix the `typography.css` import in 3 apps,
- Add missing rules which were included by default in v3,
- Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot
of classes
- Rename all misnamed classes according to
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all
apps.

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2026-04-30 10:53:24 +00:00
Alaister Young
5f6060197e [COM-205] feat(studio): add logs:all flag to hide all logs (#45202)
Adds a top-level `logs:all` flag (default `true`) so self-hosted and
local setups can hide the logs pages in Studio when Logflare isn't
configured — no separate Studio build required. The flag itself works
everywhere; the additional `ENABLED_FEATURES_LOGS_ALL` env-var override
(from FE-3036) is the self-hosted escape hatch so deployers can flip it
without a custom build — that part is a no-op on `IS_PLATFORM` because
hosted feature gating flows through `profile.disabled_features` instead.

Addresses
[COM-205](https://linear.app/supabase/issue/COM-205/add-feature-flag-to-disable-all-logs-in-studio).

**Added:**
- `logs:all` feature flag in `enabled-features.json` + schema

**Changed:**
- Sidebar "Logs" nav entry is hidden when `logs:all` is off (same
pattern as `reports:all` / `billing:all`)
- Cmd-K "Logs Explorer" / "Auth Logs" / etc. routes are hidden when the
flag is off
- `LogsLayout` renders `<UnknownInterface />` (soft-404) when the flag
is off — covers all ~18 logs pages in one spot
- `/logs/index.tsx` applies the same soft-404 for the unified-logs entry
point

## To test

Needs to be tested locally (preview doesn't let you flip the flag —
hosted gating is profile-driven, not env-driven). Two ways:
- Temporarily edit `"logs:all": false` in
`packages/common/enabled-features/enabled-features.json` and run `pnpm
dev:studio`, or
- Run Studio locally with `ENABLED_FEATURES_LOGS_ALL=false` (env-var
path, same as how self-hosted deployers would use it)

With the flag **off**:
- Sidebar "Logs" entry is hidden
- Cmd-K search for "Logs" / "Auth Logs" / "Postgres Logs" etc. returns
nothing
- Direct navigation to `/project/<ref>/logs`,
`/project/<ref>/logs/explorer`, `/project/<ref>/logs/auth-logs`,
`/project/<ref>/logs/postgres-logs` (etc.) all render the "Looking for
something?" soft-404 with a Head back button

With the flag **on** (default): everything works as it does today.
**Check on the preview deploy too** — nothing should change, no
behaviour difference on hosted.

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-04-27 23:13:42 +08:00
kemal.earth
4ec48666d2 feat(studio): unified logs guard change (#44962)
## 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 changes the guard to expose unified logs to Enterprise. 

**To test:**
- Create an Enterprise org.
- Go to a project and then Logs.
- Default view should be unified logs (with a CTA offering to switch
back to old logs).


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

* **New Features**
* Added enterprise/Supabase-org eligibility checks and loading state for
the unified logs preview.

* **UX**
* Updated messaging to state unified logs are only available to
Enterprise plan organizations.
* Sidebar and filter panels now show unified-logs preview panels based
on eligibility.

* **Analytics**
  * Track unified logs row clicks with a new telemetry event.

* **Bug Fixes**
* Prevent navigation until unified-logs eligibility and preview flag
loading are resolved.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-22 14:39:39 +01:00
Charis
4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Danny White
a753a599ea feat(studio): page titles for logs and observability (#43535)
Stacked PR 3/5 for page title improvements. Includes Logs and
Observability layout title adoption, unified logs title cleanup, and
small route title fixes.

_Base:
[dnywh/feat/page-titles](https://github.com/supabase/supabase/pull/43538)_

---

## What kind of change does this PR introduce?

- Resolves FE-1960
- Resolves FE-1983
- Resolves DEPR-207

## What is the current behavior?

Page titles between surfaces are inconsistent and vague. Sometimes they
say the product name:

```
My Project | My Org | Supabase
```

...even when on a specific surface like Database > Tables.

Other times they show the entity name but skip over the project or org
name :

```
Edge Functions | Supabase
```

## What is the new behavior?

Logs and Observability adopts the layout title format introduced in
https://github.com/supabase/supabase/pull/43538:

```
users | Table Editor | My Project | My Org | Supabase
hello-world | Logs | Edge Functions | My Project | My Org | Supabase
Backups | Database | My Project | My Org | Supabase
Authentication | My Project | My Org | Supabase
```

That format is:

entity, section, surface, project, org, brand.

Also includes unified logs title cleanup, and small route title fixes.

## Additional context

Related stacked PRs also based on the the original
[dnywh/feat/page-titles](https://github.com/supabase/supabase/pull/43538)
branch:

- https://github.com/supabase/supabase/pull/43534
- https://github.com/supabase/supabase/pull/43536
- https://github.com/supabase/supabase/pull/43537

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-03-12 14:08:15 +11:00
Ignacio Dobronich
4f7d4a3b4a chore: dedicated pooler entitlement (#43400)
Adds the new `dedicated_pooler` entitlement and it's respective
entitlement checks in the following components: `ConnectTabContent`,
`ConnectStepsSection`, `LogsSidebarMenuV2` and `ConnectionPooling`

## Testing 

### ConnectTabContent and ConnectStepsSection
- Head to `project/_?showConnect=true` with an Org on the Pro Plan or
above
- Assert that the `Dedicated Pooler` option is available.

<img width="1007" height="641" alt="image"
src="https://github.com/user-attachments/assets/b4891544-b84b-4745-9e25-4cbc7c76686c"
/>

### IPv4SidePanel
- Head to `/project/_/database/settings` with an Org on the Pro Plan and
above and assert that the Dedicated Pooler is available

<img width="889" height="562" alt="image"
src="https://github.com/user-attachments/assets/3150cb3d-18e9-4b34-bc9b-2589d0a33c5f"
/>

### Dedicated Pooler Logs
- Head to `/project/_/logs/dedicated-pooler-logs` with an Org on the Pro
Plan and assert that you are in the `dedicated-poolers-logs` page.
- Head to `/project/_/logs/dedicated-pooler-logs` with an Org on the
Free Plan and assert that you are redirected to `/logs/pooler-logs`


### Logs Sidebar

- Head to `/project/jdvjfujajfyywbaaakje/logs/explorer` with an Org on
the Free Plan
- Assert that only the "Poolers" collection is shown

- Head to `/project/jdvjfujajfyywbaaakje/logs/explorer` with an Org on
the Pro Plan
- Assert that the Dedicated and Shared Poolers collections are shown
<img width="251" height="774" alt="image"
src="https://github.com/user-attachments/assets/747bceee-d5e7-4a8f-911d-6b02cdb115eb"
/>
2026-03-05 13:38:45 -03:00
Jordi Enric
a806f7dc44 feat: add OTLP log drain (#42869)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added OpenTelemetry Protocol (OTLP) as a log drain destination with
configurable endpoint, protocol (HTTP/Protobuf), gzip compression, and
custom headers.
* OTLP appears as a selectable destination in the Log Drains UI with its
own icon and form fields.

* **Documentation**
* Added a full OTLP guide including HTTP/Protobuf details, Collector
example, and authentication examples.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-18 14:44:07 +01:00
Joshen Lim
a54fd1e93c Fix resizeable panel error in LogTable (#42851)
## Context

There's an error from the `LogTable` component `Previous layout not
found` that's caused by trying to set `defaultSize` as a dynamic value
for the `ResizablePanel` component. Theres 2 ways to address this really

Option 1: Set `id` param on `ResizablePanel` to be a dynamic: this came
from a suggestion by the library's author
[here](https://github.com/bvaughn/react-resizable-panels/issues/401#issuecomment-2351010630)

Option 2: Avoid dynamic values entirely

Opting for option 2 as the cleaner way to fix this. Just note as well
that there's a couple of console warnings from the library about
`Invalid layout total size` - this one's safe to ignore and is seemingly
an issue with the current version of `react-resizable-panels` that we're
using (v2, there's currently v4 already)

## To test

Tbh I couldn't reproduce this locally actually, but I happened to come
across this same bug while debugging the `Invalid layout total size`
warning in `DefaultLayout` by trying to set a dynamic value for
`defaultSize` which made me realise the dynamic value was the one
causing that error

<img width="534" height="89" alt="image"
src="https://github.com/user-attachments/assets/3b696c16-ea66-481e-a698-d59841c7400d"
/>


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

## Summary by CodeRabbit

## Release Notes

* **Refactor**
* Improved logs viewer layout with resizable panels for better content
management and log selection display.
* Reorganized internal component structure and module exports for
improved maintainability.

* **Chores**
  * Updated test imports to reflect internal module restructuring.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-16 07:42:14 -07:00
Ivan Vasilov
0d5be306ef chore: Bump React Query to v5 (#40174)
* Bump the deps, refactor deprecated code.

* Migrate keepPreviousData usage.

* Migrate all uses of InfiniteQuery.

* Fix refetchInterval in queries.

* Migrate all use of isLoading to isPending in mutations.

* Fix accessing location in claim-project.

* Fix a bug in duplicate query keys.

* Migrate all queries to use isPending.

* Revert "Fix accessing location in claim-project."

This reverts commit 2a07df64b5.

* Revert the rss.xml file to master.
2025-12-10 10:10:29 +01:00
Danny White
031b227165 studio(chore): badge component defrag (#40118)
* component clean up

* optically center

* docs and type size

* code badge variant

* sensible defaults

* fix product menu flex

* badge sweep

* new project badges

* logs

* compute badge

* studio badge sweep

* www sweep

* docs sweep

* clean up

* fixes

* cleanup

* fixes

* better docs

* fixes

* misc fixes

* consistency

* Minor fixes for issues i found

* simplify mt-0

* mt simplification

* remaining optical alignment

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-02 11:15:50 +11:00
Riccardo Busetti
1a3ba9f15a ref(etl): Rename ETL Replication to Replication and update docs (#40769)
* ref(etl): Rename ETL Replication to Replication and update docs

* Fix

* Fix

* Fix

* Fix

* Fix
2025-11-25 20:45:50 +08:00
Joshen Lim
d78f6a1678 Set up feature for ETL + Analytics Buckets private alpha (#40523)
* Set up feature for ETL + Analytics Buckets private alpha

* Nit

* Add override

* Remove console log

* Update feature flag logic
2025-11-18 17:49:46 +08:00
Riccardo Busetti
91464b8fe8 ref(etl): Rename Replication to ETL Replication (#40202)
* ref(etl): Rename Replication to ETL Replication

* Fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-07 12:02:40 +08:00
kemal.earth
5a0e1cb1cc feat(studio): log drains entry point from logs (#40095)
* fix: field reference button padding

* fix: remove overriding button style on field ref button

* fix: tidy up the asChild stuff on side panel trigger element

* fix: bunch of type errors on logs sidebar

Theres a temp any fix in there dont kill me frontend team :D

* feat: add to new logs sidebar too

* feat: add to download dropdown menus

* chore: alphabetical order on new logs dropdown

* chore: add target blank to sheet footer

* fix: gap between buttons on old logs toolbar

* feat: add a separator on old logs

* style: new logs top buttons correct types
2025-11-05 11:19:50 +00:00
Joshen Lim
75e1717a02 Remove barrel files part 02 (#39956)
* Remove barrel files part 02

* Clean up
2025-10-30 23:50:14 +08:00
Charis
3eb7da7766 feat(preferences): allow disable hotkeys (#39573)
* feat(preferences): allow disable hotkeys

Add a section in /account/me for disabling hotkeys. Only added one
hotkey for now (Cmd + E for toggling editor side panel) but we can add
more with the same pattern.

* refactor: remove default export on ProjectLayout

* feat(hotkeys): allow toggling of command menu and ai assistant hotkeys

* Nit

* PRettier lint

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-17 08:09:38 -04:00
Joshen Lim
d46525eac1 Chore/swap use check permissions with use async check project permissions part 8 (Season Finale) (#38619)
* Update perms checking in audit logs

* Deprecate useCheckPermissions, useIsPermissionsLoaded and useCheckProjectPermissions as they're no longer used

* Rename useAsyncCheckProjectPermissions to useAsyncCheckPermissions

* Fix TS
2025-09-16 17:05:57 +08:00
Jordi Enric
f65884f341 Reports consolidation 1: Edge Functions (#38129)
* wip

* add formatTimestamp for reports

* add tests for formatTimestamp

* fix type err

* rm old chart logic

* do not retry replication sources

* update report config schema

* use report config

* fix charts, simplify config

* sync charts

* rm comment

* usefilltimeseries

* move chart upsell to its own component

* cleanup v2 chart component

* fix chartheader function format bug

* make attributes dynamic

* move types to its own file

* update reportv2chart types

* update reportv2 chart type

* use new edgefn report

* rm mock

* rm old code

* fix type err

* fix type err

* rename hook

* return sql in dataprovider

* add button to open in log explorer in chart header

* fix type

* fix chart type toggle

* fix type error

* export data transformation for testing

* add tests for data transformation

* rm dupped code

* add report settings to edge fn report

* rm mocked data

* rename

* fix type err

* Apply suggestion from @joshenlim

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* rm unnecessary div

* rm unnecessary props from report upsell

* cleaner query keys

* move loadin/error/empty states to inside panel content to prevent layout shift

* use card instead of panel

* use buttontooltip in chartheader

* use buttontooltips in buttons with tooltips

* rm export default

* rm export defualt

* rm i from key

* fix status code transformation

* fix filltimeseries

* add tests for filltimeseries

* fix data transform

* pass xaxis key to chart

* refactor hover state to use timestamp not index

* fix tests

* fix areachart

* fix barchart

* fix chartheader

* fix composedchart

* fix stacked

* fix type missing xaxiskey

* type fix

* Revert "refactor hover state to use timestamp not index"

This reverts commit cfd7886460.

* undo charthover changes, fix data aggregation

* Revert "fix tests"

This reverts commit e5200a2035.

* move transforms to testable functions, add tests

* nit refactors and clean up

* feat: add aws nimbus cloud provider (#38312)

* feat: add aws nimbus cloud provider

* Fix return type of useCustomContent hook

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>

* add utc plugin to dayjs

* move plugins to vitest setup

* rm customparser plugin

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-09-01 11:10:30 +02:00
Joshen Lim
4124f0ed98 Shift useFlag hook and configcat library to common package, remove from Studio (#38203)
* Shift useFlag hook and configcat library to common package, remove from studio

* Fix test

* Fix test
2025-08-27 13:42:20 +07:00
Joshen Lim
7b1ac2a66e Chore/disable more sections 04 (#38064)
* Add flags for policies, third party auth, and manual linking + providers in sign in page

* Add flag for rate limitm page

* Add UnknownInterface components

* Update comment

* Flip flags to true

* Add flags for realtime policies and reports page

* Temp

* Add flag for sign in providers page

* Add flag for stripe wrapper

* Add flag for custom domains

* Add flag for dedicated ipv4 address addon

* Add empty state for realtime policies

* Add empty state for reports page

* Add flag for disable legacy JWT keys section

* Add flag for legacy jwt keys

* nit

* Remove ConnectionStringMoved call out

* Add flag for project settings log drains

* Add flag for subscription link in project settings

* Deprecate settings/auth page and redirect directly to auth page

* Flip back flags

* Add flags for account preferences analytics marketing and account deleetion

* Remove 'table_editor:enable_rls_toggle' flag and revert UI changes

* Remove 'authentication:policies' flag and revert UI changes

* Add flags for cmd K routes

* Add flags for instance size in infra settings

* Small refactor to DisplayApiSettings, decouple ToggleLegacyApiKeysPanel from it

* Have project_connection:javascript_example toggle code example title to TS

* add flag for templates dropdown in logs explorer

* UsesOverview only show link to providers page if providers is enabled

* API Docs UserManagement to only include docs on third party auth if providers is enabled

* Hide instance size on project card if flag is off

* Fix cmd k for roles, update redirect link from settings/auth to auth/providers
2025-08-22 16:17:43 +08:00
Jordi Enric
03b0f35e3d fix unified logs gate (#38010) 2025-08-18 18:39:10 +02:00
Jordi Enric
a9a5c4ef2c unified logs: rm org plan check (#38002)
* rm org plan check

* Nit clean up to remove isOrgPlanLoading check

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-18 14:12:40 +02:00
Alaister Young
71ba2126a5 feat: disable logs features (#37989)
* feat: disable logs features

* Nit tidy up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-18 14:21:04 +08:00
Jordi Enric
99dcbfe3dc add etl logs (#37930)
* add etl logs

* fix missing desc

* rename to etl-replication-logs

* rename sidebar

* Add links to ETL logs

* Fix

* Smol

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-15 13:22:40 +02:00
Jordi Enric
c03dcc1ead remove effect for logs redirection (#37898)
* rm effect

* diff approach, rm effect for unified logs

* simplify, only redirect to explorer, keep unifiedlog check

* clean up

* dynamic url in the sidebar based on unified logs feature preview

* fix deep link missing ref
2025-08-13 15:37:16 +02:00
Jordi Enric
e4837267f6 Warehouse Clean Up (#37507) 2025-07-28 17:14:57 +02:00
Joshen Lim
ec6564b782 Fix unified logs stuff on self-hosted (#37394) 2025-07-23 18:43:13 +08:00
Jonathan Summers-Muir
406b243c3b Chore/coming soon notice (#37276)
* Add 'New logs' feature preview panel to sidebar

Introduces a FeaturePreviewSidebarPanel for the upcoming 'New logs' feature in the LogsSidebarMenuV2 component, providing users with a visual indicator and description about the rollout.

* Update LogsSidebarMenuV2.tsx

* Update apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>

---------

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Wen Bo Xie <wenbox323@gmail.com>
2025-07-17 21:52:40 +00:00
Joshen Lim
ba2c83decc Gate unified logs to team and above (#37260) 2025-07-18 01:08:13 +08:00
Jonathan Summers-Muir
41a5c39305 Feat/logs preview (#37230)
* Add unified logs feature preview and toggle controls

Introduces a unified logs feature preview, allowing users to enable or disable a new logs interface with enhanced filtering and real-time updates. Adds context hooks, UI components (UnifiedLogsPreview, LogsSwitchBox), and conditional logic to display the new interface or revert to the old one. Updates routing and feature preview modal to support the unified logs preview, and extends local storage keys for feature flag management.

* Refactor log UI components and remove LogsSwitchBox

Replaced custom SVG icons with Lucide React icons in LogsSidebarMenuV2 and FilterSideBar for consistency and maintainability. Removed the unused LogsSwitchBox component and cleaned up related imports in FeaturePreviewModal.

* Refactor sidebar panels to use FeaturePreviewSidebarPanel

Introduces a reusable FeaturePreviewSidebarPanel component and replaces InnerSideBarEmptyPanel usages in LogsSidebarMenuV2 and FilterSideBar. Removes unified logs feature flag logic from Sidebar and NavigationBar.utils, simplifying route generation and UI logic.

* Refine sidebar panel styles and remove unused icon

Removed the unused Sparkles icon import from LogsSidebarMenuV2. Updated FeaturePreviewSidebarPanel to use 'bg-muted/10' for background, simplified class names for text alignment, and cleaned up redundant text-left classes for improved styling consistency.

* Update FeaturePreviewModal.tsx

* Update FeaturePreview.constants.tsx

* Clean up

* Final clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-17 16:14:04 +08:00
Joshen Lim
f223b455d6 Unified Logs (Part 1) (#36298)
* init new unified page

* moar logs

* init

* add infinite and live logs example

* Update useLogsPreview.tsx

* add more sources

* wrapped auth logs with edge logs

* add role and user id

* move unified logs

* init

* move demo pages. create a new directory to work in

* extracted beta unified logs into own components

* add example base page and components

* add new files to use actual logging query

* more organization

* change import

* adds new logs page. adds new query

* add data table to UI pacakges

* revert

* table styles

* text size

* add timestamp, table, icons for log types, status code styling

* add host

* add log count to edge functions

* starts to add dynamic filtering

* spiking trace UI

* Update status-code.ts

* add new linik

* now using POST

* fix chart data for default 1 hour view

* update API to accept POST requests

* new filters

* Update level.ts

* fixed up chart to work on level filter. split up the logic into new files

* prep for log type

* prepped query for WHERE

* fix: issue with white space in url param column parsing

* level param now being removed correctly.

* fix issue with chart showing wrong buckets for different time ranges

* remove old query

* refactor the queries into function for each source

* total count fixed

* lots of layout

* start fixing log counts

* comment out min and max for a while

* added trace logging prototype in

* random trace logs added for demo

* added logs and ui to view logs if any

* add Auth user

* fix the live logs issue

* some left over code

* Midway

* First pass refactor + clean up + reorganize files

* Fix TS issues

* Remove unused files

* Clean up

* Final clean up

* more clean up

* More clean up

* Remove unused packages

* Fix

* Lint

* Add feature flag for unified logs

* Refactor

* Remove trace UI

* Snake case log types

* more clean up

* More clean up

* Fix ts

* more clean up

* fixes

* add flag check and redirect if flag is false

* Update middleware.ts

* Nit lint

* Fix

* Last refactors

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2025-06-20 12:46:17 +08:00
Jordi Enric
cd573086b1 Log Explorer improvements (#36140)
* make create button go directly to log explorer if warehouse is disabled

* fix limit clause in uppercase not caught by warnings

* make warning tooltip improve spacing

* fix date not updated on log explorer
2025-06-04 18:36:26 +02:00
Jordi Enric
55c3fdb49a E2E Testing Setup Consolidation (#35080)
* add new e2e folder

* add local supabase and confitional storage

* fix e2e selfhosted

* update actions

* add correct e2e folder

* fix e2e actions

* fix action project ids

* fix permissions

* fix script

* fix playwright install

* playwright root

* pnpm i

* fix api rul

* add env docs

* update run script

* only install deps for e2e

* use same dep

* only install deps for tests

* upd lockfile

* use official vercel integration

* use vercel cli

* remove old folder

* fix script

* rm filter

* rename e2e studio package

* fix install browsers

* add polling for vercel build

* use vercel-preview-url package

* undo actions

* rename ci env to ci

* chore:add rls check and make playwright test less flakey (#35348)

* update ci action

* fix paths

* fix browser install

* run ci against staging

* try caching builds

* fix envs

* fix env check

* fix sign in

* fix sign in url

* fix envs and url

* fix caching

* fix race condition in sign in page

* fix race condition in sign in page

* add check to see if being redirected

* fix caching, check IS_PLATFORM var

* log is_platform

* try vercel build

* fix vercel project id

* fix path

* add temp vercel.json file

* fix paths

* undo project id stuff

* rm cwd

* fix path

* fix paths again

* fix path

* fix base url

* try different fix

* fix config base url

* fix base studio url issues

* retain video on fails

* Update e2e/studio/README.md

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

* Update e2e/studio/README.md

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>

* fix env file naming

* undo caching

* rm old tests folder

* fix readme scripts

* rm vercel deploy for now, just run build locally

* fix url

* fix build script

* fix is_platform

* fix stuck studio start

* fix env vars

* retain network and logs on fail for better debugging

* add apiurl env

* back to vercel

* disable catpcha

* fix test

* update environment configuration to remove default URLs for CI and streamline API base URL handling

* fix typeerr

* fix urls in home.spec

* fix urls in logs.spec

* fix urls in sqleditor spec

* fix table editor spec

* add tourl util

* use staging api in ci

* re add base url env var

* fix url in projects page

* fix url in sql editor spec

* fix sign in not waiting for cookies omfg

* fix env var name

* fix sql-editor test

* simplify table removal

* add opt out telemetry step

* fix logs tests

* fix table editor spec

* remove flaky steps from table editor tests

* use vercel deployment events instead of build

* add studio check

* fix condition

* debug event

* rm if

* trigger deploy

* undo ac

* make opt out button step optional, some envs dont hav eit

* use testid for sql run button

* use id instaed of timestamp in logs tests

* empty

* rm retries

* up glbal timeout

* chore: fix failing sql-editor playwright test (#35767)

* chore: fix failing sql-editor playwright test

* chore: minor fixes

* Chore/update playwright config (#35826)

chore: update playwright config

* rm supabase project from e2e tests

* refactor and simplify environments

* fix sql editor test

* fix ci env vars

* fix

* fix on windows

* update readme

* add playwright install script to readme

* rm turbopack trace flag

* npm to pnpm for scripts

* delete ivan lines

---------

Co-authored-by: Michael Ong <minghao_3728@hotmail.com>
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
2025-06-03 17:37:39 +02:00
Francesco Sansalvadore
a4cfcd9b2e global user dropdown in docs and www (#35063)
* docs: user nav dropdown

* www: user dropdown nav

* update menus

* chore: add complete local storage allowlist

* move all local-storage to common

* reload after logOut

* add local storage key changes from #35175

* fix errors

* add more keys

* fix merge bugs

---------

Co-authored-by: Alaister Young <a@alaisteryoung.com>
2025-05-05 11:48:06 +02:00
Paul Cioanca
80edc92c62 feat: expose database upgrade logs to end-users (#27924)
* feat: expose pg_upgrade logs to end-users

* chore: don't display database operations group if deployed on the platform

* chore: remove log file from schemas

* chore: bring changes up to date

* Fix layout

* Refactor

* Clean up

* Check if using DefaultPreviewSelectionRenderer is sufficient

* Clean up file

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-21 11:45:48 +07:00
Kevin Grüneberg
2b94dd7430 feat: Dedicated Pooler rollout (#34240) 2025-03-21 14:46:58 +01:00
Jordi Enric
7eeab4ebb3 allow nested routes for last visited route in logs (#33775)
allow nested routes
2025-02-21 20:39:15 +01:00
Jordi Enric
b6e126c331 Feat: remember last visited route in logs FE-1418 (#33486)
* add logic to remember last route

* add default redirect

* move logic to index page

* Simplify logs page redirect logic

* missing }

* fix wrong }

* wait 2s for page to redirect

* use latest version in local studio cli test

* rm timeouts looks like it takes longer in ci

* Clean up

* Fix broken commands

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-20 14:42:01 +08:00