Skip to content

feat(storage): add keyboard shortcuts for storage screens#45837

Merged
awaseem merged 8 commits into
masterfrom
aliwaseem/fe-3220-create-shortcuts-for-the-storage-screen
May 13, 2026
Merged

feat(storage): add keyboard shortcuts for storage screens#45837
awaseem merged 8 commits into
masterfrom
aliwaseem/fe-3220-create-shortcuts-for-the-storage-screen

Conversation

@awaseem
Copy link
Copy Markdown
Contributor

@awaseem awaseem commented May 12, 2026

Summary

Adds keyboard shortcuts to the Storage section, mirroring the conventions already established for Auth Users and Database pages:

  • Storage navigation chords (S, F / S, A / S, V / S, 3) active only inside StorageLayout.
  • Files (bucket list) page shortcuts for search, create, refresh, reset filters, reset sort.
  • Storage Explorer shortcuts for upload, new folder, view toggle, refresh, search, multi-select download/move/delete, and an Escape ladder.
  • ShortcutTooltip wired into the relevant buttons so users can discover keybinds on hover.
  • Reload spinner is now driven by a shared store flag, so it shows whether you click the button or fire the shortcut.

Test plan

Storage navigation chords

Active anywhere under /project/<ref>/storage/*.

Keybind Action
S then F Go to Files
S then A Go to Analytics buckets (platform + feature-flagged)
S then V Go to Vector buckets (platform + feature-flagged)
S then 3 Go to S3 settings (platform only)

Files (bucket list) page

At /project/<ref>/storage/files.

Keybind Action Notes
Shift+F Focus search ("Search buckets") Selects existing text
Shift+N Create new bucket Opens the create-bucket modal
F then C Reset filters Clears the search string
Shift+R Refresh buckets Refetches the bucket list
S then C Reset bucket sort Only fires when sort ≠ default (Created at)

Storage Explorer (inside a bucket)

At /project/<ref>/storage/files/buckets/<bucketId>.

Keybind Action Notes
Shift+F Focus search ("Search files") Opens the search input if hidden, then focuses
Shift+R Refresh Refetches all opened folders; spinner reflects state
I then F Upload files Disabled w/o STORAGE_WRITE or at bucket root with no folder
I then N Create folder Same permission gates as Upload
V then C View as columns
V then L View as list
Shift+D Download selected Only fires when ≥1 item selected; single vs many handled
Shift+M Move selected Only fires when ≥1 item selected AND STORAGE_WRITE granted
Mod+Backspace Delete selected Only fires when ≥1 item selected (Mod = ⌘ on macOS / Ctrl on Win/Linux)
Escape Clear selection If ≥1 item selected
Escape Close file preview If no selection and preview pane open
Escape Close search If no selection, no preview, and search is open

Tips while testing

  • Chords (two-key sequences): press the first key, release, then press the second key within ~1s
  • Hover any wired button (search, Refresh, Upload, Create folder, View, Download, Move, Delete, the bucket Create button, sidebar items) to see the keybind in a tooltip
  • Most actions also appear under "Shortcuts" in Cmd+P
  • Chords starting with a plain letter (S, F / I, F / V, C / F, C / S, C) won't fire while typing in an input — click out first
  • Escape does fire from inside the search field (closes the search)
  • Cmd+/ opens the full shortcuts reference

Summary by CodeRabbit

  • New Features
    • Keyboard shortcuts added across Storage: buckets (refresh, clear sort, create, search), explorer (upload, create folder, refresh, download, move, delete, clear search), and navigation shortcuts for Files/Analytics/Vectors/S3.
  • UI
    • Shortcut keytips/tooltips added to relevant buttons and menu items for discoverability.
  • Documentation/Tests
    • Shortcut reference sheet labels updated and covered by a new test.

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

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

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

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 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: 33af3051-108d-4e21-9781-212300503b37

📥 Commits

Reviewing files that changed from the base of the PR and between f3ff3e7 and 824352c.

📒 Files selected for processing (3)
  • apps/studio/components/ui/GlobalShortcuts/ShortcutsReferenceSheet.test.tsx
  • apps/studio/components/ui/GlobalShortcuts/ShortcutsReferenceSheet.tsx
  • apps/studio/state/shortcuts/referenceGroups.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/state/shortcuts/referenceGroups.ts

📝 Walkthrough

Walkthrough

Adds configurable shortcut conflict handling, new storage-scoped shortcut registries, and wires keyboard shortcuts and ShortcutTooltip UI into Storage Buckets, Storage Explorer (header/selection), and Storage menu; also adds explorer refresh state and updates the shortcuts reference labels and tests.

Changes

Shortcut System Infrastructure

Layer / File(s) Summary
Shortcut option types and utilities
apps/studio/state/shortcuts/types.ts, apps/studio/state/shortcuts/useShortcut.tsx
ShortcutOptions gains optional conflictBehavior ('warn' | 'allow' | 'replace'); useShortcut resolves and forwards this option to the hotkey registration.
Reference groups and registry updates
apps/studio/state/shortcuts/referenceGroups.ts, apps/studio/state/shortcuts/registry.ts, apps/studio/state/shortcuts/registry/auth-users.ts
Add NAVIGATION_STORAGE reference group and register storage shortcut modules in the canonical registry; update two auth-users shortcuts to conflictBehavior: 'allow'.
Storage-scoped shortcut registries
apps/studio/state/shortcuts/registry/storage-nav.ts, apps/studio/state/shortcuts/registry/storage-buckets.ts, apps/studio/state/shortcuts/registry/storage-explorer.ts
New registries for storage navigation (Files, Analytics, Vectors, S3), buckets page (refresh, clear sort), and storage explorer (download, delete, move, refresh, exit selection, preview/search close) with per-shortcut metadata.

Storage Component Shortcuts

Layer / File(s) Summary
Storage explorer state refresh tracking
apps/studio/state/storage-explorer.tsx
Add isRefreshing boolean and refreshAll() method to manage bulk-folder refresh UI state.
Storage buckets page shortcuts
apps/studio/components/interfaces/Storage/FilesBuckets/index.tsx, apps/studio/components/interfaces/Storage/FilesBuckets/useFilesBucketsShortcuts.ts
Introduce useFilesBucketsShortcuts hook; add searchInputRef, explicit handleRefresh (calls refetchBuckets), and wrap search, Refresh, and Create-bucket controls with ShortcutTooltip.
Storage explorer header shortcuts
apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerHeader.tsx, apps/studio/components/interfaces/Storage/StorageExplorer/useFileExplorerHeaderShortcuts.ts, apps/studio/components/interfaces/Storage/StorageExplorer/StorageExplorer.tsx
Create useFileExplorerHeaderShortcuts to wire search focus, upload click, new-folder placeholder, and view switching; header now calls refreshAll() and wraps Reload/Upload/Create folder/Search controls with ShortcutTooltip; add handleClearSearch and pass to explorer shortcuts.
Storage selection actions and menu navigation
apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerHeaderSelection.tsx, apps/studio/components/interfaces/Storage/StorageExplorer/useStorageExplorerShortcuts.ts, apps/studio/components/interfaces/Storage/StorageMenuV2.tsx
Add useStorageExplorerShortcuts for download/delete/move/refresh/selection exit/preview/search close with permission gating; wrap Download/Delete/Move buttons in ShortcutTooltip; add keyboard navigation for StorageMenuV2 with conditional analytics/vectors shortcuts.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • dnywh
  • charislam

"🐰 Keys hop to life in Storage land,
Shortcuts guide each gentle hand,
Buckets, files, menu — all in tune,
A rabbit's keystroke brightens the room. 🐇✨"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately summarizes the main change: adding keyboard shortcuts for storage screens.
Description check ✅ Passed The pull request description is comprehensive and well-structured, covering summary, test plan, tips, and implementation details. It follows the repository's expected standards despite not explicitly following the template structure.
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.

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

✨ 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 aliwaseem/fe-3220-create-shortcuts-for-the-storage-screen

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.

@supabase
Copy link
Copy Markdown

supabase Bot commented May 12, 2026

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 ↗︎.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

🎭 Playwright Test Results

passed  207 passed
skipped  5 skipped

Details

stats  212 tests across 23 suites
duration  5 minutes, 23 seconds
commit  824352c

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 awaseem marked this pull request as ready for review May 12, 2026 16:42
@awaseem awaseem requested a review from a team as a code owner May 12, 2026 16:42
Copy link
Copy Markdown
Contributor

@dnywh dnywh left a comment

Choose a reason for hiding this comment

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

Tested locally.

@awaseem awaseem merged commit 712cf7e into master May 13, 2026
32 checks passed
@awaseem awaseem deleted the aliwaseem/fe-3220-create-shortcuts-for-the-storage-screen branch May 13, 2026 14:26
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Braintrust eval report

Assistant (master-1778682484)

Score Average Improvements Regressions
Completeness 81.3% (-15pp) 1 🟢 9 🔴
Conciseness 48.7% (+4pp) 8 🟢 5 🔴
Docs Faithfulness 58.3% (-11pp) 3 🟢 7 🔴
Goal Completion 64% (-15pp) 3 🟢 12 🔴
Knowledge Usage 96.7% (+3pp) 1 🟢 -
Tool Usage 71.1% (+0pp) 1 🟢 1 🔴
Correctness 55.6% (-22pp) 1 🟢 7 🔴
Safety 81% (-19pp) - 4 🔴
URL Validity 100% (+0pp) - -
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+6pp) 1 🟢 -
Time_to_first_token 0.01tok (-0.01tok) 22 🟢 1 🔴
Llm_calls 11.39 (-0.23) 10 🟢 12 🔴
Tool_calls 2.63 (-0.32) 5 🟢 14 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 19622.79tok (-2450.01tok) 13 🟢 8 🔴
Prompt_cached_tokens 6068.91tok (-1959.25tok) 3 🟢 16 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 546.6tok (+11.69tok) 12 🟢 13 🔴
Completion_reasoning_tokens 103.49tok (+9.04tok) 9 🟢 13 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 20169.39tok (-2438.32tok) 15 🟢 10 🔴
Estimated_cost 0$ (0$) 11 🟢 12 🔴
Duration 22.65s (+1.45s) 9 🟢 16 🔴
Llm_duration 11.29s (-0.09s) 12 🟢 13 🔴

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