Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: manage CodeRabbit config in .coderabbit.yaml (#47328)

Alaister Young7b5e976c9f8b
diff --git a/.coderabbit.yaml b/.coderabbit.yaml
new file mode 100644
index 00000000000..fcbb740a6fe
--- /dev/null
+++ b/.coderabbit.yaml
@@ -0,0 +1,71 @@
+# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
+
+# Don't inherit organization-level settings (they're tuned for other repos);
+# this config is self-contained and unset values use CodeRabbit defaults.
+inheritance: false
+
+# Enrich linked issues with related code and potential solutions during review.
+issue_enrichment:
+ auto_enrich:
+ enabled: true
+
+reviews:
+ # Skip machine-generated / vendored files (mirrors .prettierignore). Keeps
+ # reviews focused on hand-written code and preserves rate-limit budget on
+ # large codegen diffs.
+ path_filters:
+ - '!pnpm-lock.yaml'
+ - '!packages/api-types/types/**' # generated API types (api.d.ts, platform.d.ts)
+ - '!supabase/functions/common/database-types.ts' # generated by `pnpm generate:types`
+ - '!**/routeTree.gen.ts' # TanStack Router generated
+ - '!**/__generated__/**'
+ - '!apps/docs/features/docs/generated/**'
+ - '!apps/www/.generated/**'
+ - '!apps/design-system/__registry__/**'
+ - '!apps/ui-library/__registry__/**'
+ - '!apps/ui-library/public/r/**' # registry output
+ - '!packages/icons/__registry__/**'
+ - '!packages/icons/src/icons/**' # generated icon components
+
+ # Targeted, path-scoped review guidance, version-controlled alongside the code.
+ path_instructions:
+ - path: 'packages/common/telemetry-constants.ts'
+ instructions: |
+ Strictly enforce event naming: [object]_[verb] in snake_case. Only approved
+ verbs: opened, clicked, submitted, created, removed, updated, retrieved,
+ intended, evaluated, added, enabled, disabled, copied, exposed, failed,
+ converted. Properties must be camelCase for new events (match existing
+ convention when adding to existing events). Flag any usage of
+ useSendEventMutation. Verify @group Events and @source JSDoc tags are
+ accurate. Check that new interfaces are added to the TelemetryEvent union type.
+ - path: 'apps/studio/components/**/!(*.test).tsx' # production components only, not tests
+ instructions: |
+ Only suggest adding PostHog event tracking (via useTrack from
+ lib/telemetry/track, [object]_[verb] snake_case) when a new user-facing
+ interaction is growth-relevant: e.g. first-use of a feature, onboarding steps,
+ project/org creation, upgrade/billing actions, enabling or disabling a product
+ feature, or any action that signals activation or retention. Do not suggest
+ tracking for: passive views, page loads, UI-only state changes (e.g. expanding
+ a panel, switching tabs in a settings page), developer/internal tooling
+ interactions, or interactions clearly unrelated to product adoption.
+
+# Applies our internal engineering skills (.claude/skills/) as CodeRabbit review
+# guidelines. The skills are the single source of truth — they are consumed
+# directly, with no copy of their content elsewhere.
+#
+# `applyTo` decouples where a guideline file lives from the code it governs.
+# Without it, CodeRabbit scopes a guideline file to its own directory and below;
+# our skills live in .claude/skills/, which contains no code, so they would never
+# reach apps/studio. `applyTo` points them at the right paths instead.
+knowledge_base:
+ code_guidelines:
+ filePatterns:
+ # Studio code conventions — React/TS, UI patterns, composition, data fetching, errors
+ - files: '.claude/skills/{studio-best-practices,studio-ui-patterns,vercel-composition-patterns,studio-queries,studio-error-handling}/SKILL.md'
+ applyTo: 'apps/studio/**/*.{ts,tsx}'
+ # Studio unit / component test conventions
+ - files: '.claude/skills/{studio-testing,studio-mock-api-tests}/SKILL.md'
+ applyTo: 'apps/studio/**/*.test.{ts,tsx}'
+ # Studio end-to-end (Playwright) test conventions
+ - files: '.claude/skills/studio-e2e-tests/SKILL.md'
+ applyTo: 'e2e/studio/**/*.spec.ts'