Commit Graph
6 Commits
Author SHA1 Message Date
Jordi Enric 189ade6bc3 fix(reports): use minute buckets for short ranges DEBUG-95 (#52145)
## Problem

The last 60 minutes in Shared API Report collapses requests, errors,
response speed, and network traffic into hourly points. This affects the
Data API, Auth, and Realtime reports using ClickHouse.

## Fix

Choose minute buckets for short ClickHouse report ranges and retain
hourly buckets for longer ranges. Existing preset consumers keep their
hourly defaults, and route summaries retain their current behavior.

## How to test

- Open Observability → Data API and select Last 60 minutes. With
requests across the hour, the charts should show minute-level data.
- Switch to Last 24 hours and confirm the charts retain hourly grouping.
- Apply a report filter and confirm the charts and route summaries
respect it.
- Repeat the short-range check on Auth or Realtime.

Validation: 80 focused report tests passed with retries disabled and
shuffled order. The ClickHouse boundary tests failed when the 60-minute
cutoff was deliberately broken, then passed after restoring the fix.
Studio typecheck and changed-file formatting passed. Independent review
found no issues.

The ClickHouse behavior was verified in the preview: minute buckets for
Last 60 minutes on Data API and Auth, hourly buckets for Last 24 hours,
and route filtering on charts and summaries.

Fixes https://linear.app/supabase/issue/DEBUG-95
2026-10-30 10:00:46 +01:00
Charis 205cbe7d26 chore(studio}: enforce import order, remove bare import specifiers (#44585) 2026-04-07 20:34:10 -04:00
Ivan Vasilov cb1e3a8170 chore: Prep work for pnpm (#29610)
* Add all missing libraries in the packages/apps.

* Add all missing Vitest imports to the tests.

* Add some missing exports to ui.

* Fix the admonition export.

* Fix various minor bugs.

* Migrate the ui package to use vitest.
2024-10-01 11:29:37 +02:00
764d10986d vitest & msw integration (#26303)
* Fix tests in tests/unit, tests/components and files under tests, looking into tests/pages

* Fix tests under pages/projects root

* Fix

* Comment out broken tests that im stuck with

* Fix api-report.test

* Fix storage-report-test

* chore: fix some tests

* chore: remove logging

* Fix LogsPreviewer.test.js

* Fix most of logs-query-test

* Skip broken tests instead of false positiving them

* Replace jest with vitest

* Rename all *.test.js to *.test.ts

* Configure vitest to work with jsx

* fix vitest issues, fix tests, skip broken tests, add msw, add next-router-mock

* uncomment file

* add tests for msw and nrm

* Fix failing tests

* fix tests in RowEditor

* fix datepicker tests

* fix type errors and comment out tests that need some refactoring

* leave 1 test so test script works

* rm clog and aaaaa

* rename script

* move msw to studio

* add pckg json which i forgot in last commit

* rm consolelog

* move vitest ui dep

* Move next-router-mock to studio.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: TzeYiing <ty@tzeyiing.com>
Co-authored-by: Kamil Ogórek <kamil.ogorek@gmail.com>
Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-05-29 17:31:20 +02:00
Joshen LimandTzeYiing d025e0f739 chore/fix studio jest tests (#25872)
* Fix tests in tests/unit, tests/components and files under tests, looking into tests/pages

* Fix tests under pages/projects root

* Fix

* Comment out broken tests that im stuck with

* Fix api-report.test

* Fix storage-report-test

* chore: fix some tests

* chore: remove logging

* Fix LogsPreviewer.test.js

* Fix most of logs-query-test

* Skip broken tests instead of false positiving them

---------

Co-authored-by: TzeYiing <ty@tzeyiing.com>
2024-05-11 12:05:25 +02:00
Ivan Vasilov 436bdb10ae chore: Move the studio app to apps/studio (#18915)
* Move all studio files from /studio to /apps/studio.

* Move studio specific prettier ignores.

* Fix the ui references from studio.

* Fix the css imports.

* Fix all package.json issues.

* Fix the prettier setup for the studio app.

* Add .turbo folder to prettierignore.

* Fix the github workflows.
2023-11-15 12:38:55 +01:00