Skip to content

Scoped PAT: restore previous UI when flag is false - #48359

Closed
djhi wants to merge 24 commits into
scopedpat/root-branchfrom
scoped-pat/restore-previous-ui
Closed

djhi wants to merge 24 commits into
scopedpat/root-branchfrom
scoped-pat/restore-previous-ui

Conversation

@djhi

@djhi djhi commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Sixth stacked PR for scoped PAT extracted from the prototype #47783 to ease reviewing.
Previous stacked PR is #48182

This PR restore the classic token UI and displays it when the flag isn't enabled

How to test

Old UI

New UI

@djhi
djhi requested a review from a team as a code owner July 27, 2026 14:30
@vercel

vercel Bot commented Jul 27, 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 27, 2026 2:33pm
studio-staging Ready Ready Preview, Comment Jul 27, 2026 2:33pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 27, 2026 2:33pm
design-system Skipped Skipped Jul 27, 2026 2:33pm
docs Skipped Skipped Open in v0 Jul 27, 2026 2:33pm
ui-library Skipped Skipped Jul 27, 2026 2:33pm
zone-www-dot-com Skipped Skipped Open in v0 Jul 27, 2026 2:33pm

Request Review

@supabase

supabase Bot commented Jul 27, 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 27, 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: c8f61b78-f5c0-463d-b65e-282133640b4b

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 scoped-pat/restore-previous-ui

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 27, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  237 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  243 tests across 28 suites
duration  5 minutes, 30 seconds
commit  18ccad8

Flaky tests

Features › column-editor-types.spec.ts › column editor complex types › FK selector allows and creates a relation between two matching array columns

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

djhi added a commit that referenced this pull request Jul 30, 2026
…n API specs (#48182)

Fifth stacked PR for scoped PAT extracted from the prototype #47783 to
ease reviewing.
Previous stacked PR is #47999
Next stacked PR is #48359

This PR refactor how we get the map of which scopes enable which
endpoint or mcp tool. Previously it was an hardcoded file. We now
compute it from the OpenAPI specs of our API. This ensure the map stays
up to date when the API changes.

However, we don't have an always up-to-date equivalent for mcp tools so
we duplicated code from platform that map the OAuth scopes they check
with the FGA permissions.

## Notes

The react-hook-form usage is not great. A follow up PR will fix it

## How to test

- On
https://studio-staging-git-scopedpat-scope-permissions-api-supabase.vercel.app/dashboard/account/tokens
- Create a new token with a few permissions (their risk marker should be
displayed: (_High risk_, _Medium risk_ or _Low risk_)
- You should see the available endpoints and mcp tools in the review
step

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

## Summary by CodeRabbit

* **New Features**
* Added dynamic permission mapping for scoped access tokens, covering
Management API endpoints and MCP tools.
* Added a permissions endpoint with hosted-platform support and caching.
* Updated scoped token creation and review screens to show capabilities
based on granted permissions.
  * Added permission-aware risk indicators and tool visibility.

* **Bug Fixes**
* Improved authorization checks so endpoints and tools require all
necessary scopes.

* **Tests**
  * Added coverage for endpoint, scope, and MCP tool mapping behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Base automatically changed from scopedpat/scope-permissions-api to scopedpat/root-branch July 30, 2026 13:42
@djhi
djhi requested a review from a team as a code owner July 30, 2026 13:42
@djhi djhi closed this Jul 30, 2026
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.

1 participant