Skip to content

fix: storage shortcuts#45978

Merged
awaseem merged 4 commits into
supabase:masterfrom
7ttp:fix/storage-shortcut
May 15, 2026
Merged

fix: storage shortcuts#45978
awaseem merged 4 commits into
supabase:masterfrom
7ttp:fix/storage-shortcut

Conversation

@7ttp
Copy link
Copy Markdown
Contributor

@7ttp 7ttp commented May 15, 2026

TL;DR

fixes a few storage shortcut edge cases

ref:

Summary by CodeRabbit

  • Bug Fixes
    • The storage bucket creation shortcut now respects user permissions and will only be available when allowed.
    • Storage file deletion shortcut now requires appropriate write permission before it can be used on selections.
    • Refresh shortcut in the storage explorer is always available regardless of selection state.

Review Change Stack

@7ttp 7ttp requested a review from a team as a code owner May 15, 2026 11:51
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment, Open in v0 May 15, 2026 0:05am
studio-self-hosted Ready Ready Preview, Comment May 15, 2026 0:05am
studio-staging Ready Ready Preview, Comment May 15, 2026 0:05am
ui-library Ready Ready Preview, Comment May 15, 2026 0:05am
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 May 15, 2026 0:05am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 15, 2026 0:05am
design-system Skipped Skipped May 15, 2026 0:05am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for contributing to Supabase! ❤️ Our team will review your PR.

A few tips for a smoother review process:

  • If you have a local version of the repo, run pnpm run format to make sure formatting checks pass.
  • Once we've reviewed your PR, please don't trivially merge master (don't click Update branch if there are no merge conflicts to be fixed). This invalidates any pre-merge checks we've run.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@7ttp is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 85757e6d-c2c8-49a4-becc-5d86cdae5717

📥 Commits

Reviewing files that changed from the base of the PR and between d81b649 and ea82e8a.

📒 Files selected for processing (1)
  • apps/studio/components/interfaces/Storage/StorageExplorer/useStorageExplorerShortcuts.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/interfaces/Storage/StorageExplorer/useStorageExplorerShortcuts.ts

📝 Walkthrough

Walkthrough

Create-bucket shortcut (Shift+N) is now enabled only when write permission exists. Delete-selected shortcut requires a non-empty selection and write permission. Refresh (Shift+R) no longer depends on selection and runs regardless of selected items.

Changes

Storage keyboard shortcut permission gating

Layer / File(s) Summary
Create bucket shortcut permission gating
apps/studio/components/interfaces/Storage/FilesBuckets/useFilesBucketsShortcuts.ts
Add useAsyncCheckPermissions import and call it with PermissionAction.STORAGE_WRITE on *. Conditionally enable the "Create new bucket" shortcut based on canCreateBuckets.
File operations shortcut fixes
apps/studio/components/interfaces/Storage/StorageExplorer/useStorageExplorerShortcuts.ts
Remove the { enabled: selectedItems.length === 0 } restriction from the refresh shortcut, allowing it to run when items are selected. Require canUpdateFiles permission in addition to non-empty selection for the delete-selected shortcut.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A rabbit peeks at the storage light, 🐰
Keys and checks in the soft twilight.
No bucket born nor file undone,
Unless your perms say it's allowed to run.
Refresh hops free — quick as a wink, a tiny delight.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and does not follow the repository's required template structure with sections like 'What kind of change', 'Current behavior', 'New behavior', etc. Add missing template sections including the CONTRIBUTING.md confirmation, detailed description of changes, and new behavior explanation to match the repository's description template requirements.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "fix: storage shortcuts" is vague and generic, using non-descriptive terms that don't convey meaningful information about which specific shortcut issues are being addressed. Consider a more specific title like "fix: add permission checks to storage shortcuts" or "fix: storage shortcut permission and refresh issues" to clarify the exact problems being resolved.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR code changes directly address all three reported bugs in issue #45977: permission checks for bucket creation, delete shortcut, and refresh shortcut functionality.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the three storage shortcut issues identified in the linked issue, with no extraneous modifications present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@awaseem
Copy link
Copy Markdown
Contributor

awaseem commented May 15, 2026

Nice thanks for that, missed it when I added it!

Copy link
Copy Markdown
Contributor

@awaseem awaseem left a comment

Choose a reason for hiding this comment

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

LGTM

@awaseem awaseem merged commit 1591e41 into supabase:master May 15, 2026
28 checks passed
@7ttp 7ttp deleted the fix/storage-shortcut branch May 15, 2026 13:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Braintrust eval report

Assistant (master-1778851802)

Score Average Improvements Regressions
Completeness 94.7% (+13pp) 10 🟢 1 🔴
Conciseness 40% (-7.000000000000001pp) 3 🟢 9 🔴
Docs Faithfulness 68.2% (+0pp) 4 🟢 6 🔴
Goal Completion 77.3% (+12pp) 12 🟢 6 🔴
Knowledge Usage 96.7% (+3pp) 2 🟢 1 🔴
Tool Usage 71.1% (+0pp) 1 🟢 1 🔴
Correctness 76.4% (+26pp) 9 🟢 -
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 97.1% (-3pp) - 1 🔴
Safety 95.2% (+12pp) 4 🟢 1 🔴
URL Validity 100% (+0pp) - -
Time_to_first_token 0.01tok (0tok) 12 🟢 13 🔴
Llm_calls 10.69 (-0.93) - 22 🔴
Tool_calls 2.8 (-0.37) 7 🟢 12 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 19806.76tok (-893.69tok) 12 🟢 9 🔴
Prompt_cached_tokens 6799.36tok (+177.49tok) 6 🟢 11 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 535.01tok (-28.45tok) 16 🟢 9 🔴
Completion_reasoning_tokens 86.57tok (-12.59tok) 12 🟢 9 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 20341.77tok (-922.15tok) 14 🟢 11 🔴
Estimated_cost 0$ (0$) 13 🟢 9 🔴
Duration 19.22s (-0.93s) 15 🟢 10 🔴
Llm_duration 11s (-0.66s) 15 🟢 10 🔴

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.

Shortcut issue storage

2 participants