Skip to content

Scoped PAT: refactor new scoped PAT form - #47979

Merged
djhi merged 8 commits into
scopedpat/root-branchfrom
scopedpat/scoped-token-creation-sheet
Jul 28, 2026
Merged

djhi merged 8 commits into
scopedpat/root-branchfrom
scopedpat/scoped-token-creation-sheet

Conversation

@djhi

@djhi djhi commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Second stacked PR for scoped PAT extracted from the prototype #47783 to ease reviewing.
Previous stacked PR is #47886
Next stacked PR is #48003

This PR:

  • refactor the scoped token creation form in a multi-step fashion

How to test

Go to https://studio-staging-git-scopedpat-scoped-token-creat-80c55b-supabase.vercel.app/dashboard/account/tokens

  • Click the Generate new token button

  • Try submitting immediately. It should display errors correctly

  • Configure everything except permissions and try submitting. It should display a warning about missing permissions

  • Configure the permissions and submit. It should display the review step

  • Try going back, modify anything and submit

  • Create the token. It should display the token value with a button to copy it and a checkbox to confirm the copy. You cannot close the sheet at this step until you check the box and click Done.

@djhi
djhi requested review from a team as code owners July 15, 2026 19:29
@supabase

supabase Bot commented Jul 15, 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 ↗︎.

@vercel

vercel Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Jul 28, 2026 9:52am
docs Ready Ready Preview, Comment, Open in v0 Jul 28, 2026 9:52am
studio-self-hosted Ready Ready Preview, Comment Jul 28, 2026 9:52am
studio-staging Ready Ready Preview, Comment Jul 28, 2026 9:52am
ui-library Ready Ready Preview, Comment Jul 28, 2026 9:52am
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 Jul 28, 2026 9:52am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 28, 2026 9:52am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f671d0b4-5663-4c01-ac21-e1f391b20026

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch scopedpat/scoped-token-creation-sheet

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

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  241 passed
flaky  2 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  6 minutes, 17 seconds
commit  8b39966

Flaky tests

Features › queue-table-operations.spec.ts › Queue Table Operations › pending changes persist when switching between tables
Features › realtime-inspector.spec.ts › Realtime Inspector › Broadcast Messages › broadcast messages appear in the UI when listening

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

awaseem

This comment was marked as resolved.

@djhi
djhi requested a review from awaseem July 16, 2026 08:32

@pamelachia pamelachia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approved from a telemetry standpoint

@pamelachia

Copy link
Copy Markdown
Contributor

wait why is this allowed to merge without frontend approval?? 👀

@djhi
djhi marked this pull request as draft July 16, 2026 12:51
@djhi
djhi marked this pull request as ready for review July 16, 2026 12:55
@djhi

djhi commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

wait why is this allowed to merge without frontend approval?? 👀

Probably because the base branch isn't master

djhi added a commit that referenced this pull request Jul 28, 2026
First stacked PR for scoped PAT extracted from the prototype #47783 to
ease reviewing.
Next stacked PR is #47979

This PR:
- merge the two existing token lists (classic and scoped) into one
- add an admonition about the scoped PAT migration (missing the docs
URL)

## Notes

It's not possible to create classic tokens anymore with the `scopedPAT`
flag enabled.

## How to test

### With the `scopedPAT` enabled (default on staging)

Go to
https://studio-staging-git-scopedpat-merge-token-lists-supabase.vercel.app/dashboard/account/tokens.
- You shouldn't see two tabs anymore
- If you had classic tokens, they should have the _classic_ badge
- You can create scoped tokens
- You have a way to copy newly created tokens above the list upon form
submission

### With the `scopedPAT` disabled (use the devtool to override)
- You shouldn't see two tabs anymore
- If you had classic tokens, they should **not** have the _classic_
badge
- You can create classic tokens
- You have a way to copy newly created tokens above the list upon form
submission

## Screenshots

Before:
<img width="775" height="515" alt="image"
src="https://github.com/user-attachments/assets/35733e7f-6e3e-40f9-ac5b-cfd7caf5d830"
/>

After:
<img width="767" height="671" alt="image"
src="https://github.com/user-attachments/assets/2fd86e6e-6dc6-46c8-9c89-cbfc553e4eb9"
/>
Base automatically changed from scopedpat/merge-token-lists to scopedpat/root-branch July 28, 2026 09:20
@djhi

djhi commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

I made a mess with my commits but the code is cleaned up

@djhi
djhi merged commit 9450a89 into scopedpat/root-branch Jul 28, 2026
27 checks passed
@djhi
djhi deleted the scopedpat/scoped-token-creation-sheet branch July 28, 2026 13:41
djhi added a commit that referenced this pull request Jul 29, 2026
Third stacked PR for scoped PAT extracted from the prototype #47783 to
ease reviewing.
Previous stacked PR is #47979
Next stacked PR is #47999

This PR add a way to view the tokens permissions

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

## Summary by CodeRabbit

* **New Features**
  * Added a “View permissions” option for scoped access tokens.
  * Scoped token permissions now open in a dedicated viewing panel.
  * Scoped token support is enabled by default.

* **Bug Fixes**
* Improved token deletion confirmation to clearly identify the selected
token.
  * Deletion dialogs now close correctly after successful removal.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

4 participants