From 629fd24d9f05b4765e1c86b07ea38afd02399cdf Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sun, 22 Feb 2026 00:27:39 -0800 Subject: [PATCH] Improve pull request prompt and generation handling (#800) * Changes from fix/improve-pull-request-prompt * Update apps/ui/src/components/views/board-view/dialogs/create-pr-dialog.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../src/routes/worktree/routes/generate-pr-description.ts | 4 +++- .../views/board-view/dialogs/create-pr-dialog.tsx | 6 +++--- libs/prompts/src/defaults.ts | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/server/src/routes/worktree/routes/generate-pr-description.ts b/apps/server/src/routes/worktree/routes/generate-pr-description.ts index 4f42b47e..4e9e5716 100644 --- a/apps/server/src/routes/worktree/routes/generate-pr-description.ts +++ b/apps/server/src/routes/worktree/routes/generate-pr-description.ts @@ -53,7 +53,9 @@ Rules: - Focus on the user-facing impact when possible - If there are breaking changes, mention them prominently - The diff may include both committed changes and uncommitted working directory changes. Treat all changes as part of the PR since uncommitted changes will be committed when the PR is created -- Do NOT distinguish between committed and uncommitted changes in the output - describe all changes as a unified set of PR changes`; +- Do NOT distinguish between committed and uncommitted changes in the output - describe all changes as a unified set of PR changes +- EXCLUDE any files that are gitignored (e.g., node_modules, dist, build, .env files, lock files, generated files, binary artifacts, coverage reports, cache directories). These should not be mentioned in the description even if they appear in the diff +- Focus only on meaningful source code changes that are tracked by git and relevant to reviewers`; /** * Wraps an async generator with a timeout. diff --git a/apps/ui/src/components/views/board-view/dialogs/create-pr-dialog.tsx b/apps/ui/src/components/views/board-view/dialogs/create-pr-dialog.tsx index 950fd2f3..a88b111f 100644 --- a/apps/ui/src/components/views/board-view/dialogs/create-pr-dialog.tsx +++ b/apps/ui/src/components/views/board-view/dialogs/create-pr-dialog.tsx @@ -491,7 +491,7 @@ export function CreatePRDialog({ return ( - + @@ -565,7 +565,7 @@ export function CreatePRDialog({ ) : ( <> -
+
{worktree.hasChanges && (
- + diff --git a/libs/prompts/src/defaults.ts b/libs/prompts/src/defaults.ts index bcbc6feb..330afe0c 100644 --- a/libs/prompts/src/defaults.ts +++ b/libs/prompts/src/defaults.ts @@ -490,6 +490,7 @@ Rules: - Focus on WHAT changed and WHY (if clear from the diff), not HOW - No quotes, backticks, or extra formatting - If there are multiple changes, provide a brief summary on the first line +- Ignore changes to gitignored files (e.g., node_modules, dist, build, .env files, lock files, generated files, binary artifacts, coverage reports, cache directories). Focus only on meaningful source code changes that are tracked by git Examples: - feat: Add dark mode toggle to settings