Commit Graph

29 Commits

Author SHA1 Message Date
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
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
Ignacio Dobronich
e29f4ca6f3 chore: add entitlement check to observability log retention (#43469)
### Changes
- Replace plan-based checks (`LOG_RETENTION`, `availableIn`) with
`useCheckEntitlements('log.retention_days')` in the chart interval
dropdown
- `ChartIntervalDropdown` now calls the entitlements hook internally
instead of receiving plan props
- Remove `LOG_RETENTION` constant and `availableIn` from
`CHART_INTERVALS`
- Update consumer components (`ProjectUsage`, `ProjectUsageSection`,
`ObservabilityOverview`) to remove plan prop passing

### Testing
- Head to `/project/_/observability` with a Free plan org.
- Click on the time selector "Last 7 days" is disabled, default is "Last
60 minutes", tooltip shows retention limit and upgrade link

<img width="827" height="151" alt="image"
src="https://github.com/user-attachments/assets/20988398-8f0a-46b6-be3d-af4e9d530f81"
/>

- With a Pro Org and above the "Last 7 days" option should be enabled
2026-03-06 09:05:25 -03:00
Jordi Enric
168c084f4e feat(o11y): overview page (#42098)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Observability Dashboard: unified overview for service health and
database infrastructure with interactive charts and metric cards (CPU,
memory, disk I/O, connections, error rate, slow queries).
* Service Health Monitoring: per-service health cards and a
multi-service table with error/warning counts and drill-down links to
reports/logs.
* Interval Selector: new chart-interval dropdown with plan-aware
retention messaging.
* Menu & Reports: updated Observability menu with Overview entry and
Custom Reports management.
* **Documentation**
  * Added a footer link to troubleshooting guides.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-30 14:00:01 +00:00
Jordi Enric
db0a2ab752 refactor useFillTimeSeriesSorted hook (#42255)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Safer error rendering across analytics and reporting with a fallback
"Unknown error".

* **Tests**
* Added unit tests covering timeseries sorting and timestamp validation.

* **Refactor**
* Standardized timeseries hook and all callers to accept a single
options object and improved nullish handling.

* **New Features**
* Exposed timeseries utilities and explicit options/result types;
exported chart data type.

* **Chores**
  * Relaxed index signatures to allow dynamic metric keys.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-29 21:05:09 +01: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
Kevin Grüneberg
915a08812d feat: support new platform plan (#40890) (#41046)
Forward compatible changes to support new platform plan (similar handling to Enterprise)
2025-12-04 17:31:27 +08:00
Joshen Lim
888b1794c6 Revert "feat: support new platform plan" (#40980)
Revert "feat: support new platform plan (#40890)"

This reverts commit ae4fe1b740.
2025-12-03 10:41:53 +08:00
Kevin Grüneberg
ae4fe1b740 feat: support new platform plan (#40890)
Forward compatible changes to support new platform plan (similar handling to Enterprise)
2025-12-02 15:35:39 +08:00
Saxon Fletcher
d66307f98b fix responsive issues (#40029)
* fix responsive issues

* sidebar width
2025-10-31 19:25:41 +10:00
Danny White
5ff03b2971 feat: custom bucket icons (#39280)
* chore: separate interfaces per bucket type

* chore: reuse existing bucket creation modal for files

* chore: allow external trigger for new bucket modal

* chore: minor fixes

* chore: full-size empty state

* chore: files other tabs

* fix: show tab bar when on file subroute

* chore: use existing table component to list buckets

* fix: tests

* fix: build error

* chore: remove future bucket type components from PR

* fix: dependency

* Couple of refactors to simplify implementation

* Fix TS

* chore: move s3 settings out to sidebar

* fix: minor nits

* fix: reuse existing loading spinners from schema visualiser

* fix: loading for files

* fix: prevent loading of table for zero buckets

* chore: improved loading state

* chore: shimmer on table

* chore: copywriting on S3

* chore: improve empty states

* fix: deprecated input instructions

* fix: filter/search bucket table

* chore: tidy

* fix: tests

* first commit

* improve documentation and fix icon build error

* change svg kebab case to camel case for React

* copy nits

* fix svg codeblock color

* add bucket (normal) icon

* add bucket icon to policies

* add bucket icon to other storage bucket surfaces

* fix spacing on empty state

* fix inconsistent icons in home sections

Make 1:1 with what we have in the sidebar with optically-correct strokeWidth.

* fix icons

Like the previous commit, this makes sure we use the same product icons as in the sidebar.

* clearer bucket add icon naming

* remove unused layouts

* fix naming collision

* Tinnnnyyy nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-08 13:14:03 +11:00
Alaister Young
29e107af4a [FE-1712] chore: use /available-regions endpoint for project creation (#37371)
* chore: use /available-regions endpoint for project creation

* fix types

* make postgres version selection work

* Small nit refactors

* Feature flag changes + fix icons for flags in various places

* Fix creating projects when selecting a smart region

* Fix sending region selection to create project endpoint

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-19 16:36:59 +08:00
Joshen Lim
cab0585533 Fe 1799/consolidate to useselectedprojectquery and (#37684)
* Replace all usage of useProjectContext with useSelectedProjectQuery

* Replace all usage of useSelectedProject with useSelectedProjectQuery

* Replace all usage of useProjectByRef with useProjectByRefQuery

* Replace all usage of useSelectedOrganization with useSelectedOrganizationQuery

* Deprecate useSelectedProject, useSelectedOrganization, and useProjectByRef hooks

* Deprecate ProjecContext
2025-08-06 10:53:10 +07:00
Jordi Enric
ee5279e335 Project Homepage Charts: fix range and add product type (#36132)
fix range and add product type
2025-06-16 11:39:09 +02:00
Jordi Enric
0254adf97e Re add 7 day option (#35958)
* uncomment 7day option

* update types

* Add tooltip

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-06-03 14:07:27 +08:00
Jordi Enric
2fa17afca3 Project Usage: fix types and component (#35934)
* fix types and component

* fix types
2025-05-26 16:38:26 +02:00
Jordi Enric
49774acaa6 default to last 24h in free, 7 days in paid (#35799) 2025-05-23 11:48:14 +02:00
Saxon Fletcher
9d36654fbe add advisor and stats to home (#35580)
* add advisor and stats to home

* public tables

* table count

* small fixes

* loading state

* Clean up + Add links to each advisor

* Last few fixes

* Tinnnnnnyy fix

* Nits to make the layout shift less

* Update LoadingState to minimize layout shift

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-13 21:14:07 +08:00
Jordi Enric
7283c3103e Update project usage chart date picker (#34734)
* update project usage chart date picker

* Refactor ProjectUsage component: comment out unused chart intervals and update default interval state

* rm commented out options

* Fix TS issues

* Small fix

* Smol fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-09 15:11:24 +08:00
Alaister Young
9d534c9f5a fix: response error codes (#30581)
* fix: response error codes

* upgrade docs

* remove request url modification middleware

* move api routes for self-hosted to platform folder

* remove some lib/common/fetch usage

* docs: use middleware for openapi-fetch (#30600)

Get rid of the unauthedAllowedPost function (I don't think there's any harm in letting any requests that require authentication to just 403, they should be disabled at the React Query level and if not they will fail gracefully enough...)

* fix local count query

* add default values for clone mutation

* fix ts and codegen

* add missing lodash dep to playwright tests

* Fix the playwright tests to match the new folder structure for selfhosted variant.

* remove unused import

* Remove unused state

* remove unused sql debug mutation

* remove unused export

* fix notifications query

* fix jwt updating status

* fix typescript

* save sql snippet after renaming

* update codegen & fix ts error

* override array querySerializer

---------

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-20 11:27:38 +08:00
Jordi Enric
b447ef62d1 fillTimeseries: Skip filling if theres a minimum of datapoints (#31311)
* allow fillTimeseries to skip filling if theres a minimum of datapoints

* rm empty string

* allow strings in fillTimeseries defaultValue

* fix header, reduce min data points to do fill

* rm comment
2025-01-04 12:21:19 +01:00
Joshen Lim
91c63be9c9 Surface error from fillTimeseries to the UI (#28086)
* Surface error from fillTimeseries to the UI

* rm consolelog

---------

Co-authored-by: Jordi Enric <37541088+jordienr@users.noreply.github.com>
2024-07-20 00:47:23 +08:00
Joshen Lim
fe4f3fc30c Fix weird margin issue in barchart (#27948) 2024-07-12 16:27:47 +08:00
Alaister Young
70da0f1d1d chore: cleanup packages (#27770)
* chore: cleanup packages

- Avoid circular imports
- Export API-types as types
- pg-format without depending on Node internal Buffer (not browser-compatible)
- Avoid importing from barrel files in ui dir

* chore: avoid barrel file imports in studio (#27771)

* chore: avoid barrel file imports

- Removes some unused imports
- Avoids barrel file import for faster builds + less memory

* add eslint rule

* type fixes

* delete layouts barrel

* delete components/grid barrel file

* delete components/grid/utils barrel file

* delete components/grid/components/common barrel file

* delete components/grid/components/editor barrel file

* delete components/grid/components/formatter barrel file

* delete components/grid/components/grid barrel file

* delete components/grid/components/header/filter barrel file

* remote components/grid/store barrel file

* remove components/interfaces/Auth/Policies barrel file

* delete components/interfaces/Settings/Logs barrel file

* delete components/ui/CodeEditor barrel file

* delete components/ui/Forms barrel file

* delete components/ui/Shimmers barrel file

* delete data/analytics barrel file

* delete hooks barrel file

* cleanup lib/common/fetch barrel file

* final * barral files cleanup

* global react-data-grid styles

* remove console.log

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>

* fix build

---------

Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
2024-07-04 14:48:10 +08:00
Kyle Rummens
523f241067 Fix/#21742 format stats chart numbers (#21760)
fix: format numbers in statistics charts on hover
2024-03-05 15:11:17 +00:00
Michael Owen
b7ea0994e4 Format numbers in statistics charts #21742 (#21750)
use Intl.NumberFormat() without explicit locale.
2024-03-04 18:36:44 +00:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08:00
Alaister Young
42164183f2 fix: add missing asChild props (#19456)
* fix: add missing asChild props

* move csvlink outside of dropdown trigger

* fix incorrect merge
2023-12-06 21:11:32 +11: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