Skip to content

fix(studio): wire up siwc-enabled query param opt-in on sign-in/sign-up - #48126

Merged
cemalkilic merged 3 commits into
masterfrom
fix/siwc-query-param-optin
Jul 21, 2026
Merged

cemalkilic merged 3 commits into
masterfrom
fix/siwc-query-param-optin

Conversation

@cemalkilic

@cemalkilic cemalkilic commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Add useSiwcQueryParamOptIn, which flips on the ChatGPT sign-in rollout localStorage flag when ?siwc-enabled=1 is present, and call it from both pages/sign-in.tsx and pages/sign-up.tsx.

Summary by CodeRabbit

  • New Features
    • Added support for enabling the sign-in experience via ?siwc-enabled=1, automatically updating the stored opt-in flag on both sign-in and sign-up pages.
  • Tests
    • Added coverage confirming the stored flag is updated only for siwc-enabled=1, and not for missing, non-1, 0, or repeated/array values.
    • Added assertions that the behavior is triggered consistently when rendering the sign-in and sign-up pages.

Add useSiwcQueryParamOptIn, which flips on the ChatGPT sign-in rollout
localStorage flag when `?siwc-enabled=1` is present, and call it from
both pages/sign-in.tsx and pages/sign-up.tsx. Previously the hook
didn't exist and the shareable opt-in link had no effect.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@cemalkilic
cemalkilic requested a review from a team as a code owner July 21, 2026 03:41
@vercel

vercel Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Jul 21, 2026 10:00am
studio-staging Ready Ready Preview, Comment Jul 21, 2026 10:00am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 21, 2026 10:00am
design-system Skipped Skipped Jul 21, 2026 10:00am
docs Skipped Skipped Jul 21, 2026 10:00am
ui-library Skipped Skipped Jul 21, 2026 10:00am
zone-www-dot-com Skipped Skipped Jul 21, 2026 10:00am

Request Review

@supabase

supabase Bot commented Jul 21, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 751a301c-6fd3-4d39-872a-942a6b4e6fe7

📥 Commits

Reviewing files that changed from the base of the PR and between dfe717f and d133290.

📒 Files selected for processing (1)
  • apps/studio/hooks/misc/__tests__/useSiwcQueryParamOptIn.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/hooks/misc/tests/useSiwcQueryParamOptIn.test.ts

📝 Walkthrough

Walkthrough

Adds useSiwcQueryParamOptIn to enable the SIWC local-storage flag for ?siwc-enabled=1, wires it into sign-in and sign-up pages, and adds hook and page tests.

Changes

SIWC opt-in flow

Layer / File(s) Summary
Query parameter hook behavior
apps/studio/hooks/misc/useSiwcQueryParamOptIn.ts, apps/studio/hooks/misc/__tests__/useSiwcQueryParamOptIn.test.ts
The hook reads siwc-enabled and sets the SIWC flag only when its value is "1"; tests cover accepted, rejected, repeated, and route-specific values.
Sign-in and sign-up integration
apps/studio/pages/sign-in.tsx, apps/studio/pages/sign-up.tsx, apps/studio/tests/pages/sign-in.test.tsx, apps/studio/tests/pages/sign-up.test.tsx
Both authentication pages invoke the hook, with tests verifying each invocation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AuthPage
  participant useSiwcQueryParamOptIn
  participant useParams
  participant useLocalStorageQuery
  AuthPage->>useSiwcQueryParamOptIn: invoke hook
  useSiwcQueryParamOptIn->>useParams: read siwc-enabled query parameter
  useSiwcQueryParamOptIn->>useLocalStorageQuery: set SIWC flag to true when value is "1"
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is too sparse and omits required template sections like current behavior, new behavior, and additional context. Add the required template sections: read CONTRIBUTING, change type, current behavior with issue links, new behavior, and additional context.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change to wire the siwc-enabled opt-in into sign-in/sign-up.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/siwc-query-param-optin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  239 passed
skipped  5 skipped

Details

stats  244 tests across 29 suites
duration  3 minutes, 26 seconds
commit  69cadbb

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  238 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  244 tests across 29 suites
duration  6 minutes, 4 seconds
commit  d133290

Flaky tests

Features › queue-table-operations.spec.ts › Queue Table Operations - queue identity fixes › deleting a newly inserted row removes it from pending changes

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@joshenlim joshenlim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on preview!

@cemalkilic
cemalkilic merged commit 0b53a18 into master Jul 21, 2026
37 checks passed
@cemalkilic
cemalkilic deleted the fix/siwc-query-param-optin branch July 21, 2026 10:13
@github-actions

Copy link
Copy Markdown
Contributor

Braintrust eval report

Evals in progress... ⌛

hunleyd added a commit that referenced this pull request Aug 8, 2026
…fomap-entry-for-pitr-archiving-stale' into hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale

* origin/hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale: (35 commits)
  chore: simplify CPU messaging for compute sizes (#48109)
  chore(studio): add valtio and react-hook-form ESLint ratchet rules (#48037)
  feat: Add ai/python federated content and data (#48043)
  feat: Add ai-skills federated content and data (#48045)
  feat: Add deployment/ci federated content and data (#48041)
  fix(studio): wire up siwc-enabled query param opt-in on sign-in/sign-up (#48126)
  fix(studio): stop stacking overlaid area series in report charts (#48034)
  Update Dev toolbar to support filtering feature flags (#48137)
  Update dev toolbar to support mocking org restrictions (#48136)
  feat: Add terraform federated content and data (#48010)
  Chore/add sessions database connections (#48094)
  fix(studio): guard panel collapse/resize on narrow viewports (#48098)
  Landing page agent focus (#47989)
  fix(studio): chip away explicit-tabindex ratchet debt (#48040)
  fix(studio): untangle nested buttons in editor tabs (#48101)
  fix(docs): broken link (#48117)
  docs: add VS Code to the AI coding agent plugin install picker (#48108)
  docs: add Kimi Code to MCP and AI coding agent plugin setup (#48099)
  fix: preserve function responses (#47920)
  fix(assistant): SQL approval buttons do nothing (#48102)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants