Skip to content

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

Refine review branch prompt (#37196)

Saxon Fletcher6a1115ebaf47
diff --git a/apps/studio/components/interfaces/BranchManagement/ReviewWithAI.tsx b/apps/studio/components/interfaces/BranchManagement/ReviewWithAI.tsx
index 0045cb8b350..03d76c85a67 100644
--- a/apps/studio/components/interfaces/BranchManagement/ReviewWithAI.tsx
+++ b/apps/studio/components/interfaces/BranchManagement/ReviewWithAI.tsx
@@ -49,7 +49,7 @@ export const ReviewWithAI = ({
if (productionSQL.trim()) {
sqlSnippets.push({
label: 'Production Schema',
- content: productionSQL,
+ content: 'CURRENT PRODUCTION SCHEMA:\n' + productionSQL,
})
}
}
@@ -58,7 +58,7 @@ export const ReviewWithAI = ({
if (diffContent && diffContent.trim()) {
sqlSnippets.push({
label: 'Database Changes',
- content: '-- DATABASE CHANGES:\n' + diffContent,
+ content: '-- DATABASE CHANGES TO BE MERGED IN:\n' + diffContent,
})
}
@@ -66,18 +66,7 @@ export const ReviewWithAI = ({
name: `Review merge: ${currentBranch.name} → ${mainBranch.name}`,
open: true,
sqlSnippets: sqlSnippets.length > 0 ? sqlSnippets : undefined,
- initialInput: `Please review this merge request from branch "${currentBranch.name}" into "${mainBranch.name || 'main'}".
-
-I've included the current production schema as context, along with the proposed database changes.
-
-Analyze the changes and provide feedback on:
-- Database schema changes and potential impacts on the production schema
-- Migration safety and rollback considerations
-- Overall code quality and best practices
-- Potential breaking changes or compatibility issues
-- Data integrity and constraint implications
-
-Please be concise with your response.`,
+ initialInput: `I want to run the attached database changes on my production database branch as part of a branch merge from "${currentBranch.name}" into "${mainBranch.name || 'main'}". I've included the current production database schema as extra context. Please analyze the proposed schema changes and provide concise feedback on their impact on the production schema including any migration concerns and potential conflicts.`,
suggestions: {
title: `I can help you review the database schema changes from "${currentBranch.name}" to "${mainBranch.name}", here are some specific areas I can focus on:`,
prompts: [