Conversation
- Moved generated API types to a new directory structure under `src/core/shared/contracts`. - Updated paths in `tsconfig.json` to reflect the new locations of type definitions. - Refactored various imports across the codebase to use the new type paths. - Removed obsolete client and API files to streamline the codebase.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…hrough safe-action and trpc middlewares
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ba3ae42bd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (cookieTeamId && cookieTeamSlug) { | ||
| return { id: cookieTeamId, slug: cookieTeamSlug } |
There was a problem hiding this comment.
Validate cookie team membership before returning it
resolveUserTeam now trusts SELECTED_TEAM_ID/SLUG cookies without checking that the current user can still access that team. If a user is removed from a team (or has stale/tampered cookies), /dashboard and /dashboard/account will keep selecting that unauthorized team and re-setting the same cookies, sending the user to an unauthorized state instead of falling back to one of their valid teams as before.
Useful? React with 👍 / 👎.
| if (z.uuid().safeParse(segment).success) { | ||
| return segment | ||
| } |
There was a problem hiding this comment.
Disambiguate UUID segments before treating them as team IDs
This returns any UUID-looking segment as a team ID immediately, skipping slug resolution. That regresses the previous behavior that handled the “UUID-shaped slug” case, so a team whose slug matches UUID format will no longer resolve correctly by slug and protectedTeamProcedure can accept arbitrary UUIDs as teamId until later failures. The UUID branch should verify it is a real accessible ID (or fall through to slug resolution) before returning.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR refactors the codebase toward a new src/core domain/repository layout (including moving generated contracts), and migrates many server functions/actions/routers away from the previous src/server structure while updating imports and path aliases accordingly.
Changes:
- Add extensive TS path aliases and move generated API/Supabase contracts into
src/core/shared/contracts. - Introduce shared
RepoResult/RepoErrorhelpers and new repository/middleware patterns for tRPC and server actions insrc/core. - Migrate multiple feature areas (teams, billing, sandboxes, webhooks, auth) to use the new core repositories/functions and update UI to consume the new models.
Reviewed changes
Copilot reviewed 198 out of 217 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Adds path aliases for new src/core structure and legacy import compatibility. |
| src/types/errors.ts | Removes legacy errors (moved into core). |
| src/types/dashboard.types.ts | Removes legacy team types (moved into core domains). |
| src/trpc/server.tsx | Updates tRPC server imports to core router/init. |
| src/trpc/client.tsx | Updates tRPC type import to core router type. |
| src/server/usage/get-usage.ts | Removes old server usage function (migrated to core). |
| src/server/team/types.ts | Removes old team types/schemas (migrated to core). |
| src/server/team/resolve-user-team.ts | Removes old resolve-user-team implementation (migrated to core). |
| src/server/team/get-user-teams.ts | Removes old Supabase-admin implementation (migrated to core). |
| src/server/team/get-user-teams-memo.ts | Removes old memo wrapper (migrated to core). |
| src/server/team/get-team.ts | Removes old team actions wrapper (migrated to core). |
| src/server/team/get-team-pure.ts | Removes old team retrieval helper (migrated to core). |
| src/server/team/get-team-memo.ts | Removes old memo wrapper (migrated to core). |
| src/server/team/get-team-members.ts | Removes old team members implementation (migrated to core). |
| src/server/team/get-team-limits-memo.ts | Removes old memoized team limits (migrated to core). |
| src/server/team/get-team-id-from-segment.ts | Removes old segment→teamId resolution (migrated to core). |
| src/server/auth/get-default-team.ts | Removes old default-team resolution (migrated to core repository usage). |
| src/server/auth/check-user-team-auth-cached.ts | Removes old user-team auth cache helper. |
| src/server/api/routers/support.ts | Removes old support router (replaced by core router). |
| src/server/api/repositories/builds.repository.ts | Removes old builds repository (migrated to core patterns). |
| src/server/api/repositories/auth.repository.ts | Removes old auth repository (migrated to core). |
| src/proxy.ts | Switches proxy redirect + logger to core equivalents. |
| src/lib/utils/trpc-errors.ts | Updates TRPC app router type import to core. |
| src/lib/utils/server.ts | Moves infra/logger/returnServerError imports to core. |
| src/lib/utils/rewrites.ts | Switches logger import to core logger. |
| src/lib/utils/action.ts | Removes legacy action error/util helpers (migrated to core). |
| src/lib/schemas/team.ts | Removes legacy schema file (migrated to core/shared). |
| src/lib/schemas/api.ts | Removes legacy schema file (migrated to core/shared). |
| src/lib/hooks/use-user.ts | Switches Supabase client import to core shared client. |
| src/lib/hooks/use-team.ts | Switches team type import to core domain model. |
| src/features/dashboard/usage/usage-charts-context.tsx | Switches usage types to core billing models. |
| src/features/dashboard/usage/sampling-utils.ts | Switches usage types to core billing models. |
| src/features/dashboard/templates/builds/use-filters.tsx | Switches build status type to core build models. |
| src/features/dashboard/templates/builds/table.tsx | Switches build DTO types to core build models. |
| src/features/dashboard/templates/builds/table-cells.tsx | Switches build DTO types to core build models. |
| src/features/dashboard/templates/builds/header.tsx | Switches build status type to core build models. |
| src/features/dashboard/templates/builds/constants.ts | Switches build status type to core build models. |
| src/features/dashboard/sidebar/menu.tsx | Switches sign-out action import to core actions. |
| src/features/dashboard/sidebar/menu-teams.tsx | Removes SWR teams fetch and uses teams from dashboard context. |
| src/features/dashboard/sidebar/create-team-dialog.tsx | Switches team actions/schemas imports to core. |
| src/features/dashboard/settings/webhooks/table-body.tsx | Switches webhooks getter to core server function. |
| src/features/dashboard/settings/webhooks/edit-secret-dialog.tsx | Switches webhook secret action/schema imports to core. |
| src/features/dashboard/settings/webhooks/delete-dialog.tsx | Switches webhook delete action import to core. |
| src/features/dashboard/settings/webhooks/add-edit-dialog.tsx | Switches webhook upsert action/schema imports to core; minor filter callback tweak. |
| src/features/dashboard/settings/webhooks/add-edit-dialog-steps.tsx | Switches schema type import to core. |
| src/features/dashboard/settings/keys/table-row.tsx | Switches API key delete action import to core. |
| src/features/dashboard/settings/keys/table-body.tsx | Switches API key list function import to core. |
| src/features/dashboard/settings/keys/create-api-key-dialog.tsx | Switches API key create action import to core. |
| src/features/dashboard/settings/general/profile-picture-card.tsx | Switches profile picture action import to core. |
| src/features/dashboard/settings/general/name-card.tsx | Switches team name action/schema imports to core. |
| src/features/dashboard/sandboxes/monitoring/header.tsx | Switches metrics/limits functions imports to core. |
| src/features/dashboard/sandboxes/monitoring/header.client.tsx | Switches getTeamMetrics type import to core. |
| src/features/dashboard/sandboxes/monitoring/charts/team-metrics-chart/utils.ts | Switches metrics types to core sandboxes client models. |
| src/features/dashboard/sandboxes/monitoring/charts/team-metrics-chart/types.ts | Switches metrics types to core sandboxes client models. |
| src/features/dashboard/sandboxes/monitoring/charts/charts.tsx | Switches metrics/limits functions imports to core. |
| src/features/dashboard/sandboxes/live-counter.server.tsx | Switches getTeamMetrics import to core. |
| src/features/dashboard/sandboxes/live-counter.client.tsx | Switches getTeamMetrics type import to core. |
| src/features/dashboard/sandboxes/list/stores/metrics-store.ts | Switches sandboxes metrics types to core sandboxes client models. |
| src/features/dashboard/sandbox/monitoring/utils/timeframe.ts | Switches sandbox details type to core sandboxes models. |
| src/features/dashboard/sandbox/monitoring/utils/chart-model.ts | Switches sandbox event/model types to core sandboxes models. |
| src/features/dashboard/sandbox/monitoring/utils/chart-metrics.ts | Switches sandbox metric type to core sandboxes models. |
| src/features/dashboard/sandbox/monitoring/utils/chart-lifecycle.ts | Switches lifecycle event types to core sandboxes models. |
| src/features/dashboard/sandbox/monitoring/state/use-sandbox-monitoring-controller.ts | Switches sandbox metric type to core sandboxes models. |
| src/features/dashboard/sandbox/logs/sandbox-logs-store.ts | Switches sandbox log type to core sandboxes models. |
| src/features/dashboard/sandbox/logs/logs.tsx | Switches sandbox log types to core sandboxes models. |
| src/features/dashboard/sandbox/logs/logs-filter-params.ts | Switches sandbox log types to core sandboxes models. |
| src/features/dashboard/sandbox/logs/logs-cells.tsx | Switches sandbox log types to core sandboxes models. |
| src/features/dashboard/sandbox/header/kill-button.tsx | Switches kill action import to core. |
| src/features/dashboard/sandbox/context.tsx | Switches sandbox detail/event types to core sandboxes models. |
| src/features/dashboard/members/member-table.tsx | Adds “Providers” column and adjusts sizing/colspan. |
| src/features/dashboard/members/member-table-row.tsx | Adds provider badges rendering using react-icons; switches actions/types to core. |
| src/features/dashboard/members/member-table-body.tsx | Switches getTeamMembers import to core; adjusts colspan. |
| src/features/dashboard/members/danger-zone.tsx | Removes danger zone component (team fetch path removed). |
| src/features/dashboard/members/add-member-form.tsx | Switches add-member action import to core. |
| src/features/dashboard/limits/limit-card.tsx | Switches billing types to core models. |
| src/features/dashboard/limits/alert-card.tsx | Switches billing types to core models. |
| src/features/dashboard/context.tsx | Changes dashboard context to include teams and removes setters/state. |
| src/features/dashboard/build/use-build-logs.ts | Switches build status type to core build models. |
| src/features/dashboard/build/logs.tsx | Switches build DTO types to core build models. |
| src/features/dashboard/build/logs-filter-params.ts | Switches build log types to core build models. |
| src/features/dashboard/build/logs-cells.tsx | Switches build log types to core build models. |
| src/features/dashboard/build/header.tsx | Switches build details type to core build models. |
| src/features/dashboard/build/build-logs-store.ts | Switches build log type to core build models. |
| src/features/dashboard/billing/utils.ts | Switches billing item types to core billing models. |
| src/features/dashboard/billing/types.ts | Switches TeamItems/TeamLimits types to core. |
| src/features/dashboard/billing/selected-plan.tsx | Switches TeamLimits type import to core. |
| src/features/dashboard/billing/select-plan.tsx | Switches TierInfo type import to core. |
| src/features/dashboard/billing/addons.tsx | Switches AddonInfo type import to core. |
| src/features/dashboard/account/user-access-token.tsx | Switches user access token action to core. |
| src/features/dashboard/account/reauth-dialog.tsx | Switches sign-out action to core. |
| src/features/dashboard/account/password-settings.tsx | Switches update user action to core. |
| src/features/dashboard/account/name-settings.tsx | Switches update user action to core. |
| src/features/dashboard/account/email-settings.tsx | Switches update user action to core. |
| src/features/auth/oauth-provider-buttons.tsx | Switches OAuth action import to core. |
| src/core/shared/schemas/url.ts | Adds a relative URL zod schema. |
| src/core/shared/schemas/team.ts | Adds TeamIdOrSlug schema in core shared. |
| src/core/shared/schemas/api.ts | Adds SandboxId schema in core shared. |
| src/core/shared/result.ts | Introduces RepoResult, error codes, and ok/err helpers. |
| src/core/shared/repository-scope.ts | Adds request scope types for repositories. |
| src/core/shared/errors.ts | Moves E2B errors and adds repo error mapping helpers. |
| src/core/shared/clients/tracer.ts | Adds tracer getter wrapper. |
| src/core/shared/clients/supabase/server.ts | Updates Database type import; simplifies catch. |
| src/core/shared/clients/supabase/client.ts | Updates Database type import. |
| src/core/shared/clients/supabase/admin.ts | Updates Database type import. |
| src/core/shared/clients/storage.ts | Removes unused data and trims comments. |
| src/core/shared/clients/meter.ts | Adds meter getter wrapper. |
| src/core/shared/clients/logger/logger.ts | Simplifies logger interfaces/comments. |
| src/core/shared/clients/logger/logger.node.ts | Adds node logger with redaction config. |
| src/core/shared/clients/kv.ts | Exposes kv via a local client module. |
| src/core/shared/clients/api.ts | Updates OpenAPI types imports to core contracts. |
| src/core/server/trpc/procedures.ts | Updates middleware imports and changes teamId resolution call signature. |
| src/core/server/trpc/init.ts | Extends context shape with session/user/teamId placeholders. |
| src/core/server/http/proxy.ts | Adds core proxy redirect helpers. |
| src/core/server/functions/webhooks/schema.ts | Adds zod schemas for webhook operations. |
| src/core/server/functions/webhooks/get-webhooks.ts | Implements get-webhooks via core repository + action client middleware. |
| src/core/server/functions/usage/get-usage.ts | Re-implements get-usage via core billing repository. |
| src/core/server/functions/team/types.ts | Re-exports team models/schemas from core domains. |
| src/core/server/functions/team/resolve-user-team.ts | Re-implements resolve-user-team using user teams repository. |
| src/core/server/functions/team/get-team-members.ts | Re-implements list team members using teams repository. |
| src/core/server/functions/team/get-team-limits.ts | Re-implements team limits fetch via teams repository. |
| src/core/server/functions/team/get-team-id-from-segment.ts | Re-implements segment→teamId resolution via user teams repository. |
| src/core/server/functions/sandboxes/utils.ts | Switches metrics types to core models and client models. |
| src/core/server/functions/sandboxes/get-team-metrics.ts | Switches auth action client import to core. |
| src/core/server/functions/sandboxes/get-team-metrics-max.ts | Switches auth action client import to core. |
| src/core/server/functions/sandboxes/get-team-metrics-core.ts | Switches metrics helpers/types to core. |
| src/core/server/functions/keys/types.ts | Adds API key display model type. |
| src/core/server/functions/keys/get-api-keys.ts | Re-implements API key listing via core keys repository. |
| src/core/server/functions/auth/validate-email.ts | Adds ZeroBounce email validation + KV warning logic. |
| src/core/server/functions/auth/get-user-by-token.ts | Adds cached user lookup by access token via admin client. |
| src/core/server/functions/auth/get-session.ts | Adds getSessionInsecure wrapper with warning suppression. |
| src/core/server/functions/auth/auth.types.ts | Moves auth zod schemas into core functions. |
| src/core/server/api/routers/templates.ts | Adds templates router using core repositories and middleware. |
| src/core/server/api/routers/teams.ts | Adds teams listing procedure using core user-teams repository. |
| src/core/server/api/routers/support.ts | Adds support router using core repository and middleware. |
| src/core/server/api/routers/sandboxes.ts | Adds sandboxes router using core repository and schemas/utilities. |
| src/core/server/api/routers/index.ts | Mounts core routers, including new teams router. |
| src/core/server/api/routers/billing.ts | Adds billing router using core billing/teams repositories. |
| src/core/server/api/middlewares/telemetry.ts | Updates imports for core tRPC init and error adapters. |
| src/core/server/api/middlewares/repository.ts | Adds repository injection middlewares for authed/team-authed scopes. |
| src/core/server/api/middlewares/auth.ts | Updates auth middleware to use core get-session/user-by-token helpers. |
| src/core/server/adapters/trpc-errors.ts | Adds centralized TRPC error helpers and backend API error handlers. |
| src/core/server/adapters/repo-error.ts | Adds mapping from RepoError→TRPC/Action errors. |
| src/core/server/actions/webhooks-actions.ts | Migrates webhook actions to use core repository middleware. |
| src/core/server/actions/utils.ts | Reintroduces action error utils under core. |
| src/core/server/actions/user-actions.ts | Switches auth action client import to core. |
| src/core/server/actions/sandbox-actions.ts | Switches auth action client import to core. |
| src/core/server/actions/key-actions.ts | Migrates key actions to use core keys repository middleware. |
| src/core/server/actions/auth-actions.ts | Migrates auth actions to use core client + core auth schemas/validation. |
| src/core/domains/webhooks/repository.server.ts | Adds webhooks repository with RepoResult error mapping. |
| src/core/domains/templates/repository.server.ts | Adds templates repositories (team + default) using RepoResult. |
| src/core/domains/teams/user-teams-repository.server.ts | Adds user teams repository for listing/slug resolution. |
| src/core/domains/teams/schemas.ts | Adds team name and create/update schemas in core domain. |
| src/core/domains/teams/models.ts | Adds core team models/types. |
| src/core/domains/sandboxes/schemas.ts | Adds shared sandboxes metrics request schemas. |
| src/core/domains/sandboxes/models.ts | Renames sandboxes DTOs→models and adds mapping helpers. |
| src/core/domains/sandboxes/models.client.ts | Updates client metrics models to reference core sandboxes models. |
| src/core/domains/keys/repository.server.ts | Adds keys repository with RepoResult error mapping. |
| src/core/domains/builds/models.ts | Renames builds DTOs→models. |
| src/core/domains/billing/models.ts | Makes billing models explicit exports and loosens some literal types. |
| src/core/domains/auth/repository.server.ts | Adds auth repository returning RepoResult rather than throwing TRPC errors. |
| src/core/domains/auth/models.ts | Adds auth models/schemas in core. |
| src/configs/mock-data.ts | Switches sandboxes client metrics types to core. |
| src/configs/cache.ts | Removes tags related to deleted auth/team-limit caching. |
| src/app/sbx/new/route.ts | Switches default team resolution to user-teams repository. |
| src/app/dashboard/route.ts | Uses core get-session + new resolveUserTeam signature (accessToken). |
| src/app/dashboard/account/route.ts | Uses core get-session + new resolveUserTeam signature (accessToken). |
| src/app/dashboard/[teamIdOrSlug]/usage/page.tsx | Switches getUsage import to core function. |
| src/app/dashboard/[teamIdOrSlug]/team-gate.tsx | Adds client-side team gate using tRPC teams list + suspense. |
| src/app/dashboard/[teamIdOrSlug]/layout.tsx | Prefetches teams list, hydrates, and delegates team selection to TeamGate. |
| src/app/dashboard/(resolvers)/inspect/sandbox/[sandboxId]/route.ts | Switches teams lookup to user-teams repository. |
| src/app/api/trpc/[trpc]/route.ts | Switches tRPC router/context imports to core. |
| src/app/api/teams/user/types.ts | Switches ClientTeam type import to core. |
| src/app/api/teams/user/route.ts | Switches teams list implementation to user-teams repository. |
| src/app/api/teams/[teamId]/sandboxes/metrics/types.ts | Switches metrics types to core sandboxes client models. |
| src/app/api/teams/[teamId]/sandboxes/metrics/route.ts | Switches getSessionInsecure + metrics transform imports to core. |
| src/app/api/teams/[teamId]/metrics/types.ts | Switches metrics types to core sandboxes client models. |
| src/app/api/teams/[teamId]/metrics/route.ts | Switches getSessionInsecure + metrics core import to core. |
| src/app/api/health/route.ts | Replaces Supabase DB health probe with dashboard API /health check. |
| src/app/api/auth/verify-otp/route.ts | Switches auth models/repo import to core and returns redirectUrl on repo error. |
| src/app/api/auth/confirm/route.ts | Switches OtpTypeSchema import to core. |
| src/app/(auth)/sign-up/page.tsx | Switches auth action/schema imports to core. |
| src/app/(auth)/sign-in/page.tsx | Switches auth action/schema imports to core. |
| src/app/(auth)/forgot-password/page.tsx | Switches auth action/schema imports to core. |
| src/app/(auth)/confirm/page.tsx | Switches auth models import to core. |
| src/app/(auth)/auth/cli/page.tsx | Switches default team resolution to user-teams repository. |
| src/test/unit/sandbox-monitoring-chart-model.test.ts | Switches sandboxes model imports to core. |
| src/test/unit/sandbox-lifecycle.test.ts | Switches sandboxes model imports to core. |
| src/test/unit/fill-metrics-with-zeros.test.ts | Switches utils/types imports to core. |
| src/test/unit/chart-utils.test.ts | Switches metrics type imports to core. |
| src/test/integration/resolve-user-team.test.ts | Updates mocks/imports toward core paths. |
| src/test/integration/dashboard-route.test.ts | Updates resolveUserTeam mock import to core path. |
| src/test/integration/auth.test.ts | Updates auth action + validate-email imports to core. |
| package.json | Updates codegen output locations to core contracts. |
| migrations/20260217145145.sql | Removes migration file from repo. |
| migrations/20260212120822.sql | Removes migration file from repo. |
| migrations/20250314133234.sql | Removes migration file from repo. |
| migrations/20250311144556.sql | Removes migration file from repo. |
| migrations/20250205180205.sql | Removes migration file from repo. |
Comments suppressed due to low confidence (1)
src/core/server/functions/webhooks/get-webhooks.ts:26
- The action is named
getWebhooksbut.metadata({ serverFunctionName: 'getWebhook' })is singular. This makes logs/telemetry harder to interpret; update the metadata name to match the function/action.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/core/server/api/routers/teams.ts
Outdated
| export const teamsRouter = { | ||
| list: teamsRepositoryProcedure.query(async ({ ctx }) => { | ||
| const teamsResult = await ctx.teamsRepository.listUserTeams() | ||
|
|
||
| if (!teamsResult.ok) { | ||
| throwTRPCErrorFromRepoError(teamsResult.error) | ||
| } | ||
|
|
||
| return teamsResult.data | ||
| }), | ||
| } |
There was a problem hiding this comment.
teamsRouter is exported as a plain object, but it’s mounted as teams: teamsRouter in createTRPCRouter(...). tRPC expects a nested router here (created via createTRPCRouter/t.router), not a raw record, so this will fail type-checking and/or routing. Wrap this in createTRPCRouter({ list: ... }) to create a proper router instance.
- Refactored import paths in the codebase to use the new structure under `src/core/shared` and `src/core/modules`. - Removed obsolete files related to auth and billing domains to streamline the codebase. - Updated `tsconfig.json` to reflect the new paths for contracts and types. - Adjusted test files to align with the new import structure.
- Renamed `ClientTeam` to `TeamModel` across the codebase for consistency with the new API structure. - Updated references to team properties, changing `is_default` to `isDefault`. - Removed the obsolete `get-team-limits` function and its related types. - Adjusted various components and repositories to align with the new team model and limits structure.
- Added a new test case to ensure default redirection to sandboxes when the tab matches an inherited object key in the dashboard route. - Updated the `resolveUserTeam` function to include a fallback mechanism for resolving teams based on cookie slug and added new test cases for various scenarios. - Refactored the `GET` function in the dashboard route to utilize a helper function for determining the redirect path based on the tab. - Simplified the `DashboardTeamGate` component by removing unnecessary error boundaries while maintaining suspense handling. - Updated billing repository to include teamId in authorization headers for API requests. - Corrected metadata in the webhooks function to accurately reflect the function name.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Note
Medium Risk
Updates core dashboard routing/auth flows to depend on team slugs (with server-side slug resolution) and introduces new repository layers for auth/teams/billing/sandboxes/builds/keys/support, which could impact authorization and navigation if edge cases are missed.
Overview
Moves the dashboard from
teamIdOrSlugsegments to slug-only routing, updating redirects, URL builders, sidebar links, SWR/KV keys, and multiple dashboard pages/API routes to acceptteamSlugand resolve it to a team ID server-side (returning403when not accessible).Introduces new repository modules under
src/core/modules/*(notablyuser-teams-repository,teams-repository,billing-repository,sandboxes-repository,builds-repository,keys-repository,support-repository, andauthRepository) and rewires routes/actions/tests to use these instead of older@/server/*/Supabase-admin direct queries.Adds
DashboardTeamGateto enforce membership client-side using prefetchedtrpc.teams.list, expands the Dashboard OpenAPI spec with newteams/templatesendpoints and schemas, and removes several old SQL migration files.Written by Cursor Bugbot for commit 2f3e726. This will update automatically on new commits. Configure here.