| | PR | Base | Branch |
| --- | --- | --- | --- |
| 1 | #50476 | `master` | pre-existing correctness fixes |
| 2 | #50413 | `fix/storage-explorer-listing-and-scroll` |
`?path`/`?preview` deep-linking |
| 3 | **this PR** | `feat/storage-nav-improvement` | end-to-end
deep-link test |
| 4 | #50480 | `test/storage-deep-link-e2e` | copy path / copy link row
actions |
## What is the current behavior?
The `?path` / `?preview` deep-linking added in #50413 has no end-to-end
coverage. It is exercised by unit and component tests, but nothing
verifies the real round trip through a browser and a live Storage
backend.
## What is the new behavior?
One spec that drills into a nested folder and asserts `?path`, opens a
file and asserts `?preview`, reloads to confirm the deep link restores
the same location rather than dropping back to the bucket root, then
goes Back to confirm it walks up one level.
Assertions go through `toHaveURL((url) => url.searchParams.get(...) ===
...)` rather than a regex over the whole URL, so dots and other regex
metacharacters in file names are compared literally.
## Additional context
Kept on its own branch for one reason: **this spec has never been
executed.** It was written without a local Supabase stack available to
run it against, so its first real run is here in CI
(`studio-e2e-test.yml`, `framework: [next, tanstack]` × 2 shards).
Isolating it means iterating on it cannot hold up the feature work in
#50413 below.
Expect this one to need a pass or two.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01DB6KEERERPWtLL4SY2RX4Q
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Improved end-to-end coverage for storage workflows, including bucket
management, file and folder operations, uploads, downloads, search, and
deep links.
* Added reliable cleanup for test-created storage data, including when
navigation, uploads, or assertions fail.
* Continued verification of storage navigation and file and folder
management behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
<img width="1285" height="654" alt="image"
src="https://github.com/user-attachments/assets/10074f07-3ac0-4f1f-b920-4255c67968d6"
/>
Updates file storage buckets to make use of new page components and
follow more standard full width pages as recommended in our design
system.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Search input now always visible with dynamic placeholder and cancel
control.
* “Go up one level” navigation button shown in list view when not at
bucket root.
* **Style**
* Thinner icon strokes and smaller button/icon sizing across the Storage
Explorer and preview.
* Header, breadcrumbs, and page container spacing/layout refined;
explorer outer container simplified.
* Selection count UI made compact/monospaced; new layout tokens for
header and bulk-action rows.
* **Tests**
* Unit and e2e tests updated; added e2e helper for rename/create inputs.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46184?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Problem
Some tests rely on hard coded timeouts. That makes them
- brittle if the timeout is not long enough
- take longer than necessary if the timeout is too long
## Solution
- Rely on playwright `expect` retries when possible
- Rely on UI updates when possible
Fixes#42357
Supersedes #42364
## Problem
When copying the URL of a file that is not in the currently opened
folder, the folder path is still included in that file URL.
## Solution
We actually always have the file path, use it directly instead of
rebuilding it from the storage explorer state
## How to test
1. Create a bucket and upload a file in it
2. Create a folder and upload a file in it
While the folder is selected, right click the root file uploaded in 1
and copy its URL. It should not contain the folder name. Same with the
dropdown menu that appears when hovering the file.
## Context
Taking a slightly different approach to [this
PR](https://github.com/supabase/supabase/pull/43370)
Original problem was that if you opened some folders while in a bucket
and then switched to a different bucket, the folder UI will persists
(folders from Bucket A will render when landing on Bucket B)
## Changes involved
- Shift `StorageExplorerStateContextProvider` into `[bucketId].tsx]`
instead of `ProjectContext`
- The valtio store here only applies for the storage explorer so having
it so high in the project's context was unnecessary
- This also just implies that the valtio store will automatically reset
whenever the bucket changes
- Simplify storage explorer valtio store by initializing the store with
the bucket
- We'll initialize the selected bucket with the store now (Same as
previous PR)
- Removes unnecessary `setSelectedBucket` method which required a
separate `useEffect` in `StorageExplorer.tsx`
## To test
- [ ] Verify that the original is resolved
- [ ] General smoke test of the storage explorer - i've also re-added
the e2e test that Gildas wrote up in his PR
## Problem
When navigating between buckets after having selected a folder, the
storage view shows the previous folder content.
## Solution
Set the selected bucket before navigating to it, preventing a race
condition with Valtio updates and the effect that loads the bucket
content.
## How to test
1. Create 2 buckets
2. In one of them, create a folder and upload some files
3. Go back to the bucket list
4. Open the other bucket
Results:
- It should not show the previous bucket content anymore
- It should not show an empty 2nd column either
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.
YES
## What kind of change does this PR introduce?
- Move storage tests to run in parallel
- Updated utils to use env
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Improved test reliability by shifting storage bucket setup and cleanup
from UI-based to API-backed operations.
* Enhanced test isolation with streamlined prerequisite navigation
steps.
* **Chores**
* Updated environment configuration to support dynamic API URL and
service role key settings.
* Refactored internal storage management utilities for improved
maintainability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* Validate against empty name in FileExplorerRowEditing.tsx
* Update test
* Fix
* Opt to revert changes if saving empty string
* Nit
* Attempt to write tests with claude
* Trim whitespace in FileExplorerRowEditing when saving
* attempt to make table editor tests less flaky
* updated race conditions for table editor
* updated playwright config with optimized launch options
* reduce workers
* updated timeouts for tests
* updated config to have a global timeout of 20 seconds
* updated to be visible
* added ability to download files from storage api directly
* updated to rechange size
* updated test methods
* updated test suite
* updated tests
* updated to remove loops
* removed AI slop
* Updated to use single API key in mem
* Fix the memoization of the getOrRefreshTempApiKey function.
* updated imports
* updated imports
* updated to use import meta
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>