261 Commits

Author SHA1 Message Date
Charis
a820c56ed0 chore: docs linting (#33574) 2025-02-21 14:13:00 -05: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
Joshen Lim
ca37f16f58 Chore/refactor e2e tests (#33647)
* Set up E2E tests for staging

* update

* Update

* Update .env.staging.example

* Fix node modules

* Fix

* Attempt to swap local-studio-tests to use the new studio-tests directory

* Omit storage state if running tests for local self host

* Fix test:local command

* Deprecate local-studio-test folder

* Rename local studio tests GH action to E2E test
2025-02-20 12:02:41 +08:00
Beng Eu
c2547eec4f fix: hide pnpm update message, it's confusing since the pnpm version is locked; update to pnpm 9.15.4 (#33232) 2025-02-06 14:57:01 +08:00
Charis
2d55512553 chore: activate spelling and admonitions lints for docs (#33292) 2025-02-04 13:18:31 -05:00
Pamela Chia
d50fa11757 feat: add homepage click events (#33005)
* feat: add homepage click events

* fix codeowners telemetry filepath
2025-01-22 17:20:47 -08:00
Alaister Young
30c390c19c chore: unify telemetry event sending (#32861)
* chore: unify telemetry event sending

* organize some imports

* remove final useTelemetryProps

* add www telemetry actions typing and docs

* remove gaevents

* fix build

* move telemetry identify into PageTelemetry

* fix telemetry constants import

---------

Co-authored-by: Pamela Chia <pamelachiamayyee@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-01-22 23:52:32 +08:00
Charis
a5daf7cee4 fix: troubleshooting sync workflow (#32778)
Workflow was missed when updating to pnpm
2025-01-14 18:21:17 -05:00
Ivan Vasilov
ab3a3b3c76 chore: Move playwright tests to tests/local-studio-tests (#21488)
* Move the playwright package to tests folder.

* Update the workspace list.

* Change the name of the playwright tests to local studio tests.
2025-01-09 12:36:32 +01:00
Wen Bo Xie
e6b31c6644 chore: add spam detector to auto-label-issues.yml (#32611)
* chore: add spam detector to auto-label-issues.yml

* Update .github/workflows/auto-label-issues.yml

Co-authored-by: Etienne Stalmans <staaldraad@users.noreply.github.com>

---------

Co-authored-by: Etienne Stalmans <staaldraad@users.noreply.github.com>
2025-01-08 09:45:16 +01:00
Charis
4f6b2be178 fix(ci): comments also appearing on internal prs (#32538) 2025-01-02 23:27:21 +01:00
Charis
d21a2a0cbc chore(ci): comment on external PRs (#32529)
Comment on external PRs with some tips for speeding up review process
2025-01-02 16:05:58 -05:00
Ivan Vasilov
dd572efb0d chore: Switch repo to use pnpm (#29928)
* Fix some missing and duplicate dependencies.

* Fix the types for jest in ai-commands package.

* Replace all npm commands with pnpm. Add pnpm files and workspace links.

* Fix rimraf to work with pnpm.

* Refactor the github actions to work with pnpm.

* Delete package-lock.json.

* Fix the tailwind configs to not include node_modules.

* Fix random files.

* Add preinstall scripts to all packages.

* Fix the Dockerfile to work with pnpm.

* Update the DEVELOPERS documentation.
2024-12-20 13:07:20 +01:00
Long Hoang
5247a6f7e5 chore: add code owners for event documentation (#31191) 2024-12-17 09:36:09 +01:00
Charis
931d01090b ci: lint docs on push to master (#31176)
Docs lint errors can make it into master through a race condition:

- PR with lint configuration changes is made
- Separately, a PR that is incompatible with the new configuration (but _is_ compatible with the old one) is merged

This can be annoying for downstream PRs, so lint post-merge, and create a PR with auto-fixes if possible.
2024-12-16 17:35:07 -05:00
Charis
d69902da94 chore(docs): lint all sections with linter v2 (#31110)
lint(docs): heading capitalization
2024-12-16 14:33:25 -05:00
Charis
ba132968cd ci(docs): fix linter v2 pipeline (#30930)
The linter was failing whenever grep turned up empty because pipefail was on, now ignoring grep error so it'll stop erroring on all irrelevant PRs 😵
2024-12-05 15:48:19 +00:00
Charis
4cecae1e09 ci(docs): linter bump version + expand scope (#30860) 2024-12-04 20:37:49 +00:00
Charis
572111224b ci(docs): bump linter + expand linting to auth section (#30704) 2024-11-28 10:26:00 -05:00
Andrew Valleteau
419eba99a1 fix(self-hosted): self hosted docker compose (#30674)
* fix(self-host): ensure migrations connect back to postgres database

* fix(self-host): use supabase_admin user for supavisor pooler

* fix(self-host): services healthchecks

* fix(self-host): vector config path

* feat(ci): add smoke test for self-hosted stack

---------

Co-authored-by: Shawal Mbalire <mbalireshawal@gmail.com>
Co-authored-by: Robson Martins <robson@controle.digital>
2024-11-28 11:37:08 +00:00
Charis
78d0755008 docs(ci): expand linter scope (#30678)
Expand linter scope to cover `ai` directory as well.
2024-11-26 14:28:40 -05:00
Charis
d9a1a615f5 ci: linter v2 (#30480)
PR to start introducing Linter V2!

Primary improvements from this linter:

Better parsing of MDX (fewer false positives)
More flexibility
And suggested autofixes! (see auto-generated PR comment below for how that works)
Turning this on for only a small portion of the repo at first to avoid an avalanche of alerts, will slowly expand from there.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-22 15:22:05 -05:00
Charis
fe50beb8a5 ci(docs): lint only changed files (#30589) 2024-11-21 17:00:20 -05:00
Han Qiao
1440bf04dc chore: update auth url config for preview (#30544) 2024-11-19 22:41:24 +08:00
Etienne Stalmans
37a9a58880 chore: add security as codeowners (#30432)
Security need to review pages that contain payment processor content, as
per PCI-DSS.
2024-11-14 14:52:26 +01:00
Charis
3f08a033d9 fix: autofix action (#30421)
Autofix action is failing with error message:

```
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use

    git push origin HEAD:<name-of-remote-branch>
```

This is because the checkout action on a PR by default checks out the merge commit, which is not a branch. Instead, check out [`github.head_ref`](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context), which will point to the source of the PR.

---------

Co-authored-by: github-tidy-bot <github-tidy-bot@supabase.com>
2024-11-11 16:18:42 -05:00
Charis
4a82aabaf0 feat(docs): sync troubleshooting (#29933)
When a troubleshooting entry is created or updated in this repo, sync it to GitHub. This creates a new troubleshooting discussion if one does not exist, and updates the content on an existing troubleshooting discussion if it has changed.

To preserve the connections between GitHub discussions and Markdown files, record the discussion ID and URL to the database. The database ID is then written to the Markdown file, and a new PR is generated to commit the new Markdown with ID.

There is currently no mechanism to delete outdated discussions. That will be a follow-up.
2024-10-29 12:58:46 -04:00
Charis
c2fe11850d feat: embed code samples from github (#29519)
Add the ability to embed code samples from GitHub into tutorials, so we can have a single source of truth for the source code.

Introduces the <$CodeSample /> syntax, which is a special syntax and not a real React component (see the directives/README.md for why on earth I did it this way -- in this specific case, CodeHike adjusts the MDX syntax tree before it gets compiled, and we need to adjust it ourselves before CodeHike sees it, so we need to get down to the level of manipulating the AST in order to make this work with CodeHike).

Adjusted one of the example tutorials to use this new feature as a test.
2024-09-26 15:54:57 -04:00
Charis
182440c9ae chore: remove www redirects from codeownership (#28634)
As discussed on Slack, this unblocks docs PRs, which can be approved by
anyone on the Supabase team.
2024-08-14 10:11:08 -04:00
Charis
fc164b5d07 Refactor/app router refs (#28095)
Migrates client SDK References to App Router. (Management and CLI API references aren't migrated yet, nor are self-hosting config references.)

Some notes:

Big changes to the way crawler pages are built and individual section URLs (e.g., javascript/select) are served. All of these used to be SSG-generated pages, but the number of heavy pages was just too much to handle -- slow as molasses and my laptop sounded like it was taking off, and CI sometimes refuses to build it all at all.

Tried various tricks with caching and pre-generating data but no dice.

So I changed to only building one copy of each SDK+version page, then serving the sub-URLs through a response rewrite. That's for the actual user-visible pages.

For the bot pages, each sub-URL needs to be its own page, but prebuilding it doesn't work, and rendering on demand from React components is too slow (looking for super-fast response here for SEO). Instead I changed to using an API route that serves very minimal, hand-crafted HTML. It looks ugly, but it's purely for the search bots.

You can test what bots see by running curl --user-agent "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" <URL_OF_PAGE>

Also added some smoke tests to run against prod for the crawler routes, since we don't keep an eye on those regularly, and Vercel config changes could surprise-break them. Tested the meta images on Open Graph and all seems to work fine.

With this approach, full production builds are really fast: ~5 minutes

Starts using the new type spec handling, which is better at finding params automatically, so I could remove some of the manually written ones from the spec files.
2024-08-13 16:12:59 -04:00
Inian
1b4682ed4f Update CODEOWNERS (#28602) 2024-08-13 13:58:39 +00:00
Kevin Grüneberg
4c0278f95b chore: simplify autofix (#28408) 2024-08-06 04:36:05 +00:00
Kevin Grüneberg
2f7331a80d chore: simplify autofix (#28407) 2024-08-06 12:25:21 +08:00
Charis
0772a88e0f ci: remove migration push from search action (#28327)
We don't need this for migration pushes since the Supabase integration will do
it instead. Removing it makes this action less brittle since embedding updates
get blocked on CLI problems.
2024-08-02 13:58:30 -04:00
Kevin Grüneberg
4496c5a9ab chore: only lint in CI, not on Vercel (#28136) 2024-07-23 16:28:52 +08:00
Thor 雷神 Schaeff
5a56fcc60e Update marketing as blog CODEOWNERS (#27853)
* Update CODEOWNERS

* Update .github/CODEOWNERS
2024-07-08 16:26:55 +08:00
Chris Gwilliams
8c14611348 Fix for labelling issues and handling errors (#27393)
* fix for labelling issues and handling errors

* fix typos
2024-06-24 11:35:03 +01:00
Ivan Vasilov
22b76fecaf feat: When publishing a studio image, change the latest tag in DockerHub to the latest images (#27378)
Add command to change the latest tag in DockerHub to the latest images.
2024-06-19 11:45:10 +00:00
Ivan Vasilov
0676e916c7 fix: Put a latest tag on DockerHub when publishing a new image (#27350)
* Don't create a new image whenever a new tag is published on supabase/supabase.

* No need for an input when triggering a new build.

* Enable the latest tag for all pushes.
2024-06-18 13:38:17 +02:00
Chris Gwilliams
e2271707cc Feat: Add stale Action for marking stale issues and Action to auto label new issues with source (#27033)
* add stale bot for marking stalue issues and action to auto label an
issues source

* Update auto-label-issues.yml
2024-06-17 06:53:51 +00:00
Charis
74dce1358b ci: auto-run last-checked once daily (#27212) 2024-06-12 11:30:33 -04:00
Ivan Vasilov
5847ad54cf fix: Test the playwright tests in Github actions (#26799)
* Add an API page for run-lints endpoint.

* Fix the playwright test.

* Make the check mandatory in the github action.

* Fix a console.log.

* Use a more stable way of waiting for buttons before clicking them.

* Add helper method for dismissing toasts.

* Wait for the other toast.

* Try and fix the flakiness of the toasts.

* Minor fix.

* Upload artifacts at the end of the github action run.

* Fix yaml stuff.

* Use the newer action for uploading. Shorten the retention period to 7 days.

* Add waitForResponse for the entity types API call.

* snapshot.

* Wait for the page to be loaded.

* Make the timeout bigger when waiting for response.

* Try to fix the timeouts.

* Minor restructuring of the test.

* Add another test and few minor todo tests.

* Fix the table names.

* Don't render hcaptcha in test mode.

* Expand the test to include sorting and filtering.

* Add a test for checking if the other schemas are can be listed.

* Make the sort popover button more stable.

* Fix a unused forward ref in the NavMenuItem component.

* Don't render the Toaster container when in test mode.

* Simplify starting the dev server when testing.

* Fix all inputs to have proper test ids.

* Fix the command for testing.
2024-06-07 17:44:28 +02:00
Charis
308b3e06b9 fix(last changed): timestamps from gh actions (#27075)
Need a fetch-depth 0 in order to preserve commit dates within GitHub
Actions, otherwise a shallow fetch will use the current date as the
commit date, which renders this entire flow useless.
2024-06-06 18:13:39 -04:00
Charis
c281dd0eb1 ci(docs): update last_changed table action (#27038)
Keeps track of fine-grained (per section) edit times for docs content.

Once daily, a GitHub Action runs that:

- Checks whether content hashes have changed for each section
- Updates the table that tracks content edit times if the hashes have changed

Note: The cron job isn't scheduled yet. I'll run the Action manually a few times to validate it, then turn it on in another PR.
2024-06-06 15:20:05 -04:00
Charis
4fbcd61e95 feat: new command menu pt 1 (#23699)
Introduces the first (very small) slice of the new command menu as a `ui-pattern`.

This slice just handles state for available commands. It isn't hooked up to anything yet.
2024-06-04 14:32:13 -04:00
Hieu
f5af2e6193 fix: mgmt api docs gha (#26985)
* fix: use sparse-checkout

* fix: always run on master
2024-06-04 14:31:38 +07:00
Hieu
aa9d5fe5e1 fix: remove invalid command (#26957)
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-06-04 13:45:18 +07:00
Ivan Vasilov
4a43f3b854 Fix: Try to fix the prettier github action (#26970)
* Try to fix the prettier github action.

* Revert "Try to fix the prettier github action."

This reverts commit 3a3fbe51e17e9b0b33f9e4ca332d9b40e90e1508.

* Fix the prettier dependency in package-lock.json.

* Run prettier format over the whole repo.

* Revert "Fix the prettier dependency in package-lock.json."

This reverts commit 8c6b24190755a1f5df8681ffc1f339a97f02076e.

* Revert the prettier format changes.

* Add a command for checking prettier. Use it in the github action. Use npm ci in the github action.

* Fix another accidental formatting.
2024-06-03 12:32:57 +00:00
Hieu
40412091b4 fix: install dependencies command (#26902) 2024-05-31 09:53:54 +07:00
Hieu
d855bfb3f8 feat: automate mgmt api spec update (#26655)
* fix: correct mgmt api naming

* feat: new command to generate mgmt api sections

* feat: sort section items

* chore: tidy up

* fix: add generate sections to the default command

* feat: add gha to auto update mgmt api docs

* chore: tidy up

* fix: operationId logic to support self-hosting references

* chore: update latest mgmt api specs

* chore: update latest mgmt api specs
2024-05-31 08:53:19 +07:00