Commit Graph

165 Commits

Author SHA1 Message Date
Matt Rossman
2deedf479b chore: untrack next-env.d.ts (#38792)
* chore: untrack `next-env.d.ts`

* chore: `next typegen` in pretypecheck for docs, studio, www
2025-09-17 12:01:41 -04:00
Kevin Grüneberg
b78f56d5c1 fix: disable turbopack for now (#38617) 2025-09-11 05:06:06 +00:00
Kevin Grüneberg
145dee8d20 ci: use turbopack for builds (#38615) 2025-09-11 06:35:06 +02:00
Joshen Lim
b27ad019ce (Clean up) Remove secrets:pull command (#38541)
Remove secrets:pull command
2025-09-09 15:52:45 +08:00
Saxon Fletcher
2538a5c8af Assistant UI refine (#38228)
* try a really long context window to maximize caching

* update examples

* attempt to update packages and useChat

* update endpoints

* update zod

* zod

* update to v5

* message update

* Revert "zod"

This reverts commit ec39bac6b6115830e9fe330c64b6ddccd1f46de7.

* revert zod

* zod i

* fix complete endpoints

* remove async

* change to content

* type cleanup

* Revert the package bumps to rebuild them.

* Bump zod to 2.25.76 in all packages.

* Bump openai in all packages.

* Bump ai and ai-related packages.

* Remove unneeded files.

* Fix the rest of the migration stuff.

* Prettier fixes.

* testing new gptoss models

* sonnet as pro

* back to 3.7

* revert test

* add policy list tool

* fix

* refactor

* ai sdk 5 fixes

* refactor complete endpoint

* edge function prompt

* remove example

* use limited model for completions

* remove duplicate

* Update bedrock.ts

Co-authored-by: divit <27228526+delgado3d@users.noreply.github.com>

* add default check

* only add prefix if more then one region

* temp use api

* refactor to use openai api

* test

* remove unused import

* Prettier lint

* Fix test

* revert back to bedrock

* Tiny style fix for spacing of code blocks from edit message button

* use conversation

* try generate text normally

* prompt adjust

* add list style to prompt

* prompt adjust

* status

* prompt adjust emphasise display query

* rendering

* prompt

* ui updates

* update prompts

* more ui

* ui finesse

* fix

* use streamdown

* remove package

* refactor header

* copy

* prompt adjust

* remove package

* prompt adjust

* Revert "use streamdown"

This reverts commit 22d0e88e544481fd18214385c40c215526bedc30.

* remove streamdown

* margin adjust

* Nit

* Minor clean up

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: divit <27228526+delgado3d@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-28 12:39:26 +07: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
Beng Eu
281a29e904 fix: switch to SSO-based supa-dev AWS profile instead of IAM-based supabase-dev AWS profile (#38179) 2025-08-25 10:37:50 +00:00
Drake Costa
afd82d1ee0 [Replace yup] Refactor Sign In/Up forms to use shadcn and replace yup with zod (#37913)
* refactor sign-in forms, remove `yup-password`

* add missing disabled state to email field

* Fix zod validations for min length

* minor fix loading state sign up form, and use motion div for success state

* Remove unnecessary useState for isSubmitting

* Nit

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-15 13:12:34 +07:00
Jordi Enric
87292512b9 upgrade sentry (#37830)
* upgrade sentry

* bump docs sentry/nextjs

* add error button

* rm sentry test
2025-08-11 15:47:28 +02:00
Saxon Fletcher
d52e2c252b Update AI SDK 5 (#37656)
* attempt to update packages and useChat

* update endpoints

* update zod

* zod

* update to v5

* message update

* Revert "zod"

This reverts commit ec39bac6b6115830e9fe330c64b6ddccd1f46de7.

* revert zod

* zod i

* fix complete endpoints

* remove async

* change to content

* type cleanup

* Revert the package bumps to rebuild them.

* Bump zod to 2.25.76 in all packages.

* Bump openai in all packages.

* Bump ai and ai-related packages.

* Remove unneeded files.

* Fix the rest of the migration stuff.

* Prettier fixes.

* zod

* v4 again

---------

Co-authored-by: Jordi Enric <jordi.err@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-08-08 14:15:39 +07:00
Ivan Vasilov
37c4726145 chore: Bump vulnerable deps (#37244)
* Bump brace-expansion.

* Bump next to non-vuln version.

* Remove old version of @vercel/flags.

* Try to bump prismjs again.

* Bump fastify.

* Dedupe graphql.

* Bump form-data.
2025-07-25 09:11:26 +02:00
Kevin Grüneberg
740eeb8504 feat: mandatory address input for paying customers (#37337)
- Mandatory address input when adding a new payment method
- Removed the global HCaptcha store that wasn't used consistently and would sometimes block payment method changes
- Remove the custom billing address data & tax id form on org creation and plan upgrades in favour of Stripe's `AddressElement`
- Unify usage of the Stripe payment elements into a single component
- Customers can mark "Purchasing as a business" and will then be able to put down a tax id
- Adjusted billing address form to have better labels + tax id is filtered down to selected country
- Adjusted Stripe Elements styling to use floating labels (otherwise very hard to use with address element) + additional styling changes
- New flag to filter out payment methods that do not have an address for org upgrades and credit top ups, this will be enforced a few days after rolling this out
- Added Google Maps Places API integration for address auto-completion via Stripe AddressElement
- Upgraded Stripe dependencies
- Slight adjustments to styling of plan upgrade modal
2025-07-23 18:16:10 +08:00
Drake Costa
af5e591b84 Refactor NewAccessTokenButton to use shadcn components (#36972)
* chore: Refactor `NewAccessTokenButton` to use shadcn components

This brings `NewAccessTokenButton` into conformance with the latest UI patterns of using shadcn based components, zod schemas, and react-hook-form for form submission.

I based this refactor on the implementation of `CreateSecretAPIKeyDialog`, which already made use of the above.

* add success and failure toasts

* add smoke test for `NewAccessTokenButton`, fix vitest config

This adds a minimal test for `NewAccessTokenButton` but more importantly fixes a critical bug in the vitest configuration for `studio`.

Because `restoreMocks: true` was set in the config, this meant that the mock implementation for `window.matchMedia` defined in the `tests/vitestSetup.ts` file was being **reset** to an empty function before each test suite was run. While this didn't appear to be a problem before, that appears to be because none of the existing tests had `motion.div` in their component trees. Since `motion.div` calls `addListener` on a media query as part of it's lifecycle, that meant that any test which included it would fail as `addListener` would be undefined in this situation. Removing `restoreMocks: true` from the config results in the desired mocking behavior.

This change is necessary in order to test any component that has the `FormItemLayout` component, as it uses `framer-motion` to animate in error messages for input elements.

* add warning comment in case of future config regression

* update test cases, reset form on dialog close, testing setup fixes

This fixes an issue with the polyfills for the testing environment, where a call to `useMutation` would fail as a result of `TransformStream` being set to `null`.

Basic tests for access token creation and form resetting added. Adds `@faker-js/faker` to the studio app devDependencies to generate mock data for `msw` endpoint response.

Adds `shx` to the docs app devDependencies to ensure that the `codegen:examples` script runs cross-platform.

* ensure mocked date is a string

* update testing setup, pollyfills and add rich type support to addAPIMock

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* chore: Refactor `NewAccessTokenButton` to use shadcn components

This brings `NewAccessTokenButton` into conformance with the latest UI patterns of using shadcn based components, zod schemas, and react-hook-form for form submission.

I based this refactor on the implementation of `CreateSecretAPIKeyDialog`, which already made use of the above.

* add success and failure toasts

* add smoke test for `NewAccessTokenButton`, fix vitest config

This adds a minimal test for `NewAccessTokenButton` but more importantly fixes a critical bug in the vitest configuration for `studio`.

Because `restoreMocks: true` was set in the config, this meant that the mock implementation for `window.matchMedia` defined in the `tests/vitestSetup.ts` file was being **reset** to an empty function before each test suite was run. While this didn't appear to be a problem before, that appears to be because none of the existing tests had `motion.div` in their component trees. Since `motion.div` calls `addListener` on a media query as part of it's lifecycle, that meant that any test which included it would fail as `addListener` would be undefined in this situation. Removing `restoreMocks: true` from the config results in the desired mocking behavior.

This change is necessary in order to test any component that has the `FormItemLayout` component, as it uses `framer-motion` to animate in error messages for input elements.

* update test cases, reset form on dialog close, testing setup fixes

This fixes an issue with the polyfills for the testing environment, where a call to `useMutation` would fail as a result of `TransformStream` being set to `null`.

Basic tests for access token creation and form resetting added. Adds `@faker-js/faker` to the studio app devDependencies to generate mock data for `msw` endpoint response.

Adds `shx` to the docs app devDependencies to ensure that the `codegen:examples` script runs cross-platform.

* ensure mocked date is a string

* update testing setup, pollyfills and add rich type support to addAPIMock

* fix imports

* fix missing listen call for msw, resolve test type error

* fix imports

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Shift test file

* Smol fix

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-23 16:54:31 +08:00
Drake Costa
57cd26ac77 Move non-layout Storage components to components/interfaces (#37381)
* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Move non-layout Storage related components to `components/interfaces`

* Fix paths

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-22 23:48:20 +08:00
Kevin Grüneberg
de509e2cf7 chore: bump hcaptcha (#37285)
1.12.0 solves an issue with the hcaptcha build and reduces bundle size from 35kb to 6kb
2025-07-18 15:53:21 +08:00
Greg Richardson
283826cbd9 feat: bedrock prompt caching (#37140)
* feat: bedrock prompt caching

* fix: prompt cache point not sending to bedrock
2025-07-15 20:08:31 -05:00
Beng Eu
6504a8460f chore: enable prettier cache, speeds up subsequent runs ~6.5x (#37005) 2025-07-10 20:32:12 +08:00
Greg Richardson
ea91bf4739 Distributes bedrock requests evenly across regions (#36837)
* wip

* feat: distribute bedrock requests across regions

* fix: tests and type errors

* chore: remove AWS_BEDROCK_REGION from turbo.json

* fix: vercel oidc provider to fallback in credential chain

---------

Co-authored-by: delgado3d <27228526+delgado3d@users.noreply.github.com>
2025-07-02 17:35:37 +00:00
Jordi Enric
3b3a75202e feat: add auth reports FE-1569 (#36555)
* feat: add auth reports

* fix reports dates, fix missing queries

* add flag

* fix errorbystatus chart

* fix sign in by grant type

* move formatting to auth report query file

* fix signup by provider, add ratelimitted reqs

* fix sign ups query

* cleanup unused stuff

* cleanup

* rm console logs

* undo logs.utils

* add status code lib, use edge_logs for query

* fix auth error chart footer

* rm redundant rate limited requests chart

* fix db report breaking due to useAuthReport throwing

* move state up, reduce conditional logic in composed chart handler

* reorder reports nav

* rm bg

* fix type err

* fix useChartData

* empty

* fix report header bg

* move to utils

* add AnalyticsInterval import to report.utils for granularity conversion
2025-06-27 11:10:25 +02:00
Joshen Lim
63164fe165 Revert "Revert "Feature/assistant mcp"" (#36687)
* Revert "Revert "Feature/assistant mcp" (#36684)"

This reverts commit 2bff117cde.

* Attempt
2025-06-26 15:02:49 +08:00
Joshen Lim
2bff117cde Revert "Feature/assistant mcp" (#36684)
Revert "Feature/assistant mcp (#35318)"

This reverts commit 3a50dd1f72.
2025-06-26 13:06:50 +08:00
Saxon Fletcher
3a50dd1f72 Feature/assistant mcp (#35318)
* step 1

* use mcp

* system prompt

* clean up

* space

* clean up

* add three state opt in toggle

* clean up

* todo

* hooks

* refactor opt in form and modal

* refinements

* add bedrock

* remove console

* update mcp util

* use bedrock

* remove openai sdk package

* re-add tools

* update complete endpoints

* fix: ai assistant markdown formatting (#35541)

* fix: mcp types and project ref (#35540)

* feat: more flexible aws credential provider (#35538)

* feat: more flexible aws credential provider

* fix: add AWS_REGION to turbo env vars

* change to allowed

* update complete endpoints

* add an additional permission

* refinements

* use claud 4

* legal copy changes

* update other ai functions to use bedrock

* update generate v3 copy

* remove generate sql modal

* fixes for query block

* re-add dragging to reports

* clean up

* add open ai edge function example

* use handle error from fetchers

* remove schema and lean on tools

* copy

* Assistant MCP tests (#36049)

* feat: refactor and test mcp and model logic

* fix: remove get_project tool

* fix: remove additional get_project tool references

* update copy

* Clean up, fixes, refactors

* oops

* Float errors from AI endpoionts as toasts

* Use a env var AWS_BEDROCK_PROFILE for bedrock.

* Rename the env var for AWS bedrock profile.

* feat: support custom aws bedrock env vars

* chore: add comments explaining aws credential chain

* MCP Self Hosted Check (#36185)

support self hosted

* feat: bedrock auth via vercel oidc

* Fix broken unit test

* Feeeex

* Refactor useOrgOptedIntoAi

* Remove useDisallowHipaa hook

* small system prompt change

* readd vercel packages

* fix self hosted

* increase max duration

* try more direct prompt

* max duration 90

* reduce max steps and add loading

* mono font

* backwards compat styling

* Chore/limit number of messages sent to assistant (#36388)

* Limit number of historical messages that get sent to assistant

* Update max chat history to 5

* alignment

* bump mcp server version

* Add feature flag for opt in tags (#36466)

* Add feature flag for opt in tags

* Add one more check

* security section system prompt

* rely on default link and replace image markdown

* Add custom link component to assistant message block (#36527)

* Add custom link component to assistant message block

* Update based on feedback

* Render plain text if URL is deemed unsafe

* fix mcp tools and parse data (#36593)

* Update Admonition for AI Assistant for when opt in is re-enabled (#36663)

* Update Admonition for AI Assistant for when opt in is re-enabled

* Update

* Smol fix

* Fix TS

* Tiny

---------

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-26 12:13:27 +08:00
Greg Richardson
55e5d6b95a feat: revert temp bedrock test api (#36669) 2025-06-25 11:20:43 -06:00
Greg Richardson
dd66bbbcdd feat: temp test api endpoint for bedrock (#36668)
* feat: temp test api endpoint for bedrock

* refactor: consolidate ai imports
2025-06-25 16:58:29 +00:00
Charis
d122f289df feat(api gateway logs): add error code explanation (#36315)
Add the ability to look up error code explanation in API Gateway logs.
Also a bunch of GraphQL-related utilities and generated types for
calling the Content API.
2025-06-24 13:18:12 -04: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
Ivan Vasilov
64d3d1fb7f chore: Bump vulnerable dependencies (#36272)
* Bump vite version.

* Rename and bump the vercel/flags dependency.

* Bump all versions of esbuild to one.

* Bump image-size.

* Bump fastify.

* Bump prismjs.
2025-06-11 10:24:40 +02:00
Ivan Vasilov
7e9076e3ad chore: Bump the rest of the apps to Nextjs 15 (#35475)
* Bump nextjs in the ui-library.

* Bump the nextjs in design-system.

* Bump nextjs to v15 in www.

* Bump the next version in the pnpm catalog.

* Switch all apps to using the catalog version of next.

* Fix ui-lib and design-system to build with next 15.

* Fix some prettier errors.

* Bump the next-eslint package.

* Fix a lint issue about a component starting with underscore.

* Use the catalog version of next in cms app.

* Disable turbo for dev command in www. Remove obsolete experimental flags.

* Return some of the experimental flags.
2025-06-05 12:41:28 +02:00
Ivan Vasilov
181f15752c chore: Move the files in ui-patterns under src folder (#36032)
* Move all components in ui-patterns into src folder. Add exports field for all files.

* Fix all apps to use the new ui-patterns.

* Fix the design-system build.

* Remove all unused rexports from ui-patterns index. Apps should use direct imports instead.

* Change the tailwind content property to include src folder of ui-patterns.

* Remove autoprefixer from the tailwind configs.

* Remove autoprefixer as a dependency.

* Fix the CVA conditions in FormLayout.
2025-05-30 12:46:22 +03:00
Joshen Lim
0a53b2a2e6 Upgrade ConfigCat to V2 for Dashboard (#35712)
* Upgrade ConfigCat to V2

* Update pnpm lock
2025-05-16 17:40:40 +08:00
Jordi Enric
6e91494b16 Add coveralls integration (#35424)
* update gh action, update vitest config

* debug

* debug cov

* idk try something different

* test2

* test3

* add base path

* rm debug

* add apiAuthenticate tests

* supabaseClient tests

* apiWrappers tests

* add apiHelpers tests

* add configcat tests

* add formatSql tests

* add github tests

* add cloudprovider utils tests

* add helpers tests

* fix typeerr

* add missing readonly err

* fix typeerrrs

* fix type errors in apiWrapper tests

* fix apiHelpers test

* add packages/ui tests

* add coveralls flags

* try coveralls parallel config

* fix coveralls parallel config

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-05-08 12:23:37 +02:00
Ivan Vasilov
0cb08341f6 chore: Bump nextjs for the docs app (#35333)
* Bump all versions of postcss to 8.5.3.

* Run next/codemod on the docs app.

* Move two experimental flags into stable. Add next-mdx-remote as a transpiled package.

* Add extra folders to the clean command in docs.

* Fix type errors in docs test.

* Run prettier on the new files.

* remove turbopack, fix fetch revalidation, fix metadata awaits

Couple of minor fixes:
- Turbopack doesn't work in dev because of known MDX loader limitations
(cannot load functions in MDX plugin config)
- Fetches not cached by default anymore in Next 15 so need to manually
cache the ones we need
- Missing a few awaits for metadata generation with page params

* Bump the graphiql version because headlessui/react is not building with Next 15.

---------

Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
2025-05-08 09:27:22 +00:00
Joshen Lim
acd86da9e5 Chore/refactor storage explorer store part 2 (#35382)
* Shift every logic in storage mobx store to storage valtio store

* Deprecate localStores folder

* REMOVE MOBX ENTIRELYYYYYYY 😄

* Update

* Clean up

* Small improvement for rename folder
2025-05-07 12:25:45 +08:00
Charis
50a40f3f64 fix(local dev): download aws secrets manager (#35410)
* fix(local dev): download aws secrets manager

## Before

Local dev secret pull was failing because the AWS secrets SDK was not
available.

## After

SDK added as dev dependency in root.

* Remove the aws-sdk from the apps since it's present in the root package.json.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-05-05 15:38:25 +00:00
Alaister Young
2b419c70a1 chore: add usercentrics for consent management (#35384)
* chore: add usercentrics for consent management

* client component to make next.js happy

* address feedback

* move consent state to common

* fix import

* ensure page events are sent correctly

* add feature flag provider to ui library site

* fix ui lib 500 error

* skip in test env

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
2025-05-05 13:18:48 +08:00
Joshen Lim
9088aa7fe8 Fix query block not showing labels (#35328)
* Fix query block not showing labels

* Readd the css file for react-resizable.

* Add react-resizable package to resolve a style.css file not found issue

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-04-28 22:13:38 +02:00
Ivan Vasilov
48d4194c3f chore: Bump nextjs to v15.3 for studio (#35030)
* Bump nextjs to v15+ in studio.

* Fix imports in css. Fix including markdown files in turbo.

* Add imports to make turbo work in dev.

* Fix the lockfile.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-23 10:24:07 +02:00
Ivan Vasilov
f504436af7 chore: Bump version of monaco editor (#35207)
* Bump monaco editor to 0.52.2

* Bump the cloudflare loaded instances of monaco.

* Fix the types.
2025-04-23 11:32:44 +07:00
Ivan Vasilov
326c7535f6 chore: Bump vulnerable deps. (#34395)
* Bump all testing libs to force babel to upgrade itself.

* Remove react-hooks package, it's included in @testing-library/react.

* Add await to all useEvent calls.

* Remove duplicate babel/helpers.

* Deduplicate babel/core.

* Bump vite to non-vuln version.

* Bump estree-util-value-to-estree.
2025-04-16 10:02:06 +02:00
Ivan Vasilov
eadff19571 chore: Bump React to 18.3+ (#35029)
* Bump react and react-dom to 18.3+.

* Add tailwind to ui package to silence a peer dep warning.
2025-04-15 17:07:53 +02:00
Saxon Fletcher
3e1f02d11d Move assistant stored state in to IndexedDB (#34848) 2025-04-11 18:33:33 +10:00
Saxon Fletcher
5fe1bdd54d container queries basics (#34724)
* container queries basics

* refine padding

* add contain

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-09 15:28:21 +08:00
Jordi Enric
1d4c0af295 Table Editor filters: Add backwards compatible filter parser (#34796)
* add custom parser

* pass old params to setParams

* refactor all this bullshit code to something simpler, add tests

* rm consolelogs

* Address feedback

* fix and rename

* solve conflict

* add testing lib hooks dep

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-04-08 15:46:11 +02:00
Joshen Lim
fa8cf46d50 Chore/refactor download results button to use papaparse (#34693)
* refactor LogTable and PreviewFilterPanel to use DownloadResultsButton

* Remove CSVButton file and remove react-csv dependency

* Update

* Change the download button to use file-saver.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-04-03 13:44:16 +02:00
Ivan Vasilov
6d077a3e28 chore: Bump vite and vitest (#34664)
* Set overrides for vite/esbuild packages, they're not used in production, low risk of something breaking.

* Bump vitest.

* Remove lodash.template from design-system.

* Forgot to run pnpm.
2025-04-03 12:43:28 +02:00
dependabot[bot]
6dce651a94 chore(deps-dev): bump vite from 6.2.1 to 6.2.4 (#34590)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.1 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-04-02 08:45:30 +00:00
Lakshan Perera
a66278b811 Use relative paths in File editor and support existing entrypoint, import map settings (#34553)
* fix: add jsr:@std/path module

* fix: use relative paths for files in editor

* Smol fix

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-03-31 15:23:12 +08:00
Jonathan Summers-Muir
143f49414b Feat/tabs (#31071)
* init

* Update inner-side-menu.mdx

* chore: update SQL sidebar to use ui pattern components

* mor

* Update

* Update index.tsx

* init: merge table editor and sql editor and schema visualization together

* more

* move to valtio

* fix issue with Command+B shortcut

* now shows in treeviews if item is opened in tab

* Update ProjectLayout.tsx

* fix sidebar

* fix schema selector for non explorer version

* show schema name in tabs

* added schema names to tabs

* tabs have been updated to support preview tabs

* fix URL issue

* add empty state stuff

* Update SQLEditorNav.tsx

* preview tab works now

* more tabs stuff. 'new' tab also added

* new tab concept

* updates

* fix type errors

* remove unused files

* update test

* move back button, fix width issues on sidebar

* update sidebar logic

* Update ProjectLayout.tsx

* lots of updates. layouts now streamlined. localstorage for tabs in use

* moar

* bunch of new tab logic

* fix empty tab issue

* Update tabs.ts

* layouts switched

* new pages now have fixed layouts

* fix tabs

* fix code bg

* add tabs support for multiple project refs

* intialization issue

* update ID handling

* fixed isOpened state for SQL snippets

* remove old assistant because its bugging up panels

* preview style works in sql editor

* fix border

* removes preview tab if there is one

* fix background of loading skeleton

* lots of issues with types/icons/redirect

* new tab cards

* snippets in empty state now work

* moar stuff

* tabs now in feature flags

* Update tabs.ts

* Update tabs.ts

* moar

* add feature previews

* remove code not needed

* Update next-env.d.ts

* Delete FeaturePreviewModal.tsx

* fix typescript errors. remove more explorer stuff

* remove explorer files

* fixed issues with templates and quickstarts tab

* fixed active state when tabs are not opted in

* logic error

* fix open/highlight issue when opted out of tabs

* templates/quickstarts now displayed with new cards

* Update recent-items.tsx

* Update new-tab.tsx

* add icon back in

* add old empty state back in

* recent items updated to respect project ref

* localstorage cleanup on deletion

* moar

* overflow tabs now working

* correct tab names used for new sql templates/quickstarts

* ongoing queries fix

* cleanup

* update images

* Update RouteValidationWrapper.tsx

* Update AppLayout.tsx

* Update NavigationBar.tsx

* add headers back into side panels

* improve writing

* tabs now drag and drop a billion times better

* Update tabs.tsx

* Update tabs.tsx

* init issues on stores, which caused a race condition.

* fix hydration error

* fix new tab issue in sql

* Update ProjectLayout.tsx

* Update pnpm-lock.yaml

* Update new-tab.tsx

* move EditorMenuListSkeleton

* Fix type issues

* fixes: DESIGN-87

fixes: DESIGN-87

* refactor sort/filter components

* Update rules-set-button-text.tsx

* remove discussions for now

* small styling fixes

* Update FeaturePreviewModal.tsx

* Update FeaturePreviewModal.tsx

* Update RouteValidationWrapper.tsx

* revert

* revert

* revert

* revert

* revert

* more revert

* Update collapse-button.tsx

* Update SQLEditorTreeViewItem.tsx

* revert

* Update SchemaGraph.tsx

* Delete new-upcoming.tsx

* revert

* Update ProjectLayout.tsx

* fix home link

* Update table-editor.spec.ts

* test update

* Update table-editor.spec.ts

* Fix the playwright tests.

* layout fixes

* layout fix

* revert sort/filter

* Update LastSignInWrapper.tsx

* revert

* revert

* remove

* update file names

* revert

* revert

* revert

* Fix TreeView console error props

* Add guards in SQL Editor to ensure that feature preview tabs changes do not affect existing UI when flag is off

* Fix missing DefaultLayout in SQL editor templates + fix New tab

* Remove console log

* Remove DatabaseSelector for SQL editor on local

* Fix SQL editor shared favorites for local

* Fix test

* Ensure NewTab doesn't show up if flag is not toggled for SQL editor

* Decouple UI state changes from content-query and entity-types-infinite-query

* Fix tab closing unnecessary rerouting

* Beef up feature previews

* Fix create new table from table editor new tab

* Fix tabs getting incorrectly reset when going between table and SQL editors

* Fix last visited SQL snippet for both tabs and not tabs

* Fix last visited table for table editor tabs

* Clear dashboard history when closing last tab

* Fix loading dashboard history

* Add comment to refactor stores

* Ensure we only save up to 8 items for recent items for each type

* Remove unneccesary logic in tabs

* Smol style fix for DeleteAccountButton

* Smol fix

* Fix inability to close New tab

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-03-27 17:46:57 +08:00
Kevin Grüneberg
56e2096f2f chore: cleanup deps (#34433) 2025-03-26 13:38:02 +01:00
Saxon Fletcher
77dfe11248 Edit edge functions (#33727) 2025-03-26 19:54:12 +10:00