Repository navigation
refactor(studio): import SQL editor store from source, delete facade + barrel - #47533
Conversation
…+ barrel Migrate all 23 consumers of the @/state/sql-editor-v2 facade to import directly from @/state/sql-editor/sql-editor-state (where useSqlEditorV2StateSnapshot, getSqlEditorV2StateSnapshot, useSnippets and useSnippetFolders actually live). Delete the sql-editor-v2.ts facade and the sql-editor/index.ts barrel — nothing imports them anymore. This drops the two-layer re-export (v2 -> index -> source) in favour of importing from the source layer, per the repo's no-barrel convention. Pure import-path migration; no behavior change. Symbol names keep their V2 suffix for now (renaming is a separate, larger churn).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughThis PR moves SQL editor state imports from ChangesSQL Editor State Import Migration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 › queue-table-operations.spec.ts › Queue Table Operations › reverted cell edit clears the pending change Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
Braintrust eval report
|
What
Final PR of the SQL editor state re-layering stack. Removes the compatibility shims left in place during the migration:
@/state/sql-editor-v2facade to import directly from@/state/sql-editor/sql-editor-state, whereuseSqlEditorV2StateSnapshot,getSqlEditorV2StateSnapshot,useSnippets, anduseSnippetFoldersactually live.state/sql-editor-v2.ts(the facade) andstate/sql-editor/index.ts(the barrel). Both re-exported the same symbols; nothing imports them after the migration.This collapses the two-layer re-export (
sql-editor-v2→index→ source) into direct source imports, matching the repo convention to avoid barrel re-export files.Notes
sql-editor-state.ts; none imported theStateSnippet/StateSnippetFoldertypes via the facade.V2suffix for now — renaminguseSqlEditorV2StateSnapshotetc. is a separate, larger churn best done on its own.Validation
pnpm --filter studio typecheck✅ (confirms no dangling facade/barrel imports anywhere)pnpm exec vitest --run state/sql-editor/✅ (113 passed)any/deps/nested-component violations, and no import-order rule is enforced)sql-editor-v2referencesSummary by CodeRabbit