From d06d25b1b52b24e6d85b49bdde84179506d035f2 Mon Sep 17 00:00:00 2001 From: DhanushSantosh Date: Thu, 5 Feb 2026 10:52:59 +0530 Subject: [PATCH] fix: enhance commit messages and sidebar scroll visibility Fix #689: Improve auto-generated commit message quality - Add generateCommitMessage() method that includes description summary - Include first 5 lines of feature description (up to 300 chars) - Add git diff stats to provide file change context - Commit messages now reflect the actual scope of work performed - Maintains backward compatibility with fallback for missing features Fix #601: Improve scroll indicator visibility on small screens - Enhanced scroll indicator with gradient fade effect - Show indicator on both expanded and collapsed sidebar states - Added "Scroll" text label for better discoverability - More prominent brand-colored chevron with animation - Prevents Project Settings from being hidden on smaller laptop screens Both fixes improve user experience without breaking existing functionality. Test results: All 1,421 server tests pass --- apps/server/src/services/auto-mode-service.ts | 58 +++++++++++++++++-- .../src/components/layout/sidebar/sidebar.tsx | 25 +++++++- 2 files changed, 76 insertions(+), 7 deletions(-) diff --git a/apps/server/src/services/auto-mode-service.ts b/apps/server/src/services/auto-mode-service.ts index 5957c289..0c7416b9 100644 --- a/apps/server/src/services/auto-mode-service.ts +++ b/apps/server/src/services/auto-mode-service.ts @@ -2657,10 +2657,8 @@ Address the follow-up instructions above. Review the previous work and make the // Load feature for commit message const feature = await this.loadFeature(projectPath, featureId); const commitMessage = feature - ? `feat: ${this.extractTitleFromDescription( - feature.description - )}\n\nImplemented by Automaker auto-mode` - : `feat: Feature ${featureId}`; + ? await this.generateCommitMessage(feature, workDir) + : `feat: Feature ${featureId}\n\nImplemented by Automaker auto-mode`; // Determine which files to stage // For feature branches, only stage files changed on this branch to avoid committing unrelated changes @@ -3896,6 +3894,58 @@ Format your response as a structured markdown document.`; return firstLine.substring(0, 57) + '...'; } + /** + * Generate a comprehensive commit message for a feature + * Includes title, description summary, and file statistics + */ + private async generateCommitMessage(feature: Feature, workDir: string): Promise { + const title = this.extractTitleFromDescription(feature.description); + + // Extract description summary (first 3-5 lines, up to 300 chars) + let descriptionSummary = ''; + if (feature.description && feature.description.trim()) { + const lines = feature.description.split('\n').filter((l) => l.trim()); + const summaryLines = lines.slice(0, 5); // First 5 non-empty lines + descriptionSummary = summaryLines.join('\n'); + + // Limit to 300 characters + if (descriptionSummary.length > 300) { + descriptionSummary = descriptionSummary.substring(0, 297) + '...'; + } + } + + // Get file statistics to add context + let fileStats = ''; + try { + const { stdout: diffStat } = await execAsync('git diff --cached --stat', { cwd: workDir }); + if (diffStat.trim()) { + // Extract just the summary line (last line with file count) + const statLines = diffStat.trim().split('\n'); + const summaryLine = statLines[statLines.length - 1]; + if (summaryLine && summaryLine.includes('file')) { + fileStats = `\n${summaryLine.trim()}`; + } + } + } catch { + // Ignore errors getting stats + } + + // Build commit message + let message = `feat: ${title}`; + + if (descriptionSummary && descriptionSummary !== title) { + message += `\n\n${descriptionSummary}`; + } + + if (fileStats) { + message += fileStats; + } + + message += '\n\nImplemented by Automaker auto-mode'; + + return message; + } + /** * Get the planning prompt prefix based on feature's planning mode */ diff --git a/apps/ui/src/components/layout/sidebar/sidebar.tsx b/apps/ui/src/components/layout/sidebar/sidebar.tsx index d7bd0020..9345b81b 100644 --- a/apps/ui/src/components/layout/sidebar/sidebar.tsx +++ b/apps/ui/src/components/layout/sidebar/sidebar.tsx @@ -405,9 +405,28 @@ export function Sidebar() { {/* Scroll indicator - shows there's more content below */} - {canScrollDown && sidebarOpen && ( -
- + {canScrollDown && ( +
+
+ + {sidebarOpen && ( + + Scroll + + )} +
)}