From 5ea095662b01fd2d5e9114ae01347e52c65ca3a1 Mon Sep 17 00:00:00 2001 From: Martin Braquet Date: Thu, 2 Apr 2026 18:53:00 +0200 Subject: [PATCH 1/5] Add CodeRabbit configuration for PR reviews This configuration file sets up CodeRabbit's behavior for PR summaries and reviews, including instructions for summarizing changes, review profiles, and file exclusions. --- .coderabbit.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .coderabbit.yaml diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 00000000..6cf6ede0 --- /dev/null +++ b/.coderabbit.yaml @@ -0,0 +1,35 @@ +# Automatically generated PR summaries +description: + # Do you want CodeRabbit to actually edit the PR description body? (Highly recommended) + collapse_walkthrough: false + instructions: | + Summarize the changes clearly. + Format the summary with bullet points. + Highlight any potential breaking changes for users. + +# How aggressive and deep the reviews should be +reviews: + # 'chill' (fewer comments, only critical bugs) or 'assertive' (strict, points out everything) + profile: assertive + + # Should CodeRabbit formally "Request Changes" (which can block merging) or just leave comments? + # For open-source, 'false' is usually better so it doesn't block community contributors aggressively. + request_changes_workflow: false + + # High-level rules for the AI to follow during review + instructions: | + - We use early returns to avoid deep nesting. + - Ensure all public functions have docstrings. + - Flag any hardcoded strings; they should be in the constants file. + - Check for edge cases like null values or empty arrays. + - Suggest performance optimizations where appropriate. + +# What files should the AI ignore? (Crucial to save time and avoid noise) +path_filters: + # Files to ALWAYS ignore + exclude: + - "**/*.md" # Ignore markdown docs + - "package-lock.json" # Ignore lock files + - "yarn.lock" + - "dist/**" # Ignore compiled output + - "test/mocks/**" # Ignore mock data From b46d39d9b7551f873efaa5a5769553e20c83adb6 Mon Sep 17 00:00:00 2001 From: Martin Braquet Date: Thu, 2 Apr 2026 18:53:34 +0200 Subject: [PATCH 2/5] Enable automatic reviews in CodeRabbit configuration --- .coderabbit.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 6cf6ede0..91f7f3c1 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -9,6 +9,9 @@ description: # How aggressive and deep the reviews should be reviews: + auto_review: + enabled: true + # 'chill' (fewer comments, only critical bugs) or 'assertive' (strict, points out everything) profile: assertive From 4f98d99dd91e7372c620eaaf235786281825cf2e Mon Sep 17 00:00:00 2001 From: Martin Braquet Date: Thu, 2 Apr 2026 19:02:40 +0200 Subject: [PATCH 3/5] Update .coderabbit.yaml configuration Removed auto-generated PR summary settings and path filters. --- .coderabbit.yaml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 91f7f3c1..5a6b446e 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -1,11 +1,4 @@ -# Automatically generated PR summaries -description: - # Do you want CodeRabbit to actually edit the PR description body? (Highly recommended) - collapse_walkthrough: false - instructions: | - Summarize the changes clearly. - Format the summary with bullet points. - Highlight any potential breaking changes for users. +language: "en-US" # How aggressive and deep the reviews should be reviews: @@ -21,18 +14,11 @@ reviews: # High-level rules for the AI to follow during review instructions: | + - Summarize the changes clearly. + - Format the summary with bullet points. + - Highlight any potential breaking changes for users. - We use early returns to avoid deep nesting. - Ensure all public functions have docstrings. - Flag any hardcoded strings; they should be in the constants file. - Check for edge cases like null values or empty arrays. - Suggest performance optimizations where appropriate. - -# What files should the AI ignore? (Crucial to save time and avoid noise) -path_filters: - # Files to ALWAYS ignore - exclude: - - "**/*.md" # Ignore markdown docs - - "package-lock.json" # Ignore lock files - - "yarn.lock" - - "dist/**" # Ignore compiled output - - "test/mocks/**" # Ignore mock data From 93cd105871d2d0d48e4c6c47b9b418d3e0429124 Mon Sep 17 00:00:00 2001 From: Martin Braquet Date: Thu, 2 Apr 2026 19:02:54 +0200 Subject: [PATCH 4/5] Add .coderabbitignore to exclude specific files --- .coderabbitignore | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .coderabbitignore diff --git a/.coderabbitignore b/.coderabbitignore new file mode 100644 index 00000000..cc0134fa --- /dev/null +++ b/.coderabbitignore @@ -0,0 +1,5 @@ +**/*.md +package-lock.json +yarn.lock +dist/** +test/mocks/** From c8801a0235f0b429a03879f4137844eb2581dd0f Mon Sep 17 00:00:00 2001 From: Martin Braquet Date: Thu, 2 Apr 2026 19:09:13 +0200 Subject: [PATCH 5/5] Enhance CodeRabbit configuration settings Updated CodeRabbit configuration with new settings for reviews, chat auto-reply, and pre-merge checks. --- .coderabbit.yaml | 116 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 97 insertions(+), 19 deletions(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 5a6b446e..891bb130 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -1,24 +1,102 @@ -language: "en-US" +# Enables IDE autocompletion for this config file +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json + +# Language for CodeRabbit's review comments +language: en + +# Enable experimental features (currently not using any specific early_access features) +early_access: true + +chat: + # CodeRabbit will automatically respond to @coderabbitai mentions in PR comments + auto_reply: true -# How aggressive and deep the reviews should be reviews: auto_review: + # Automatically trigger reviews when PRs are opened or updated enabled: true - - # 'chill' (fewer comments, only critical bugs) or 'assertive' (strict, points out everything) - profile: assertive - - # Should CodeRabbit formally "Request Changes" (which can block merging) or just leave comments? - # For open-source, 'false' is usually better so it doesn't block community contributors aggressively. + # Skip auto-review if PR title contains these keywords + ignore_title_keywords: + - "WIP" + # Don't auto-review draft PRs + drafts: false + # Only auto-review PRs targeting these branches + base_branches: + - main + - develop + + # Include a high-level summary at the start of each review + high_level_summary: true + + # Generate sequence diagrams for complex code flows + sequence_diagrams: true + + # Don't include poems in reviews (fun feature, but keeping it professional) + poem: false + + # Show review completion status + review_status: true + + # Keep the walkthrough section expanded by default + collapse_walkthrough: false + + # Include summary of all changed files + changed_files_summary: true + + # Don't automatically request changes on the PR (just leave comments) request_changes_workflow: false - - # High-level rules for the AI to follow during review - instructions: | - - Summarize the changes clearly. - - Format the summary with bullet points. - - Highlight any potential breaking changes for users. - - We use early returns to avoid deep nesting. - - Ensure all public functions have docstrings. - - Flag any hardcoded strings; they should be in the constants file. - - Check for edge cases like null values or empty arrays. - - Suggest performance optimizations where appropriate. + + # Pre-merge checks to enforce before merging PRs + pre_merge_checks: + description: + # Validate that PR has a proper description + mode: warning # Options: off, warning, error + docstrings: + # Disable docstring coverage checks (let's assume we don't need them) + mode: off + + # Exclude these paths from reviews (build artifacts and dependencies) + path_filters: + - "!**/node_modules/**" # npm dependencies + - "!**/android/**" # Native Android build files + - "!**/ios/**" # Native iOS build files + - "!**/.expo/**" # Expo build cache + - "!**/.expo-shared/**" # Expo shared config + - "!**/dist/**" # Build output + + # Custom review instructions for specific file patterns + path_instructions: + # TypeScript/JavaScript files - main app code + - path: "**/*.{ts,tsx,js,jsx}" + instructions: | + General practices: + - Summarize the changes clearly. + - Format the summary with bullet points. + - Highlight any potential breaking changes for users. + - We use early returns to avoid deep nesting. + - Ensure all public functions have docstrings. + - Flag any hardcoded strings; they should be in the constants file. + - Check for edge cases like null values or empty arrays. + - Suggest performance optimizations where appropriate. + + Mobile best practices: + - Proper use of hooks (useRouter, useFonts, useAssets) + - Accessibility: touch targets min 44x44, screen reader support + - Safe area handling and platform-specific code (iOS vs Android) + - Memory leaks in useEffect and event listeners + + Performance: + - Use FlatList/SectionList for lists (never ScrollView with .map) + - React.memo, useMemo, useCallback where appropriate + + TypeScript: + - Avoid 'any', use explicit types + - Prefer 'import type' for type imports + + Security: + - No exposed API keys or sensitive data + - Use expo-secure-store for sensitive storage + - Validate deep linking configurations + + Internationalization: + - User-visible strings should be externalized to resource files (useT())