Commit Graph
5 Commits
Author SHA1 Message Date
claude[bot]andClaude 12a8e31fa6 chore(studio): render Sign in with ChatGPT unconditionally (#49375)
<!-- ccr-slack-attribution -->
_Requested by **Ivan Vasilov** · [Slack
thread](https://supabase.slack.com/archives/C0161K73J1J/p1787296019236949?thread_ts=1787296019.236949&cid=C0161K73J1J)_

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Chore / feature-flag cleanup.

## What is the current behavior?

The "Sign in with ChatGPT" button on `/sign-in` and `/sign-up` sits
behind three gates in `useEnabledIdentityProviders`:

1. the static `dashboard_auth:sign_in_with_chatgpt` feature flag, AND
2. either the `ShowSignInWithChatGptButton` ConfigCat flag, OR
3. the `SIGN_IN_CHATGPT_ENABLED` (`siwc-enabled`) localStorage opt-in,
flipped by a shareable `?siwc-enabled=1` link via
`useSiwcQueryParamOptIn`.

The ConfigCat flag resolves client-side, so on a fresh load the button
is absent for the first render and appears once the flag comes back.
That pushes the rest of the sign-in options down and produces a visible
layout shift on the sign-in page.

## What is the new behavior?

ChatGPT is gated only by its static
`dashboard_auth:sign_in_with_chatgpt` feature flag, which is resolved
synchronously from `enabled-features.json`. The button renders on the
first paint, with no async re-layout.

Removed:

- the `useFlag('ShowSignInWithChatGptButton')` call and the
`chatgptLocalStorageEnabled || chatGptConfigCatFlagEnabled` branch in
`apps/studio/hooks/misc/useEnabledIdentityProviders.ts`
- `LOCAL_STORAGE_KEYS.SIGN_IN_CHATGPT_ENABLED` and its
`LOCAL_STORAGE_KEYS_ALLOWLIST` entry in
`packages/common/constants/local-storage.ts`
- `apps/studio/hooks/misc/useSiwcQueryParamOptIn.ts` and its callers in
`pages/sign-in.tsx` / `pages/sign-up.tsx` — its only job was writing
that localStorage flag
- the tests that covered the two removed rollout gates

The static `dashboard_auth:sign_in_with_chatgpt` kill switch is
untouched.

## Additional context

The `ShowSignInWithChatGptButton` ConfigCat flag is reported as 100%
enabled (per Joshen Lim in the linked thread). The repo contains no
default value, allowlist, or env gate for it — the live value lives only
in ConfigCat, so that number is not verifiable from here. Once this
merges the flag is unreferenced and should be **archived in ConfigCat by
a human**; nothing in ConfigCat was changed as part of this PR.

Verification notes: `packages/common` typechecks clean (`tsc --noEmit`)
and all touched files pass the repo's Prettier config. Studio's
`typecheck`, `lint`, and `vitest` could not be run here — `pnpm install`
fails in this environment because `npm.jsr.io` (needed for studio's
`@std/path` dependency) is not reachable through the network allowlist,
so `apps/studio/node_modules` was never installed. CI should be treated
as the first real run of those checks.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01M21SPvwf6FSthomX4Lj3ZC)_

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-21 11:32:22 +02:00
Alaister YoungandAlaister Young 270925b680 feat(studio): add dashboard_auth:sign_in_with_chatgpt enabled feature (#48677)
Adds a `dashboard_auth:sign_in_with_chatgpt` enabled-features flag so
deployments can disable the sign in with ChatGPT button via
`disabled_features`, the same way `dashboard_auth:sign_in_with_github`
works. Previously the button was only gated by the ConfigCat rollout
flag / localStorage opt-in, so white-labeled deployments with custom
auth providers had no way to turn it off.

**Added:**
- `dashboard_auth:sign_in_with_chatgpt` (default `true`) in
`enabled-features.json` + schema
- Tests covering the feature-disabled state

**Changed:**
- `useEnabledIdentityProviders` now gates ChatGPT as `featureEnabled &&
(localStorageOptIn || configCatFlag)` — the feature flag is the static
kill switch, the existing OR'd pair remains the rollout mechanism

## To test

- Sign-in and sign-up pages behave exactly as before by default (flag
defaults to `true`, ConfigCat/localStorage rollout gate unchanged)
- With `dashboard_auth:sign_in_with_chatgpt` in a profile's
`disabled_features`, the ChatGPT button no longer renders even with
`?siwc-enabled=1` or the ConfigCat flag on
- GitHub button gating unaffected

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

## Summary by CodeRabbit

- **New Features**
  - Added a feature flag to control ChatGPT sign-in availability.
- ChatGPT sign-in is now available only when the feature is enabled and
an applicable rollout or opt-in condition is met.

- **Tests**
- Expanded coverage for ChatGPT and GitHub sign-in provider availability
under different feature-flag and rollout conditions.

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

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-08-04 13:58:43 +07:00
Cemal Kılıç b8310dbf23 feat(studio): move SIWC rollout gate to ConfigCat (#48360)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Replace the deploy-gated `dashboard_auth:sign_in_with_chatgpt` AND-gate
with useFlag('ShowSignInWithChatGptButton') OR'd against the existing
localStorage opt-in switch, so rollout/rollback no longer requires a
frontend deploy. Remove the now-dead static flag, its only consumer was
this gate.

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

## Summary by CodeRabbit

* **New Features**
* ChatGPT sign-in availability now responds to either the local opt-in
setting or the updated configuration flag.
  * GitHub sign-in continues to follow its dedicated feature setting.

* **Bug Fixes**
* Corrected identity provider visibility across different sign-in
configuration combinations.

* **Chores**
  * Removed the obsolete ChatGPT sign-in feature setting.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-28 10:31:17 +02:00
Cemal Kılıç 3667601895 feat(studio): add sign in with ChatGPT (#47772)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Feature

## Summary
Introduce a "Sign in with ChatGPT" option gated by the new
`dashboard_auth:sign_in_with_chatgpt` feature flag and a manual
localStorage rollout switch (`SIGN_IN_CHATGPT_ENABLED`), since the
feature is still WIP.

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

## Summary by CodeRabbit

* **New Features**
  * Added support for signing in with ChatGPT alongside GitHub.
* ChatGPT sign-in now depends on both a feature flag and an additional
rollout setting.
* Updated provider availability so the app can show the correct sign-in
options.

* **Bug Fixes**
* Improved validation and coverage to ensure sign-in options appear only
when fully enabled.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-09 16:32:31 +02:00
e491182054 Auth flow improvements (#46967)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES/NO

## What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

## What is the current behavior?

Please link any relevant issues here.

## What is the new behavior?

Feel free to include screenshots if it includes visual changes.

## Additional context

Add any other context or screenshots.


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

## Release Notes

* **New Features**
* Added “Continue with {provider}” sign-in and sign-up flows using
enabled external identity providers.
* Enabled inbound branding to focus a specific provider for customized
sign-in/sign-up experiences.

* **Improvements**
* Refined the sign-in options layout and “last used” tracking for
clearer authentication choices.
* Updated account identity/provider connection experiences (link/unlink
and management UI).

* **Bug Fixes**
  * Fixed hydration mismatches in sign-in and password-related layouts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2026-06-18 15:34:56 +08:00