Skip to content

Commit 7ebbfd6

Browse files
Refactor: Supabase admin migration (#273)
<!-- CURSOR_SUMMARY --> > [!NOTE] > **High Risk** > High risk because it rewires team resolution/authorization to be slug-based across dashboard routes and API handlers, including auth/session plumbing and new repository layers; mistakes could break access control or routing for existing users. > > **Overview** > Moves the app to **slug-only team routing**: dashboard pages, redirect resolvers (e.g. `/dashboard`, `/dashboard/account`), and team-scoped API routes now take `teamSlug` and resolve/authorize to a team ID via `getTeamIdFromSlug`/`resolveUserTeam`, removing ID fallbacks and hardening tab redirects with `Object.hasOwn`. > > Introduces a set of `core/modules/*` repositories and models (auth, teams, sandboxes, builds, keys, billing, support) and updates imports/tests to use the new `core/shared` clients/contracts paths; adds a client-side `DashboardTeamGate` with prefetched `teams.list` to enforce access in the new `dashboard/[teamSlug]/layout`. > > Removes several old SQL migration files and shifts the `/api/health` check from a direct Supabase query to calling the dashboard API `/health` endpoint. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit ab45405. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent c3fb2d5 commit 7ebbfd6

File tree

318 files changed

+6137
-6742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+6137
-6742
lines changed

migrations/20250205180205.sql

Lines changed: 0 additions & 109 deletions
This file was deleted.

migrations/20250311144556.sql

Lines changed: 0 additions & 10 deletions
This file was deleted.

migrations/20250314133234.sql

Lines changed: 0 additions & 14 deletions
This file was deleted.

migrations/20260212120822.sql

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)