Skip to content

Update dev toolbar to support mocking org restrictions - #48136

Merged
joshenlim merged 2 commits into
masterfrom
joshen/fe-3960-update-devtoolbar-to-support-org-restrictions
Jul 21, 2026
Merged

joshenlim merged 2 commits into
masterfrom
joshen/fe-3960-update-devtoolbar-to-support-org-restrictions

Conversation

@joshenlim

@joshenlim joshenlim commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

Context

Only applies for local development - adds a way to mock org restrictions with the dev toolbar
image

Summary by CodeRabbit

  • New Features
    • Added organization-level warning controls to the development toolbar, including a new “Organization warnings” section to simulate restriction status variants (none, grace periods, restricted, and overdue-invoice scenarios, including an “other org” option).
    • Updated the existing project-warning controls’ guidance to reference the current organization or project.
  • Bug Fixes
    • Improved cleanup so resetting or closing warning overrides reliably restores the real organization and invoice warning data, including after navigation.

@joshenlim
joshenlim requested a review from a team as a code owner July 21, 2026 08:31
@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 8:49am
studio-staging Ready Ready Preview, Comment Jul 21, 2026 8:49am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 21, 2026 8:49am
design-system Skipped Skipped Jul 21, 2026 8:49am
docs Skipped Skipped Jul 21, 2026 8:49am
ui-library Skipped Skipped Jul 21, 2026 8:49am
zone-www-dot-com Skipped Skipped Jul 21, 2026 8:49am

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: e63afb9f-dccb-4887-b442-549b0007090e

📥 Commits

Reviewing files that changed from the base of the PR and between 1a83f38 and 9bc0735.

📒 Files selected for processing (1)
  • apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx

📝 Walkthrough

Walkthrough

Changes

Resource warning overrides

Layer / File(s) Summary
Override state and cache setup
apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx
Adds organization warning state and organization/invoice query dependencies, with cleanup invalidation for those caches.
Organization override application
apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx
Updates override application to patch organization restriction data and mocked overdue invoices, and wires organization warning changes and reset behavior.
Warning control interface
apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx
Adds organization warning controls, a separator, and updated explanatory and read-only-mode layout text.

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

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant ResourceWarningsTab
  participant OrganizationCache
  participant InvoiceCache
  Developer->>ResourceWarningsTab: Select organization warning
  ResourceWarningsTab->>OrganizationCache: Update restriction status and data
  ResourceWarningsTab->>InvoiceCache: Set mocked overdue invoices
  Developer->>ResourceWarningsTab: Reset or close tab
  ResourceWarningsTab->>OrganizationCache: Invalidate organization list
  ResourceWarningsTab->>InvoiceCache: Invalidate overdue invoices
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only provides context and a screenshot; it misses the required template sections like change type, current behavior, and additional context. Fill out the full template: confirm CONTRIBUTING.md, state the change type, current behavior, new behavior, and any related issues or extra context.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding dev-toolbar support for mocking organization restrictions.
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 joshen/fe-3960-update-devtoolbar-to-support-org-restrictions

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

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  239 passed
skipped  5 skipped

Details

stats  244 tests across 29 suites
duration  3 minutes, 21 seconds
commit  9bc0735

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

@alaister alaister 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.

LGTM!

  • Tested on preview

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx`:
- Around line 73-74: Update the [ref] useEffect cleanup in ResourceWarningsTab
to mirror the unmount cleanup: when currentOrgSlug exists, invalidate the
resource warnings, organization list, and overdue invoice queries; then reset
severities, read-only state, orgWarning to 'none', and hasOverridesRef.current
to false.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7915c7c5-36aa-4534-8cd4-5bf400130b7d

📥 Commits

Reviewing files that changed from the base of the PR and between 846706b and 1a83f38.

📒 Files selected for processing (1)
  • apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx

@joshenlim
joshenlim merged commit bc0c199 into master Jul 21, 2026
37 checks passed
@joshenlim
joshenlim deleted the joshen/fe-3960-update-devtoolbar-to-support-org-restrictions branch July 21, 2026 09:13
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