Commit Graph

9 Commits

Author SHA1 Message Date
Jordi Enric
0c9eb15cba refactor(studio): remove legacy homepage usage section (V1) (#46994)
## Problem

The homepage usage section had two implementations gated by the
`newHomepageUsageV2` ConfigCat flag, with the legacy V1 as the fallback.
That flag has been at 100% in production for months, so V1 is dead code
and the flag branch is unnecessary.

## Fix

- Make V2 the default by removing the `newHomepageUsageV2` flag check in
`Home.tsx`.
- Delete the V1 section (`Home/ProjectUsageSection.tsx`), its chart
(`Home/ProjectUsage.tsx`), and the now-orphaned
`project-log-requests-count-query` plus its query key.
- Shared code (`useProjectLogStatsQuery`, `UsageApiCounts`,
`ProjectLogStatsVariables`) is kept since V2 and other modules still use
it.

The `newHomepageUsageV2` flag can be removed from ConfigCat after this
merges.

## How to test

- Open a project homepage on platform.
- Confirm the usage section still renders (the V2 layout) with no flag
dependency.
- Verify no console errors and no broken imports.
- Expected result: identical homepage usage section to what production
shows today.

## Notes

- This is independent of the in-flight service-health usage charts work
(PR #46373), which is behind its own `newHomepageUsageDeltas` flag.
Whichever merges second will resolve a small conflict on the
`UsageSection` selection in `Home.tsx`.

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

## Summary by CodeRabbit

* **Refactor**
  * Removed project usage statistics section from the home page.
* Simplified the home page experience by consolidating feature flag
variants into a standardized implementation.

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:17:28 +02:00
Charis
3b7052b5a9 cleanup: fix import order and prefixes for studio/data (#44501) 2026-04-03 09:15:57 +02:00
Ivan Vasilov
8b657165b5 chore: Migrate to use custom type for ReactQuery queries and mutations (#40073)
* Add custom types for queries, mutations and infinite queries.

* Migrate all queries to use the new type.

* Migrate all infinite queries to useCustomInfiniteQueryOptions.

* Migrate all mutations to use useCustomMutationOptions.

* Add type to all imports in `types` folder.
2025-11-03 13:18:13 +01:00
Ivan Vasilov
da4a40e308 chore: Migrate RQ functions to use object syntax style (#39895)
* Migrate all uses of invalidateQueries to use object syntax.

* Migrate the remainder of useInfiniteQuery.

* Migrate all setQueriesData.

* Migrate all fetchQuery uses.

* Migrate some leftover functions from RQ.

* Fix issues found by Charis.
2025-10-28 10:43:14 +01:00
Alaister Young
8855d05803 chore(studio): swap react-query to object syntax (#39842)
* chore(studio): swap react-query to object syntax

* Fix small issues found

* Fix realtime settings

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-27 09:38:27 +01:00
Alaister Young
c59be649a3 chore: prefetch project homepage (#30317) 2024-11-07 16:29:07 +08:00
Joshen Lim
163263c3c5 First round of wrapping RQ errors with handleError (#26384)
* First round of wrapping RQ errors with handleError

* Remove the throw before the handleError usage.

* Make the handling of an API error more versatile. Add logging in Sentry if the error is of unknown type.

* Remove throwing of the handleError function.

* Add return type to the handleError function to be never so that we're sure it always throws.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2024-05-17 16:30:55 +08:00
Kevin Grüneberg
f9a55935f5 chore: use type imports for types/interfaces (#21738) 2024-03-04 20:48:22 +08: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