Repository navigation
Chore/fix storage explorer when switching buckets - #43541
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
7 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Repository UI (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe changes restructure the Storage Explorer state management to integrate bucket context. The Sequence DiagramsequenceDiagram
participant User as User/Router
participant Page as Bucket Page<br/>[bucketId].tsx
participant Provider as StorageExplorerStateContextProvider
participant Hooks as useSelectedBucket
participant State as Storage Explorer State
User->>Page: Navigate to bucket page
Page->>Provider: Wrap content with provider
Provider->>Hooks: Call useSelectedBucket()
Hooks-->>Provider: Return current bucket data
Provider->>State: createStorageExplorerState({<br/>projectRef,<br/>bucket,<br/>... config})
State->>State: Initialize selectedBucket<br/>from provided bucket
State->>State: Setup effect: watch<br/>bucket & projectRef changes
State-->>Provider: Return initialized state
Provider-->>Page: Provide state context
Page->>State: fetchContents triggered<br/>on bucket change
State-->>Page: Return storage contents<br/>for current bucket
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. Comment |
🎭 Playwright Test ResultsDetails
Flaky testsFeatures › cron-jobs.spec.ts › High Query Cost Banner › shows banner and still displays cron jobs when query cost exceeds threshold Skipped testsFeatures › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected |
Braintrust eval report
|
Context
Taking a slightly different approach to this PR
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
StorageExplorerStateContextProviderinto[bucketId].tsx]instead ofProjectContextsetSelectedBucketmethod which required a separateuseEffectinStorageExplorer.tsxTo test